Utility function to plot physically gridded (seismic) data in the time and frequency domain and model parameters and perturbations. The functions currently only supports 2D data.
This is a small package that I started to make my life easier visualizing data and results easily. Not all functionalities are tested and some of the features may need additional options for better images. This package is under development and welcomes contributions through Issues, Pull Requests or Discussions
This package implement four main functions that rely on a base _plot_with_units internal function.
plot_simageto plot a 2D seismic image (i.e RTM)plot_sdatato plot 2D seismic data such as a shot recordplot_fsliceto plot a 2D frequency slice of seismic data.plot_velocityto plot a 2D velocity model.wiggle_plotto make a 2D wiggle plot of a seismic data.
The functions plot_simage, plot_sdata and plot_velocity support abstract object with meta-data containing the grid spacing. For example, you can plot a 2D JUDI PhysicalParameter either via plot_velocity(p.data, p.d) or directly via plot_velocity(p) that will extract the data and spacing automatically. While this supports JUDI since we are using it extensively, this package does not depend on it and only expect a Julia structure as an input (when the spacing is not specified) containing a .d attribute with the grid spacing. We show in the simple example how to setup such a simple structure.
The expected inputs are:
plot_simage(array, tuple; kw...)orplot_simage(structure)withstrucutre.dcontaining the grid spacing andstructure.datacontaining the 2D array.plot_velocity(array, tuple; kw...)orplot_velocity(structure)withstrucutre.dcontaining the grid spacing andstructure.datacontaining the 2D array.plot_sdata(array, tuple; kw...)orplot_sdata(structure)withstrucutre.dtcontaining the time sampling rate andstructure.dcontaining the receiver spacing (uniform sampling is assumed at the time) andstructure.datacontaining the 2D array.wiggle_plot(array, xrec, time_axis; kw...). In this case,xrec, time_axisare optional and wil default to1:size(array, 2),1:size(array, 1)respectively.
and you can check the docstring (julia ?) for additional information on the optional keyword arguments.
The colormap support is extensive as this uses three sources:
matplotlibstandard colormaps.- ColorShemes.jl that implements a variery of colormaps from different packages including Matplotlib, Seaborn, GNUPlot, colorcet(Collection of perceptually accurate colormaps). You can provide the chosen colormap as a kewyword , i.e
plot_simage(array, tuple; cmap=:jet). - colorcet perceptually accurate colormaps that are available through their colorcet names (i.e
cet_rainbow4for a perceptually accuratejetcolormap). - seismc a set of seismic colormap usable via
seiscm(name)wherenameis one of the four supported mapsseismic, bwr, frequency, phase
All functionality, with the exeption of wiggle_plot accept the keyword argument cmap, i.e plot_velocity(array, spacing; cmap=:vik).
This package is developed and maintained by Mathias Louboutinmlouboutin3@gatech.edu and the ML4Seismic Lab at Georgia Institute of Technology.