|
<< Click to Display Table of Contents >> Navigation: General > If |
The If module provides conditional branching within a processing sequence. For each incoming gather, it evaluates a user-defined condition and routes the data into one of two independent sub-sequences: a True branch (condition satisfied) or a False branch (condition not satisfied). After both branches finish executing, the results are merged back into a single output gather, preserving the original trace order.
The module operates in two modes. In By gather mode, the condition is evaluated once for the whole gather: the entire gather is sent to the True branch if the condition holds, or to the False branch if it does not. In By trace mode, each trace is evaluated individually. Traces that satisfy the condition go to the True branch, and traces that do not go to the False branch; both subsets are processed independently and then recombined.
Typical uses include applying different processing flows to live traces versus dead traces, routing noisy gathers through a separate noise-attenuation branch, selecting traces within a spatial polygon for targeted processing, or applying a special correction only to gathers that contain fewer than a given number of traces.
The seismic gathers to be evaluated. Connect the output of the preceding module in the processing sequence here. In By gather mode the whole gather is tested as a unit; in By trace mode individual traces within each gather are tested and selectively routed.
Selects the level at which the condition is applied. Options:
By trace (default) — the condition is tested on each trace independently. Matching traces are directed to the True branch; non-matching traces are directed to the False branch. After processing, all traces are merged back in their original order. Use this mode when different subsets of traces within a gather require different processing.
By gather — the condition is tested once for the entire gather. The whole gather goes either to the True branch or the False branch. Use this mode when a gather-level property (for example, the number of traces, or a gather-level string label) determines which processing path to use.
These parameters are visible only when Working mode is set to By gather.
Selects the type of gather-level condition to evaluate. Options:
String — compares a text value (the Input string) against a Reference string. The condition is true when the two strings are identical. Useful for routing based on survey name, line name, or any other string metadata associated with the gather.
Trace header — evaluates a mathematical expression using trace header values. The expression is tested on all traces (or optionally only the first trace) in the gather. The condition is true only if the expression evaluates to a non-zero value for all tested traces. Supports standard header names and arithmetic/logical operators.
Number of traces — evaluates an expression that depends on the number of traces in the gather. For example, you can route sparse gathers (fewer than 10 traces) into a separate processing path. Enter an expression such as N > 10 where N represents the trace count.
Visible when Calc by is String. Enter the text value to compare. When this string exactly matches the Reference string, the gather is routed to the True branch.
This parameter is part of the general sequence infrastructure. When enabled, any error encountered during the evaluation of the condition or the execution of either branch will halt the entire processing job. When disabled, the module attempts to continue with subsequent gathers even if a single gather fails. Enable this option during QC runs to detect problems immediately; disable it in production runs where isolated failures should not abort the full dataset.
Visible when Calc by is String. Enter the expected text value. The condition evaluates as true when the Input string exactly equals this Reference string (case-sensitive comparison).
Visible when Calc by is Trace header. Enter a mathematical or logical expression using trace header field names. The expression is evaluated for each trace in the gather (or only the first trace if Check only the first trace is enabled). The gather-level condition is true when the expression evaluates to a non-zero value for all checked traces. Example: OFFSET > 500 and OFFSET < 3000.
These parameters are visible only when Working mode is set to By trace.
Determines how individual traces are selected for the True branch. Options:
Use table selection — define one or more trace header ranges in a table. Each row specifies a header field, a value range (From / To), a step, and whether matching traces should be included or excluded. Multiple rows are combined with AND or OR logic. This is the most flexible method for complex header-based routing.
Use expression — enter a single mathematical or logical expression. Any trace for which the expression evaluates to non-zero is selected for the True branch. Supports all standard trace header names and calculated attributes. Example: (MAXIMUM_AMPLITUDE > 1.5) and (OFFSET < 2000).
First in group — selects the first N traces in each defined gather group. Use this option to isolate near-offset traces or the first arrivals in each CMP, for example. Requires a gather index vector input and the Traces per group parameter.
Use polygon — selects traces whose source, receiver, or bin coordinates fall inside a spatial polygon. Useful for applying a specific processing flow to a geographically defined area within the survey. Connect a polygon set to the Polygon set input and choose which polygon to use.
Use trace headers mask — compares trace header values against an external reference trace vector (a mask). Traces whose selected headers match those in the mask are included or excluded depending on the Mask type setting. This mode is suited for applying a previously computed trace selection to a new dataset.
Optional. Connect a calculated attributes dataset here to make those attribute values available for use within the selection expression (Use expression mode) or the table selection. When connected, attribute names can be referenced alongside standard trace header names in any expression.
Visible when Selection type is Use expression. Enter a logical expression using standard trace header names and, if connected, calculated attribute names. Any trace for which the expression evaluates to a non-zero value is routed to the True branch. Example: (MAXIMUM_AMPLITUDE > 1.5) and (MAXIMUM_AMPLITUDE < -2.5). Use standard arithmetic operators (+, -, *, /), comparison operators (>, <, ==, !=), and logical operators (and, or, not).
Visible when Selection type is Use table selection. Add one row per selection criterion. Each row contains:
Trace header — the header field to test (e.g. OFFSET, CDP, INLINE_3D).
From value / To value — the inclusive range of header values to match. Default: 0 to 0.
Step — selects only every Nth value within the range. Default: 1 (every value). For example, setting Step to 2 selects every other value.
Type — whether matching traces are Included (routed to True branch) or Excluded (routed to False branch).
Logical operator type — how this row's criterion is combined with the next row. and requires all criteria to be satisfied; or requires at least one to be satisfied.
Visible when Selection type is First in group. Specifies how many leading traces from each gather group are routed to the True branch. All remaining traces go to the False branch. Default: 0 (no traces selected). Set this to a positive integer to select the first N traces per group.
Visible when Selection type is Use polygon. Connect a polygon set item (created in the project or imported) that contains the spatial boundaries for trace selection.
Visible when Selection type is Use polygon. Choose which polygon from the connected polygon set defines the spatial boundary. The list is populated automatically when a polygon set is connected.
Visible when Selection type is Use polygon. Expands the polygon boundary outward by this distance (in meters) before testing trace coordinates. Default: 1 m. Use a larger value to add a buffer zone around the polygon, ensuring that traces near the boundary are included even if their coordinates differ slightly from the polygon edge.
Visible when Selection type is Use polygon. These three checkboxes control which coordinate is tested against the polygon:
Select by SRC — test the source location. Default: off.
Select by RCV — test the receiver location. Default: off.
Select by BIN — test the bin (midpoint) location. Default: on. At least one of the three options must be enabled.
Visible when Selection type is Use trace headers mask. Connect the reference trace vector that serves as the mask. Traces in the input data whose selected header values match those in the mask are routed to the True branch (or False branch, depending on Mask type). Enable Use trace vector mask on disk to reference a large mask stored on disk rather than loading it entirely into memory.
Visible when Selection type is Use trace headers mask. Select the header fields used to identify and match traces between the input data and the mask. Add all headers that uniquely identify a trace (for example, SHOT_POINT and CHANNEL or INLINE_3D and CROSSLINE_3D).
Visible when Selection type is Use trace headers mask. Controls how mask matches are interpreted:
A*B (default) — traces present in both the input data and the mask are routed to the True branch (intersection).
A-B — traces present in the input data but absent from the mask are routed to the True branch (difference). Use this to process traces that were not included in a previous selection.
Visible when Selection type is Use trace headers mask. Sets the numerical tolerance used when comparing header values between the input data and the mask. Default: 0.001. Increase this value if header fields contain floating-point values that may differ slightly between datasets due to rounding.