analysis.b_significant_1D#
- seismostats.analysis.b_significant_1D(magnitudes: ~numpy.ndarray, mc: float | ~numpy.ndarray, delta_m: float, times: ~numpy.ndarray, n_m: int, min_num: int = 2, method: ~seismostats.analysis.bvalue.base.BValueEstimator | ~seismostats.analysis.avalue.base.AValueEstimator = <class 'seismostats.analysis.bvalue.classic.ClassicBValueEstimator'>, x_variable: ~numpy.ndarray | None = None, conservative: bool = True, **kwargs) tuple[float, float, float, float]#
Estimates the significance of variation of b-values (or a-values) along a one-dimensional series of events.
The function outputs the p-value of the null hypothesis that the true b-value (a-value) is constant, together with the mean autocorrelation (MAC) and its mean and standard deviation. The method is based on the assumption the MAC is normally distributed under H0, which is true for a large enough number of subsamples. As a lower limit, no less than 25 subsamples (which can be estimated by len(magnitudes) / n_m) should be used.
- Parameters:
magnitudes – Array of magnitudes of the events. They are assumed to be ordered along the dimension of interest (e.g. time or depth).
mc – Completeness magnitude. If a single value is provided, it is used for all magnitudes. Otherwise, the individual completeness of each magnitude can be provided. This will be used to filter the magnitudes.
delta_m – Bin size of discretized magnitudes.
times – Array of times of the events. Only necessary if the a positive method (e.g. BPositiveBValueEstimator) is applied.
n_m – Number of magnitudes in each partition.
min_num – Minimum number of events from which a b-value is estimated.
method – AValueEstimator or BValueEstimator class to use for calculation.
x_variable – Values of the dimension of interest. If given, this will be used to sort the magnitudes.
conservative – If True, the conservative estimate of the standard deviation of the autocorrelation is used, i.e., gamma = 1. If False (default), the non-conservative estimate is used, i.e., gamma = 0.81 (see Mirwald et al., SRL (2024)).
**kwargs – Additional parameters to be passed to the b-value estimation method.
- Returns:
p_value – p-value of the null hypothesis that the b-values are constant.
mac – Mean autocorrelation.
mu_mac – Expected mean autocorrelation under H0.
std_mac – Standard deviation of the mean autocorrelation under H0. (i.e., constant b-value). Here, the conservatice estimate is used - in case the non-conservative estimate is needed, the standard deviation can be mulitplied by the factor gamma = 0.81 given by Mirwald et al., SRL (2024).
See also
To plot the time series, use
seismostats.plots.plot_b_series_constant_nm(). To plot the mean autocorrelation for different n_m, useseismostats.plots.plot_b_significant_1D()