openquake.hmtk.plotting.seismicity package

Submodules

openquake.hmtk.plotting.seismicity.catalogue_plots module

Collection of tools for plotting descriptive statistics of a catalogue

openquake.hmtk.plotting.seismicity.catalogue_plots.build_filename(filename, filetype='png', resolution=300)[source]

Uses the input properties to create the string of the filename

Parameters:
  • filename (str) – Name of the file
  • filetype (str) – Type of file
  • resolution (int) – DPI resolution of the output figure
openquake.hmtk.plotting.seismicity.catalogue_plots.get_completeness_adjusted_table(catalogue, completeness, dmag, end_year)[source]

Counts the number of earthquakes in each magnitude bin and normalises the rate to annual rates, taking into account the completeness

openquake.hmtk.plotting.seismicity.catalogue_plots.plot_depth_histogram(catalogue, bin_width, normalisation=False, bootstrap=None, filename=None, filetype='png', dpi=300)[source]

Creates a histogram of the depths in the catalogue

Parameters:
  • catalogue – Earthquake catalogue as instance of :class: openquake.hmtk.seismicity.catalogue.Catalogue
  • bin_width (float) – Width of the histogram for the depth bins
  • normalisation (bool) – Normalise the histogram to give output as PMF (True) or count (False)
  • bootstrap (int) – To sample depth uncertainty choose number of samples
openquake.hmtk.plotting.seismicity.catalogue_plots.plot_magnitude_depth_density(catalogue, mag_int, depth_int, logscale=False, normalisation=False, bootstrap=None, filename=None, filetype='png', dpi=300)[source]

Creates a density plot of the magnitude and depth distribution

Parameters:
  • catalogue – Earthquake catalogue as instance of :class: openquake.hmtk.seismicity.catalogue.Catalogue
  • mag_int (float) – Width of the histogram for the magnitude bins
  • depth_int (float) – Width of the histogram for the depth bins
  • logscale (bool) – Choose to scale the colours in a log-scale (True) or linear (False)
  • normalisation (bool) – Normalise the histogram to give output as PMF (True) or count (False)
  • bootstrap (int) – To sample magnitude and depth uncertainties choose number of samples
openquake.hmtk.plotting.seismicity.catalogue_plots.plot_magnitude_time_density(catalogue, mag_int, time_int, normalisation=False, logscale=True, bootstrap=None, filename=None, filetype='png', dpi=300, completeness=None)[source]

Creates a plot of magnitude-time density

Parameters:
  • catalogue – Earthquake catalogue as instance of :class: openquake.hmtk.seismicity.catalogue.Catalogue
  • mag_int (float) – Width of the histogram for the magnitude bins
  • time_int (float) – Width of the histogram for the time bin (in decimal years)
  • normalisation (bool) – Normalise the histogram to give output as PMF (True) or count (False)
  • bootstrap (int) – To sample magnitude and depth uncertainties choose number of samples
openquake.hmtk.plotting.seismicity.catalogue_plots.plot_magnitude_time_scatter(catalogue, plot_error=False, filename=None, filetype='png', dpi=300, fmt_string='o')[source]

Creates a simple scatter plot of magnitude with time

Parameters:
  • catalogue – Earthquake catalogue as instance of :class: openquake.hmtk.seismicity.catalogue.Catalogue
  • plot_error (bool) – Choose to plot error bars (True) or not (False)
  • fmt_string (str) – Symbology of plot
openquake.hmtk.plotting.seismicity.catalogue_plots.plot_observed_recurrence(catalogue, completeness, dmag, end_year=None, figure_size=(8.0, 6.0), filename=None, filetype='png', dpi=300)[source]

Plots the observed recurrence taking into account the completeness

Module contents