diff --git a/seismostats/analysis/estimate_a.py b/seismostats/analysis/estimate_a.py index 16c608a..bd213ab 100644 --- a/seismostats/analysis/estimate_a.py +++ b/seismostats/analysis/estimate_a.py @@ -10,17 +10,19 @@ def estimate_a(magnitudes: np.ndarray, mc: float | None = None, m_ref: float | None = None, b_value: float | None = None, - T: float | None = None, + scaling_factor: float | None = None, ) -> float: """Estimate the a-value of the Gutenberg-Richter (GR) law. N = 10 ** (a - b * (m_ref - mc)) (1) where N is the number of events with magnitude greater than m_ref, which - occurred in the time interval T. T should be given as a float- to begit - precise, it should be the time interval scaled to the time-unit of interest. - E.g., if the number of events per year are of interest, T should be the - number of years in which the events occurred. + occurred in the timeframe of the catalogue. The scaling_factor should be + given as a float- to be precise, and most of the time stands for the time + interval scaled to the time-unit of interest. E.g., if the number of events + per year are of interest, scaling_factor should be the number of years in + which the events occurred. The a-value can also be scaled by volume or area + using scaling_factor. If only the magnitudes are given, the a-value is estimated at the lowest magnitude in the sample, with mc = min(magnitudes). Eq. (1) then simplifies @@ -33,8 +35,9 @@ def estimate_a(magnitudes: np.ndarray, m_ref: Reference magnitude for which the a-value is estimated. If None, the a-value is estimated at mc. b_value: b-value of the Gutenberg-Richter distribution - T: Relative length of the time interval in which the events - occurred (relative to the time unit of interest, e.g., years) + scaling_factor: Scaling factor. For example: Relative length of the time + interval in which the events occurred (relative to the time unit + of interest, e.g., years) Returns: a: a-value of the Gutenberg-Richter distribution @@ -57,8 +60,8 @@ def estimate_a(magnitudes: np.ndarray, "b_value must be provided if m_ref is given") a = a - b_value * (m_ref - mc) - # scale to reference time-interval - if T is not None: - a = a - np.log10(T) + # scale to reference time-interval / volume / area ... + if scaling_factor is not None: + a = a - np.log10(scaling_factor) return a