pyatoa.visuals.improve_wave
Functions to create a figure showing progressive waveform improvement over the course of a seismic inversion.
Show the changes in synthetic waveforms with progressive model updates. Each individual model gets its on row in the plot.
Module Contents
Classes
A class to plot waveform improvement for a given ASDFDataSet |
Attributes
- class pyatoa.visuals.improve_wave.ImproveWave[source]
A class to plot waveform improvement for a given ASDFDataSet
ds = pyasdf.ASDFDataSet("dataset.h5") wi = WaveformImprovement(ds) wi.gather("NZ.BFZ", 10, 30) wi.plot() wi.plot("NZ.KNZ", 8, 30)
- gather(sta, min_period, max_period, rotate_to_rtz=False, fix_windows=False, pyflex_preset=False)[source]
Parse dataset for given station, gather observed and synthetic data, preprocess data and return as stream objects.
- Parameters:
sta (str) – station to gather data for
min_period (float) – minimum filter period in seconds
max_period (float) – maximum filter period in seconds
rotate_to_rtz (bool) – rotate components from NEZ to RTZ Config. if False, instrument response will be removed from obs.
fix_windows (bool) – dont recalculate windows when gathering
pyflex_preset (str) – overwrite the pyflex preset provided in the Config object
- gather_simple(event, sta, min_period, max_period, path_dict=None, component=None)[source]
Manually set the model values based on inspection of the Inspector Don’t return windows or anything, keep it simple
- setup_plot(nrows, ncols, **kwargs)[source]
Dynamically set up plots according to number_of given Returns a list of lists of axes objects e.g. axes[i][j] gives the ith column and the jth row
- plot(sta=None, event_id=None, min_period=None, max_period=None, plot_windows=False, trace_length=None, show=True, save=False, **kwargs)[source]
Plot waveforms iterative based on model updates
- Parameters:
sta (str) – station to gather data for, if None, skips gathering assuming data has already been gathered
min_period (float) – minimum filter period for waveforms
max_period (float) – maximum filter period for waveforms
plot_windows (bool) – plot misfit windows above waveforms
trace_length (list of floats) – [trace_start, trace_end] will be used to set the x limit on the waveform data. If none, no xlim will be set
show (bool) – Show the plot or do not
save (str) – if given, save the figure to this path
- gather_simple(models, event_id, sta, component, min_period, max_period)[source]
Gather waveforms from manually input model values, usually determined by using the Inspector class
- Parameters:
;type sta: str :param sta: station id to gather data for :type min_period: float :param min_period: period to filter data at :type max_period: float :param max_period: period to filter data at