analysis.UtsuBValueEstimator.calculate#
- UtsuBValueEstimator.calculate(magnitudes: ndarray | list, mc: float, delta_m: float, weights: ndarray | list | None = None) float#
Calculates the b-value of the Gutenberg-Richter (GR) law.
- Parameters:
magnitudes – Array of magnitudes.
mc – Completeness magnitude.
delta_m – Bin size of discretized magnitudes.
weights – Array of weights for the magnitudes.
- Returns:
b – b-value of the Gutenberg-Richter law.
Examples
>>> import numpy as np >>> from seismostats.analysis import ClassicBValueEstimator >>> magnitudes = np.array([2. , 2.5, 2.1, 2.2, 2.5, 2.2, 2.6, ... 2.3, 2.7, 2.2, 2.4, 2. , 2.7, 2.2, ... 2.3, 2.1, 2.4, 2.6, 2.2, 2.2, 2.7, ... 2.4, 2.2, 2.5]) >>> my_estimator = ClassicBValueEstimator() >>> b_value = calculate( ... magnitudes=magnitudes, mc=2.0, delta_m=0.1) >>> b_value 1.114920128810535 # depending on the method used