This tutorial demonstrates easy steps to apply a normalization process and customize limits in the seismic pipeline before displaying. The default trace processes in the Seismic Pipeline are data normalization, interpolation, and rasterization in that order. Any additional processors need to be applied before normalization, so they are inserted between the seismic reader and data normalization. The Seismic API offers several types of Normalization as shown below. The user can also provide custom limits to make comparison between datasets easier.
# Normalization Types
The geotoolkit/seismic/pipeline/SeismicPipeline includes several types of normalization processes:
- Maximum: Uses the maximum amplitude of all samples in the all traces.
- TraceMaximum: Uses the maximum amplitude of all samples in the trace.
- Average number: Uses all traces average absolute value as a normalization amplitude.
- TraceAverage: Uses trace average absolute value as a normalization amplitude.
- RMS number: Uses the mean square of all samples in the all traces.
- TraceRMS: Uses the mean square of all samples in the trace.
- Limits: Uses custom normalization limits.
The code below shows how to apply the RMS normalization process on the seismic pipeline before displaying inside a seismic widget.
import { NormalizationType } from "@int/geotoolkit/seismic/pipeline/NormalizationType.ts";
import { SeismicColors } from "@int/geotoolkit/seismic/util/SeismicColors.ts";
import { SeismicPipeline } from "@int/geotoolkit/seismic/pipeline/SeismicPipeline.ts";
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { createSeismicReader, createWidget } from "/src/code/Seismic/Normalization/common.ts";
function createScene(canvas) {
const seismicReader = createSeismicReader();
const pipeline = new SeismicPipeline({
"name": "MemorySeismic",
"reader": seismicReader,
"statistics": seismicReader.getStatistics()
});
const colorProvider = SeismicColors.getDefault();
pipeline.setOptions({
"colors": {
"colormap": colorProvider.createNamedColorMap("RedWhiteBlue")
},
"normalization": {
"type": NormalizationType.RMS
},
"plot": {
"type": {
"wiggle": true,
"interpolateddensity": true
},
"decimationspacing": 5
}
});
const widget = createWidget(pipeline);
return new Plot({
"canvaselement": canvas,
"root": widget
});
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));
# Normalization Limits
The default limits of the normalization process is the entire seismic data range. The range can be customized very easily by changing the normalization 'limits' option (as shown in the code below).
import { NormalizationType } from "@int/geotoolkit/seismic/pipeline/NormalizationType.ts";
import { SeismicColors } from "@int/geotoolkit/seismic/util/SeismicColors.ts";
import { SeismicPipeline } from "@int/geotoolkit/seismic/pipeline/SeismicPipeline.ts";
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { createSeismicReader, createWidget } from "/src/code/Seismic/Normalization/common.ts";
function createScene(canvas) {
const seismicReader = createSeismicReader();
const pipeline = new SeismicPipeline({
"name": "MemorySeismic",
"reader": seismicReader,
"statistics": seismicReader.getStatistics()
});
const colorProvider = SeismicColors.getDefault();
pipeline.setOptions({
"colors": {
"colormap": colorProvider.createNamedColorMap("RedWhiteBlue")
},
"normalization": {
"type": NormalizationType.Limits,
"limits": {
"min": -2.5,
"max": 2.5
}
},
"plot": {
"type": {
"wiggle": true,
"interpolateddensity": true
},
"decimationspacing": 5
}
});
const widget = createWidget(pipeline);
return new Plot({
"canvaselement": canvas,
"root": widget
});
}
export { createScene };
createScene(document.querySelector('[ref="plot"]'));
# Colormap Range
It's possible to change normalization limits only for density, without wiggles. It can be done using SeismicPipeline.setRasterizationLimitsType(RasterizationLimitsType.ColorMap) and ColorMap.setRange.
import { NormalizationType } from "@int/geotoolkit/seismic/pipeline/NormalizationType.ts";
import { SeismicColors } from "@int/geotoolkit/seismic/util/SeismicColors.ts";
import { SeismicPipeline } from "@int/geotoolkit/seismic/pipeline/SeismicPipeline.ts";
import { Plot } from "@int/geotoolkit/plot/Plot.ts";
import { createSeismicReader, createWidget } from "/src/code/Seismic/Normalization/common.ts";
const colorProvider = SeismicColors.getDefault();
function createScene(canvas) {
const seismicReader = createSeismicReader();
const pipeline = new SeismicPipeline({
"name": "MemorySeismic",
"reader": seismicReader,
"statistics": seismicReader.getStatistics()
});
pipeline.setOptions({
"colors": {
"colormap": colorProvider.createNamedColorMap("RedWhiteBlue")
},
"normalization": {
"type": NormalizationType.Limits,
"limits": {
"min": -2.5,
"max": 2.5
}
},
"plot": {
"type": {
"wiggle": true,
"interpolateddensity": true
},
"decimationspacing": 5
}
});
const widget = createWidget(pipeline);
return new Plot({
"canvaselement": canvas,
"root": widget
});
}
function setNormalizationLimits(plot, min, max) {
plot.getRoot().getPipeline().setNormalization({
"type": NormalizationType.Limits,
"limits": {
"min": min,
"max": max
}
});
}
function setColormapRange(plot, min, max) {
plot.getRoot().getPipeline().getColorMap().setRange(min, max);
}
function setColormap(plot, colormap) {
plot.getRoot().getPipeline().setColorMap(colorProvider.createNamedColorMap(colormap));
}
function setRasterizationLimitsType(plot, rasterizationLimitsType) {
plot.getRoot().getPipeline().setRasterizationLimitsType(rasterizationLimitsType);
}
export { createScene, setColormap, setColormapRange, setNormalizationLimits, setRasterizationLimitsType };
createScene(document.querySelector('[ref="plot"]'));