# Trace Mix

 Description Combine samples from neighbouring traces, according to a user-defined weighting function. Module(s) Image Gather Processing Requirements Volume Related Header Maths, Volume maths, Volume Maths (simple) Works with 2D, Gathers

The Trace Mix process combines adjacent samples (in the same trace and from neighbouring traces) using the specified weights. It combines the samples according to the  selected mixing method.

## Workflow 1. In the Process tab, click the blue "+" icon and select New Process.
2. Select Trace Mix and type a name for the process.
3. In the details panel, select an input gather or 2D stack as Volume.

### Trace mixing method

1. Select the option for the Trace mixing method :
• Arithmetic Mean: Mean of the weighted samples.
• Median: Median of the weighted samples.
• Median Mean: Median Mean of the weighted samples.
• Median mean trim %: The % of samples to drop from the top and bottom of the set. A trim of 10% means that both the smallest 10% and the largest 10% are dropped (i.e. 20% of total samples).
• RMS: Root mean square average of the weighted samples.
• Variance: Variance of the weighted samples.
• Minimum: Minimum sample in the region.
• Maximum: Maximum sample in the region.
• Mode: Most common value in the region.

Notes:

• An odd number of weights must be provided.
• Negative weights are permitted. The samples are weighted, combined, then divided by the sum of the absolute value of the weights.
• Missing traces are skipped.
• Missing (NaN or 0.0) samples are ignored both when combining the samples and calculating the weight. i.e. it's as if the sample didn't exist. ### Window size

1. Define the Horizontal half-window size for the number of traces to be mixed. Twice as many weights plus one need to be provided (e.g. a half-window size of 2 requires 5 weights). If no horizontal mixing is required, set this value to 0 and enter a single weight.
2. Define the Vertical half-window size for the number of samples to be mixed. Similarly, twice as many weights plus one need to be provided. If no vertical mixing is required, set this value to 0 and enter a single weight.
3. For manual weights, enter a list of weights separated by commas. The number of weights required is 2*half-size+1.
4. Weights can be manually entered or generated by the following methods:
• Gaussian: Gaussian ramp with 1 in the middle sample.
• Linear: Linear ramp with 1 in the middle sample.
• Centre: Zeroes with with 1 in the middle sample.
• Flat: All 1s.

### Start and End time

1. For Start time, select whether to use a constant, constant and velocity, trace header, or trace header and velocity. If no start time is specified, the start of trace is used.
• If a droop velocity is provided, select to either use the OFFSET header or calculate offset from SX/SY/GX/GY.
• Input the length of the Start ramp (centred at the start time). If this is blank, or no start time is given, then no start ramp is used.
2. Specify a constant End time. If no end time is specified, the end of trace is used.
• Input the length of the End ramp (centred at the end time). If this is blank, or no end time is given, then no end ramp is used.

Optionally, select the check box to output difference instead of mixed traces.

## Examples

Trace mix output can be displayed in the gather view with an amplitude graph toggled on for QC purposes. ### Difference volume 