SIGCLEAR Program reference

sgfieldin

Import auxiliary fields when specified matching conditions are satisfied

Package: sigclear-soig · Version: 1.1.1-4 Download JSON

Description

Compare fields in the input and auxiliary datasets using the configured
matching conditions, then copy selected auxiliary fields into the output when
those conditions match. Define explicit field mappings and comparison
conditions; the resulting fields are added to the input dataset's schema.

Synopsis

sgfieldin <stdin -aux= >stdout -flag="flag"

Parameters

sgfieldin parameters
ParameterTypeDefaultDescription
in ifile stdin input data
-aux ifile Unknown auxiliary data: 1. multiple columns must be in the same group; 2. both scalar and vector fields can be used as check conditions; 3. both scalar and vector fields can be imported as new fields
out ofile stdout output dataset: selected scalar and vector values from the auxiliary file are imported as scalar fields
-flag str flag status field name: 1. stores the index of the matched column in the auxiliary file 2. stores -1 when no auxiliary column matches

Input and output

Input

input data

Output

output dataset: selected scalar and vector values from the auxiliary file are imported as scalar fields

Examples

1. Import shot coordinates and fire time for matching swath and shot values

sgfieldin -aux=auxiliary.sg swath==swath shot==spnb \
  shotx=sx shoty=sy firetime=ft_us <input.sg >output.sg

input.sg must contain scalar swath and shot fields. auxiliary.sg must contain
scalar swath, spnb, sx, sy and ft_us fields, with its columns in one group.
For matching input columns, output.sg retains the original fields and imports
auxiliary sx, sy and ft_us values into scalar shotx, shoty and firetime fields.
Check the flag field and imported values before further processing. File names
are illustrative; this example has not been executed against a supplied dataset.