gwsumm.plot.builtin module

Definitions for the standard plots

class gwsumm.plot.builtin.CoherenceSpectrogramDataPlot(*args, **kwargs)[source]

Bases: SpectrogramDataPlot

DataPlot a Spectrogram of the coherence between two channels

data = 'coherence-spectrogram'
defaults = {'animation.convert_args': ['-layers', 'OptimizePlus'], 'axes.axisbelow': False, 'axes.edgecolor': 'gray', 'axes.formatter.limits': [-3, 4], 'axes.formatter.use_mathtext': True, 'axes.grid': True, 'axes.labelpad': 5.0, 'axes.labelsize': 18.0, 'axes.titlesize': 22.0, 'clim': None, 'colorlabel': None, 'contour.algorithm': 'mpl2014', 'figure.figsize': [12.0, 6.0], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'font.sans-serif': ['Roboto'], 'format': None, 'grid.alpha': 0.5, 'grid.linewidth': 0.5, 'legend.edgecolor': 'inherit', 'legend.fancybox': False, 'legend.fontsize': 10.0, 'legend.handlelength': 1.0, 'legend.numpoints': 2, 'logcolor': False, 'mathtext.bf': 'Roboto', 'mathtext.cal': 'Calligraffiti', 'mathtext.fontset': 'custom', 'mathtext.it': 'Roboto:italic', 'mathtext.rm': 'Roboto', 'mathtext.sf': 'Roboto', 'mathtext.tt': 'Roboto Slab', 'rasterized': True, 'ratio': None, 'savefig.transparent': True, 'svg.fonttype': 'none', 'text.parse_math': True, 'xscale': 'auto-gps', 'xtick.labelsize': 14.0, 'ylabel': 'Frequency [Hz]', 'yscale': 'log', 'ytick.labelsize': 14.0}

dict of default plotting kwargs

type = 'coherence-spectrogram'

name for DataPlot subclass

class gwsumm.plot.builtin.CoherenceSpectrumDataPlot(channels, start, end, state=None, outdir='.', tag=None, pid=None, href=None, new=True, all_data=False, read=True, fileformat='png', caption=None, **pargs)[source]

Bases: SpectrumDataPlot

Coherence pectrum plot for a SummaryTab

data = 'coherence-spectrogram'
defaults = {'alpha': 0.1, 'animation.convert_args': ['-layers', 'OptimizePlus'], 'axes.axisbelow': False, 'axes.edgecolor': 'gray', 'axes.formatter.limits': [-3, 4], 'axes.formatter.use_mathtext': True, 'axes.grid': True, 'axes.labelpad': 5.0, 'axes.labelsize': 18.0, 'axes.titlesize': 22.0, 'contour.algorithm': 'mpl2014', 'figure.figsize': [12.0, 6.0], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'font.sans-serif': ['Roboto'], 'format': None, 'grid.alpha': 0.5, 'grid.linewidth': 0.5, 'legend.edgecolor': 'inherit', 'legend.fancybox': False, 'legend.fontsize': 10.0, 'legend.handlelength': 1.0, 'legend.numpoints': 2, 'mathtext.bf': 'Roboto', 'mathtext.cal': 'Calligraffiti', 'mathtext.fontset': 'custom', 'mathtext.it': 'Roboto:italic', 'mathtext.rm': 'Roboto', 'mathtext.sf': 'Roboto', 'mathtext.tt': 'Roboto Slab', 'no-percentiles': False, 'reference-linestyle': '--', 'savefig.transparent': True, 'svg.fonttype': 'none', 'text.parse_math': True, 'xscale': 'log', 'xtick.labelsize': 14.0, 'yscale': 'linear', 'ytick.labelsize': 14.0, 'zorder': 1}

dict of default plotting kwargs

get_channel_groups()[source]

Hi-jacked method to return pairs of channels

For the CoherenceSpectrumDataPlot this method is only used in determining how to separate lists of plotting argument given by the user.

type = 'coherence-spectrum'

name for DataPlot subclass

class gwsumm.plot.builtin.RayleighSpectrogramDataPlot(*args, **kwargs)[source]

Bases: SpectrogramDataPlot

Rayleigh statistic versino of SpectrogramDataPlot

