Creating a color map dynamically to highlight amplitude anomalies

This contextual script for Seismic Histogram Layers will create a color map for a Seismic Layer based on the distribution of samples displayed in the histogram.

The resulting color map is generated by adding more transitional colors to areas of the color map representing intervals of high sample frequency. This results in anomalous amplitudes being more prevalent in the Seismic Layer.

Here is an example of a screen before the script is executed:

As you can see from the histogram above, there are a large number of samples with amplitudes close to zero, with values on the extremes being far fewer in number. After selecting the "Highlight Anomalies.py" script from the contextual menu of the histogram plot, our screen will look like this:

As a large number of samples were in the middle of the distribution, the center of the color map became more prevalent. This leads to much more subtle differences in samples with amplitudes toward the middle of the distribution, and more extreme color changes in samples with more anomalous amplitudes.

You can download this script at the bottom of this page.

Here is the code for this script:

To use this script, put your Python script in your Python directory under a directory called Contextual_Histogram_Seismic_Layer.