This tutorial demonstrates how to display a seismic image with different trace processor options. The Seismic Pipeline is the container of several trace processes organized in certain order and working on processing trace data (samples). A trace process usually represents an operation that can be performed on trace data (samples) and is applied trace by trace with several processes being added to the pipeline in the required order.
# Displaying Seismic Image without any Trace Processes
A seismic image can be created without applying any trace processes.
import { SeismicTraceProcessor } from "@int/geotoolkit/seismic/pipeline/processor/SeismicTraceProcessor.ts";
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { createPipeline, createReader, createWidget, sampleCount, sampleRate, traceCount } from "/src/code/Seismic/TraceProcesses/common.ts";
function createScene(canvas) {
const reader = createReader(sampleRate, sampleCount, traceCount);
const pipeline = createPipeline(reader);
pipeline.addTraceProcessor(new SeismicTraceProcessor({
"apply": true
}));
const widget = createWidget(pipeline);
const plot = new Plot({
"canvaselement": canvas,
"root": widget
});
widget.fitToBounds();
return plot;
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));
# Displaying Seismic with Taper Filter Process
This section shows how to apply the pass band and band reject filter. It is called TaperFilter and implements both pass band and band reject filtering on the traces. Four frequencies must be provided to specify the filter.
import { TaperFilterProcess } from "@int/geotoolkit/seismic/analysis/filters/TaperFilterProcess.ts";
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { createPipeline, createReader, createWidget, sampleCount, sampleRate, traceCount } from "/src/code/Seismic/TraceProcesses/common.ts";
function createScene(canvas) {
const reader = createReader(sampleRate, sampleCount, traceCount);
const pipeline = createPipeline(reader);
pipeline.addTraceProcessor(new TaperFilterProcess({
"apply": true,
"samplerate": sampleRate,
"passflag": true,
"f1": 0,
"f2": 15,
"f3": 16,
"f4": 30
}));
const widget = createWidget(pipeline);
const plot = new Plot({
"canvaselement": canvas,
"root": widget
});
widget.fitToBounds();
return plot;
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));
# Displaying Seismic with AGC Process
This trace example shows how to apply the automatic gain control (AGC) that automatically increases the amplitude of the trace samples. AGC applies a fixed length window, which slides in the original trace and computes the average amplitude of the window samples. The gain is calculated and used to normalize the sample in the center part of this window to a fixed value, usually 1.0. Basically the sample amplitude is divided by the average value. The window then slides down one sample and the next gain correction is computed. The process continues until the whole trace has been processed. In this code, a window size equals to a whole trace.
import { AGC, Units } from "@int/geotoolkit/seismic/pipeline/processor/AGC.ts";
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { createPipeline, createReader, createWidget, sampleCount, sampleRate, traceCount } from "/src/code/Seismic/TraceProcesses/common.ts";
function createScene(canvas) {
const reader = createReader(sampleRate, sampleCount, traceCount);
const pipeline = createPipeline(reader);
pipeline.addTraceProcessor(new AGC({
"apply": true,
"desiredaverage": 1,
"units": Units.Time,
"windowlength": sampleCount,
"agclength": sampleCount,
"startsample": 0,
"step": 1
}));
const widget = createWidget(pipeline);
const plot = new Plot({
"canvaselement": canvas,
"root": widget
});
widget.fitToBounds();
return plot;
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));
# Displaying Seismic with a Reverse Process
This example shows how to reverse the trace values in the pipeline.
import { Reverse } from "@int/geotoolkit/seismic/pipeline/processor/Reverse.ts";
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { createPipeline, createReader, createWidget, sampleCount, sampleRate, traceCount } from "/src/code/Seismic/TraceProcesses/common.ts";
function createScene(canvas) {
const reader = createReader(sampleRate, sampleCount, traceCount);
const pipeline = createPipeline(reader);
pipeline.addTraceProcessor(new Reverse({
"apply": true,
"reversed": true,
"inverted": true
}));
const widget = createWidget(pipeline);
const plot = new Plot({
"canvaselement": canvas,
"root": widget
});
widget.fitToBounds();
return plot;
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));
# Creating a Simple Trace Processor
The user can create trace processes and insert them to the pipeline (as well as remove it later). To implement a new process, extend SeismicTraceProcessor and override two methods: setState and process. The first is used to apply properties and the second to process trace samples. It receives trace samples and returns new processed trace samples.
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { createPipeline, createReader, createWidget, sampleCount, sampleRate, traceCount } from "/src/code/Seismic/TraceProcesses/common.ts";
import { SimpleTraceProcessor } from "/src/code/Seismic/TraceProcesses/simpleTraceProcessor.ts";
function createScene(canvas) {
const reader = createReader(sampleRate, sampleCount, traceCount);
const pipeline = createPipeline(reader);
pipeline.addTraceProcessor(new SimpleTraceProcessor({
"apply": true,
"inverted": true,
"scale": 10
}));
const widget = createWidget(pipeline);
const plot = new Plot({
"canvaselement": canvas,
"root": widget
});
widget.fitToBounds();
return plot;
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));
# Creating Noise Reduction Trace Processor
Here is an example of more comrehensive filter that reduce noise from traces by specified percent
Enable Noise Reduction
Reduced Noise in Percentage
10
10
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { createPipeline, createReader, createWidget, sampleCount, sampleRate, traceCount } from "/src/code/Seismic/TraceProcesses/common.ts";
import { NoiseReductionTraceProcessor } from "/src/code/Seismic/TraceProcesses/noiseReductionTraceProcessor.ts";
import { NormalizationType } from "@int/geotoolkit/seismic/pipeline/NormalizationType.ts";
import { InterpolationType } from "@int/geotoolkit/seismic/pipeline/InterpolationType.ts";
function createScene(canvas) {
const reader = createReader(sampleRate, sampleCount, traceCount);
const pipeline = createPipeline(reader).setOptions({
"normalization": {
"type": NormalizationType.Limits,
"limits": {
"min": -1,
"max": 1
}
},
"interpolation": {
"samples": {
"type": InterpolationType.Step
}
},
"plot": {
"type": {
"wiggle": false,
"interpolateddensity": false,
"positivefill": true,
"negativefill": true
}
}
}).addTraceProcessor(
new NoiseReductionTraceProcessor({
"apply": true,
"percentage": 10
})
);
const widget = createWidget(pipeline);
const plot = new Plot({
"canvaselement": canvas,
"root": widget
});
widget.fitToBounds();
return plot;
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));