data = 'rayleigh-spectrogram'
defaults = {'animation.convert_args': ['-layers', 'OptimizePlus'], 'axes.axisbelow': False, 'axes.edgecolor': 'gray', 'axes.formatter.limits': [-3, 4], 'axes.formatter.use_mathtext': True, 'axes.grid': True, 'axes.labelpad': 5.0, 'axes.labelsize': 18.0, 'axes.titlesize': 22.0, 'clim': [0.25, 4], 'cmap': 'BrBG_r', 'colorlabel': 'Rayleigh statistic', 'contour.algorithm': 'mpl2014', 'figure.figsize': [12.0, 6.0], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'font.sans-serif': ['Roboto'], 'format': 'rayleigh', 'grid.alpha': 0.5, 'grid.linewidth': 0.5, 'legend.edgecolor': 'inherit', 'legend.fancybox': False, 'legend.fontsize': 10.0, 'legend.handlelength': 1.0, 'legend.numpoints': 2, 'mathtext.bf': 'Roboto', 'mathtext.cal': 'Calligraffiti', 'mathtext.fontset': 'custom', 'mathtext.it': 'Roboto:italic', 'mathtext.rm': 'Roboto', 'mathtext.sf': 'Roboto', 'mathtext.tt': 'Roboto Slab', 'rasterized': True, 'ratio': None, 'savefig.transparent': True, 'svg.fonttype': 'none', 'text.parse_math': True, 'xscale': 'auto-gps', 'xtick.labelsize': 14.0, 'ylabel': 'Frequency [Hz]', 'yscale': 'log', 'ytick.labelsize': 14.0}

dict of default plotting kwargs

type = 'rayleigh-spectrogram'

name for DataPlot subclass

class gwsumm.plot.builtin.RayleighSpectrumDataPlot(channels, start, end, state=None, outdir='.', tag=None, pid=None, href=None, new=True, all_data=False, read=True, fileformat='png', caption=None, **pargs)[source]

Bases: SpectrumDataPlot

Rayleigh statistic versino of SpectrumDataPlot

data = 'rayleigh-spectrum'
defaults = {'alpha': 0.1, 'format': 'rayleigh', 'no-percentiles': True, 'reference-linestyle': '--', 'xscale': 'log', 'yscale': 'log', 'zorder': 1}

dict of default plotting kwargs

type = 'rayleigh-spectrum'

name for DataPlot subclass

class gwsumm.plot.builtin.SpectralVarianceDataPlot(channels, *args, **kwargs)[source]

Bases: SpectrumDataPlot

SpectralVariance histogram plot for a DataTab

data = 'spectrogram'
defaults = {'animation.convert_args': ['-layers', 'OptimizePlus'], 'axes.axisbelow': False, 'axes.edgecolor': 'gray', 'axes.formatter.limits': [-3, 4], 'axes.formatter.use_mathtext': True, 'axes.grid': True, 'axes.labelpad': 5.0, 'axes.labelsize': 18.0, 'axes.titlesize': 22.0, 'contour.algorithm': 'mpl2014', 'figure.figsize': [12.0, 6.0], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'font.sans-serif': ['Roboto'], 'format': None, 'grid.alpha': 0.5, 'grid.linewidth': 0.5, 'legend.edgecolor': 'inherit', 'legend.fancybox': False, 'legend.fontsize': 10.0, 'legend.handlelength': 1.0, 'legend.numpoints': 2, 'log': True, 'mathtext.bf': 'Roboto', 'mathtext.cal': 'Calligraffiti', 'mathtext.fontset': 'custom', 'mathtext.it': 'Roboto:italic', 'mathtext.rm': 'Roboto', 'mathtext.sf': 'Roboto', 'mathtext.tt': 'Roboto Slab', 'nbins': 100, 'no-percentiles': False, 'reference-linestyle': '--', 'savefig.transparent': True, 'svg.fonttype': 'none', 'text.parse_math': True, 'xscale': 'log', 'xtick.labelsize': 14.0, 'yscale': 'log', 'ytick.labelsize': 14.0, 'zorder': 1}

dict of default plotting kwargs

parse_variance_kwargs()[source]
type = 'variance'

name for DataPlot subclass

class gwsumm.plot.builtin.SpectrogramDataPlot(*args, **kwargs)[source]

Bases: TimeSeriesDataPlot

DataPlot a Spectrogram

data = 'spectrogram'
defaults = {'animation.convert_args': ['-layers', 'OptimizePlus'], 'axes.axisbelow': False, 'axes.edgecolor': 'gray', 'axes.formatter.limits': [-3, 4], 'axes.formatter.use_mathtext': True, 'axes.grid': True, 'axes.labelpad': 5.0, 'axes.labelsize': 18.0, 'axes.titlesize': 22.0, 'contour.algorithm': 'mpl2014', 'figure.figsize': [12.0, 6.0], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'font.sans-serif': ['Roboto'], 'format': None, 'grid.alpha': 0.5, 'grid.linewidth': 0.5, 'legend.edgecolor': 'inherit', 'legend.fancybox': False, 'legend.fontsize': 10.0, 'legend.handlelength': 1.0, 'legend.numpoints': 2, 'mathtext.bf': 'Roboto', 'mathtext.cal': 'Calligraffiti', 'mathtext.fontset': 'custom', 'mathtext.it': 'Roboto:italic', 'mathtext.rm': 'Roboto', 'mathtext.sf': 'Roboto', 'mathtext.tt': 'Roboto Slab', 'rasterized': True, 'ratio': None, 'savefig.transparent': True, 'svg.fonttype': 'none', 'text.parse_math': True, 'xscale': 'auto-gps', 'xtick.labelsize': 14.0, 'ylabel': 'Frequency [Hz]', 'yscale': 'log', 'ytick.labelsize': 14.0}

