analysis.ClassicAValueEstimator.calculate#
- ClassicAValueEstimator.calculate(magnitudes: ndarray, mc: float, delta_m: float, scaling_factor: float | None = None, m_ref: float | None = None, b_value: float | None = None) float#
Returns the a-value of the Gutenberg-Richter (GR) law.
- Parameters:
magnitudes – Array of magnitudes.
mc – Completeness magnitude.
delta_m – Bin size of discretized magnitudes.
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.
b_value – b-value of the Gutenberg-Richter law. Only relevant when m_ref is not None.
- Returns:
a – a-value of the Gutenberg-Richter law.
Examples
>>> import numpy as np >>> from seismostats.analysis import ClassicAValueEstimator >>> magnitudes = np.array([2.1, 2.3, 2.0, 2.0, 2.1, 2.2, 2.1, ... 2.3, 2.0, 2.0]) >>> my_estimator = ClassicAValueEstimator() >>> a_value = my_estimator.calculate( ... magnitudes=magnitudes, mc=2.0, delta_m=0.1) >>> a_value 1.0