InversionResult#
- class evodcinv.InversionResult[source]#
- mean(dz, zmax=None)[source]#
Calculate mean velocity model.
- Parameters:
dz (scalar) – Maximum layer thickness (in km).
zmax (scalar or None, optional, default None) – Depth of last data point.
- property misfit#
Return best fit model misfit.
- property model#
Return best fit model.
- property n_runs#
Return number of runs.
- plot_curve(period, mode, wave, type, show='best', stride=1, n_jobs=-1, dc=0.001, dt=0.01, plot_args=None, ax=None)[source]#
Plot calculated data curves.
- Parameters:
period (array_like) – Periods (in s).
mode (int, optional, default 0) – Mode number (0 if fundamental).
wave (str {'love', 'rayleigh'}, optional, default 'rayleigh') – Wave type.
type (str {'phase', 'group', 'ellipticity'}, optional, default 'phase') – Data type.
show (str {'best', 'all'}, optional, default 'best') – Model to use to calculate data curves.
stride (int, optional, default 1) – Number of models to skip.
n_jobs (int, optional, default -1) – Number of CPU cores to calculate data curves in parallel. Supply -1 to use all available CPU cores. Only used if
show = "all"
.dc (scalar, optional, default 0.001) – Phase velocity increment for root finding.
dt (scalar, optional, default 0.01) – Frequency increment (%) for calculating group velocity.
plot_args (dict or None, optional, default None) – A dictionary of options to pass to plotting function.
ax (
matplotlib.pyplot.Axes
or None, optional, default None) – Matplotlib axes. If None, use current axes.
- plot_misfit(run='all', plot_args=None, ax=None)[source]#
Plot misfit as a function of iteration number.
- Parameters:
run (int or str {'all'}, optional, default 'all') – Run for which misfit to be plot.
plot_args (dict or None, optional, default None) – A dictionary of options to pass to plotting function.
ax (
matplotlib.pyplot.Axes
or None, optional, default None) – Matplotlib axes. If None, use current axes.
- plot_model(parameter, zmax=None, show='best', stride=1, dz=None, plot_args=None, ax=None)[source]#
Plot model parameter as a function of depth.
- Parameters:
parameter (str) –
Parameter to plot. Should be one of:
’velocity_p’ or ‘vp’
’velocity_s’ or ‘vs’
’density’ or ‘rho’
zmax (scalar or None, optional, default None) – Depth of last data point.
show (str {'best', 'all'}, optional, default 'best') – Model to plot.
stride (int, optional, default 1) – Number of models to skip.
dz (scalar or None, optional, default None) – Maximum layer thickness (in km).
plot_args (dict or None, optional, default None) – A dictionary of options to pass to plotting function.
ax (
matplotlib.pyplot.Axes
or None, optional, default None) – Matplotlib axes. If None, use current axes.
- threshold(value=None)[source]#
Apply a threshold filter.
Remove models that do not satisfy the threshold criterion.
- Parameters:
value (scalar or None, optional, default None) – Single value to be used for the data threshold. If None, remove invalid models (i.e., with misfit equal to Inf).
- Returns:
Inversion results with models that satisfy the threshold criterion.
- Return type:
- write(filename, file_format=None, **kwargs)[source]#
Write inversion results to a file.
- Parameters:
filename (str) – Output file name.
file_format (str {'h5', 'json'} or None, optional, default None) – Output file format.
- property x#
Return best fit model parameters.