dict of default plotting kwargs

draw()[source]

Read in all necessary data, and generate the figure.

get_ratio(specgrams)[source]
property pid
type = 'spectrogram'

name for DataPlot subclass

class gwsumm.plot.builtin.SpectrumDataPlot(channels, start, end, state=None, outdir='.', tag=None, pid=None, href=None, new=True, all_data=False, read=True, fileformat='png', caption=None, **pargs)[source]

Bases: DataPlot

Spectrum plot for a SummaryTab

data = 'spectrum'
defaults = {'animation.convert_args': ['-layers', 'OptimizePlus'], 'axes.axisbelow': False, 'axes.edgecolor': 'gray', 'axes.formatter.limits': [-3, 4], 'axes.formatter.use_mathtext': True, 'axes.grid': True, 'axes.labelpad': 5.0, 'axes.labelsize': 18.0, 'axes.titlesize': 22.0, 'contour.algorithm': 'mpl2014', 'figure.figsize': [12.0, 6.0], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'font.sans-serif': ['Roboto'], 'format': None, 'grid.alpha': 0.5, 'grid.linewidth': 0.5, 'legend.edgecolor': 'inherit', 'legend.fancybox': False, 'legend.fontsize': 10.0, 'legend.handlelength': 1.0, 'legend.numpoints': 2, 'mathtext.bf': 'Roboto', 'mathtext.cal': 'Calligraffiti', 'mathtext.fontset': 'custom', 'mathtext.it': 'Roboto:italic', 'mathtext.rm': 'Roboto', 'mathtext.sf': 'Roboto', 'mathtext.tt': 'Roboto Slab', 'no-percentiles': False, 'reference-linestyle': '--', 'savefig.transparent': True, 'svg.fonttype': 'none', 'text.parse_math': True, 'xscale': 'log', 'xtick.labelsize': 14.0, 'yscale': 'log', 'ytick.labelsize': 14.0, 'zorder': 1}

dict of default plotting kwargs

draw()[source]

Process all data and generate the output file for this SummaryPlot.

This function should be provided by all sub-classes, and should take no arguments.

parse_references(prefix='reference(\\d+)?\\Z')[source]

Parse parameters for displaying one or more reference traces

type = 'spectrum'

name for DataPlot subclass

class gwsumm.plot.builtin.TimeSeriesDataPlot(*args, **kwargs)[source]

Bases: DataLabelSvgMixin, DataPlot

DataPlot of some TimeSeries data.

add_future_shade(gps=None, facecolor='gray', alpha=0.1, **kwargs)[source]

Shade those parts of the figure that display times in the future

add_state_segments(ax, visible=None, **kwargs)[source]

Add an Axes below the given ax displaying the SummaryState for this TimeSeriesDataPlot.

Parameters:
axAxes

the set of Axes below which to display the state segments.

visiblebool, optional

whether or not to display the axes, or just make space for them, default is None, meaning a dynamic choice based on the state

**kwargs

other keyword arguments will be passed to the :meth:`~gwpy.plot.Plot.add_segments_bar` method.

data = 'timeseries'
defaults = {'animation.convert_args': ['-layers', 'OptimizePlus'], 'axes.axisbelow': False, 'axes.edgecolor': 'gray', 'axes.formatter.limits': [-3, 4], 'axes.formatter.use_mathtext': True, 'axes.grid': True, 'axes.labelpad': 5.0, 'axes.labelsize': 18.0, 'axes.titlesize': 22.0, 'contour.algorithm': 'mpl2014', 'figure.figsize': [12.0, 6.0], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'font.sans-serif': ['Roboto'], 'grid.alpha': 0.5, 'grid.linewidth': 0.5, 'legend.edgecolor': 'inherit', 'legend.fancybox': False, 'legend.fontsize': 10.0, 'legend.handlelength': 1.0, 'legend.numpoints': 2, 'mathtext.bf': 'Roboto', 'mathtext.cal': 'Calligraffiti', 'mathtext.fontset': 'custom', 'mathtext.it': 'Roboto:italic', 'mathtext.rm': 'Roboto', 'mathtext.sf': 'Roboto', 'mathtext.tt': 'Roboto Slab', 'savefig.transparent': True, 'svg.fonttype': 'none', 'text.parse_math': True, 'xscale': 'auto-gps', 'xtick.labelsize': 14.0, 'yscale': 'linear', 'ytick.labelsize': 14.0}

