analysis.estimate_mc_b_stability#
- seismostats.analysis.estimate_mc_b_stability(magnitudes: ~numpy.ndarray, delta_m: float, mcs_test: ~numpy.ndarray | None = None, stop_when_passed: bool = True, b_method: ~seismostats.analysis.bvalue.base.BValueEstimator = <class 'seismostats.analysis.bvalue.classic.ClassicBValueEstimator'>, stability_range: float = 0.5, verbose: bool = False, **kwargs) tuple[float | None, dict[str, Any]]#
Estimates the completeness magnitude (mc) using b-value stability.
The stability of the b-value is tested by default on half a magnitude unit (in line with the 5x0.1 in the orginial paper). Users can change the range for the stability test by changing the stability_range.
- Source:
- Cao, A., & Gao, S. S. (2002). Temporal variation of seismic b-values
beneath northeastern Japan island arc. Geophysical Research Letters, 29(9), 1–3. https://doi.org/10.1029/2001gl013775
- Woessner, J, and Stefan W. “Assessing the quality of earthquake
catalogues: Estimating the magnitude of completeness and its uncertainty.” Bulletin of the Seismological Society of America 95.2 (2005): 684-698.
- Parameters:
magnitudes – Array of magnitudes.
delta_m – Bin size of discretized magnitudes. Sample has to be rounded to bins beforehand.
mcs_test – Array of tested completeness magnitudes. If None, it will be generated automatically based on
magnitudesanddelta_m.stop_when_passed – Boolean that indicates whether to stop computation when a completeness magnitude (mc) has passed the test.
b_method – b-value estimator to use for b-value calculation.
stability_range – Magnitude range to consider for the stability test. Default compatible with the original definition of Cao & Gao 2002.
verbose – Boolean that indicates whether to print verbose output.
**kwargs – Additional parameters to be passed to the b-value estimator.
- Returns:
best_mc – Best magnitude of completeness estimate.
mc_info – Dictionary with additional information about the calculation of the best
mc, including:best_b_value: b-value associated with
best_mc.mcs_tested: Array of tested completeness magnitudes.
b_values_tested: Array of b-values associated to tested mcs.
diff_bs: Array of differences divided by std, associated with tested mcs. If a value is smaller than one, this means that the stability criterion is met.
Examples
>>> from seismostats.analysis import estimate_mc_b_stability >>> import numpy as np >>> magnitudes = np.array([2.3, 1.2, 1.5, 1.2, 1.7, 1.1, 1.2, ... 1.8, 1.6, 1.2, 1.5, 1.2, 1.7, 1.6, 1.1, ... 1.1, 1.2, 2.0, 1.1, 1.2, 1.1, 1.2, 1.6, ... 1.9, 1.3, 1.7, 1.3, 1.0, 1.2, 1.7, 1.3, ... 1.3, 1.1, 1.5, 1.4, 1.5] >>> delta_m = 0.1 >>> mc, _ = estimate_mc_b_stability(magntitudes,delta_m=delta_m) >>> mc 1.1
The mc_b_stability method returns additional information about the calculation of the best mc, like b-values tested and the array of differences. Those are returned by the method and can be used for further analysis.
>>> best_mc, mc_info = estimate_mc_b_stability(magnitudes, ... delta_m=delta_m) >>> (mc_info['b_values_tested'], mc_info['diff_bs']) ([np.float64(0.9571853220063772), np.float64(1.190298769977797)], [np.float64(2.2337527711215786), np.float64(0.9457747650207581)])