Catalog.estimate_mc_b_stability#

Catalog.estimate_mc_b_stability(delta_m: float | None = None, 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:

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.

Attention

Catalog.mc will be replaced by the best_mc return value.

Parameters:
  • delta_m – Bin size of discretized magnitudes. Catalog needs to be rounded to bins beforehand. Either given as parameter or taken from the object attribute.

  • mcs_test – Array of tested completeness magnitudes. If None, it will be generated automatically based on the magnitudes and delta_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 import Catalog
>>> cat = Catalog.from_dict({
...     'magnitude': [2.3, 1.2, 1.5, 1.2, 1.7, 1.1, 1.2, 1.5,
...                   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]})
>>> cat.delta_m = 0.1
>>> cat.estimate_mc_b_stability()
>>> cat.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 = cat.estimate_mc_b_stability()
>>> (mc_info['mcs_tested'], mc_info['diff_bs'])

(array([1. , 1.1]), [2.23375277112158, 0.9457747650207577])