analysis.AMorePositiveAValueEstimator.calculate#
- AMorePositiveAValueEstimator.calculate(magnitudes: ndarray, mc: float, delta_m: float, times: ndarray, b_value: float, scaling_factor: float | None = None, m_ref: float | None = None, dmc: float | None = None) float#
- Parameters:
magnitudes – Array of magnitudes.
mc – Completeness magnitude.
delta_m – Bin size of discretized magnitudes.
times – Array event times, in any format (datetime, float, etc.).
b_value – b-value of the Gutenberg-Richter law.
scaling_factor – Scaling factor. If given, this is used to normalize the number of observed events. For example: Volume or area of the region considered or length of the time interval, given in the unit of interest.
m_ref – Reference magnitude for which the a-value is estimated.
dmc – Margin by which the latter magnitude has to be larger than the former. If None, the default value is delta_m.
- Returns:
a_pos – a-value of the Gutenberg-Richter law.
Note – This is a-positive as defined by van der Elst and Page 2023
(JGR – Solid Earth, Vol 128, Issue 10).
Examples
>>> import numpy as np >>> from seismostats.analysis import ... AMorePositiveAValueEstimator >>> magnitudes = np.array([2.1, 2.3, 2.0, 2.0, 2.1, 2.2, 2.1, ... 2.3,2.0, 2.0]) >>> times = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) >>> my_estimator = AMorePositiveAValueEstimator() >>> a_value = my_estimator.calculate(magnitudes=magnitudes, ... mc=2.0, delta_m=0.1, times=times, b_value=1.0) >>> a_value 0.730070812347905