dict of default plotting kwargs

draw(outputfile=None)[source]

Read in all necessary data, and generate the figure.

init_plot(*args, **kwargs)[source]

Initialise the Figure and Axes objects for this TimeSeriesDataPlot.

type = 'timeseries'

name for DataPlot subclass

class gwsumm.plot.builtin.TimeSeriesHistogram2dDataPlot(*args, **kwargs)[source]

Bases: TimeSeriesHistogramPlot

DataPlot of the 2D histogram of two TimeSeries.

data = 'timeseries'
defaults = {'alpha': None, 'animation.convert_args': ['-layers', 'OptimizePlus'], 'axes.axisbelow': False, 'axes.edgecolor': 'gray', 'axes.formatter.limits': [-3, 4], 'axes.formatter.use_mathtext': True, 'axes.grid': True, 'axes.labelpad': 5.0, 'axes.labelsize': 18.0, 'axes.titlesize': 22.0, 'bins': 100, 'bottom': 1e-300, 'cmap': 'inferno_r', 'contour.algorithm': 'mpl2014', 'edgecolors': 'None', 'figure.figsize': [12.0, 6.0], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'font.sans-serif': ['Roboto'], 'grid': 'both', 'grid.alpha': 0.5, 'grid.linewidth': 0.5, 'histtype': 'stepfilled', 'legend.edgecolor': 'inherit', 'legend.fancybox': False, 'legend.fontsize': 10.0, 'legend.handlelength': 1.0, 'legend.numpoints': 2, 'log': True, 'mathtext.bf': 'Roboto', 'mathtext.cal': 'Calligraffiti', 'mathtext.fontset': 'custom', 'mathtext.it': 'Roboto:italic', 'mathtext.rm': 'Roboto', 'mathtext.sf': 'Roboto', 'mathtext.tt': 'Roboto Slab', 'normed': True, 'rwidth': 1, 'savefig.transparent': True, 'shading': 'flat', 'svg.fonttype': 'none', 'text.parse_math': True, 'xtick.labelsize': 14.0, 'ylabel': 'Rate [Hz]', 'yscale': 'linear', 'ytick.labelsize': 14.0}

dict of default plotting kwargs

draw(outputfile=None)[source]

Get data and generate the figure.

parse_hist_kwargs(**defaults)[source]
parse_pcmesh_kwargs(**defaults)[source]
type = 'histogram2d'

name for DataPlot subclass

class gwsumm.plot.builtin.TimeSeriesHistogramPlot(channels, start, end, state=None, outdir='.', tag=None, pid=None, href=None, new=True, all_data=False, read=True, fileformat='png', caption=None, **pargs)[source]

Bases: DataPlot

HistogramPlot from a Series

data = 'timeseries'
defaults = {'animation.convert_args': ['-layers', 'OptimizePlus'], 'axes.axisbelow': False, 'axes.edgecolor': 'gray', 'axes.formatter.limits': [-3, 4], 'axes.formatter.use_mathtext': True, 'axes.grid': True, 'axes.labelpad': 5.0, 'axes.labelsize': 18.0, 'axes.titlesize': 22.0, 'bottom': 1e-300, 'contour.algorithm': 'mpl2014', 'figure.figsize': [12.0, 6.0], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'font.sans-serif': ['Roboto'], 'grid.alpha': 0.5, 'grid.linewidth': 0.5, 'histtype': 'stepfilled', 'legend.edgecolor': 'inherit', 'legend.fancybox': False, 'legend.fontsize': 10.0, 'legend.handlelength': 1.0, 'legend.numpoints': 2, 'log': True, 'mathtext.bf': 'Roboto', 'mathtext.cal': 'Calligraffiti', 'mathtext.fontset': 'custom', 'mathtext.it': 'Roboto:italic', 'mathtext.rm': 'Roboto', 'mathtext.sf': 'Roboto', 'mathtext.tt': 'Roboto Slab', 'rwidth': 1, 'savefig.transparent': True, 'svg.fonttype': 'none', 'text.parse_math': True, 'xtick.labelsize': 14.0, 'ylabel': 'Rate [Hz]', 'ytick.labelsize': 14.0}

dict of default plotting kwargs

draw(outputfile=None)[source]

Get data and generate the figure.

init_plot(geometry=None, **kwargs)[source]

Initialise the Figure and Axes objects for this TimeSeriesDataPlot.

parse_plot_kwargs(**defaults)[source]

Pop keyword arguments for Axes.plot from the pargs for this Plot

type = 'histogram'

name for DataPlot subclass

gwsumm.plot.builtin.undo_demodulation(spec, channel, limits=None)[source]