Decluster#
- bruces.decluster.decluster(catalog, algorithm='nearest-neighbor', return_indices=False, **kwargs)[source]#
Decluster earthquake catalog.
- Parameters:
catalog (
bruces.Catalog
) – Earthquake catalog.algorithm (str, optional, default 'nearest-neighbor') –
Declustering algorithm:
’gardner-knopoff’: Gardner-Knopoff’s method (after Gardner and Knopoff, 1974)
’nearest-neighbor’: nearest-neighbor algorithm (after Zaliapin and Ben-Zion, 2008)
’reasenberg’: Reasenberg’s method (after Reasenberg, 1985)
return_indices (bool, optional, default False) – If True, return indices of background events instead of declustered catalog.
window (str {'default', 'gruenthal', 'uhrhammer'}, optional, default 'default') –
Only if
algorithm = "gardner-knopoff"
. Distance and time windows:’default’: Gardner and Knopoff (1974)
’gruenthal’: personnal communication (see van Stiphout et al., 2012)
’uhrhammer’: Uhrhammer (1986)
method (str, optional, default 'gaussian-mixture') –
Only if
algorithm = "nearest-neighbor"
. Declustering method:’gaussian-mixture’: use a Gaussian Mixture classifier
’thinning’: random thinning (after Zaliapin and Ben-Zion, 2020)
d (scalar, optional, default 1.6) – Only if
algorithm = "nearest-neighbor"
. Fractal dimension of epicenter/hypocenter.w (scalar, optional, default 1.0) – Only if
algorithm = "nearest-neighbor"
. Magnitude weighting factor (usually b-value).use_depth (bool, optional, default False) – Only if
algorithm = "nearest-neighbor"
. If True, consider depth in interevent distance calculation.eta_0 (scalar or None, optional, default None) – Only if
algorithm = "nearest-neighbor"
andmethod = "thinning"
. Initial cutoff threshold. If None, invokebruces.Catalog.fit_cutoff_threshold()
.alpha_0 (scalar, optional, default 1.5) – Only if
algorithm = "nearest-neighbor"
andmethod = "thinning"
. Cluster threshold.M (int, optional, default 16) – Only if
algorithm = "nearest-neighbor"
andmethod = "thinning"
. Number of reshufflings.seed (int or None, optional, default None) – Only if
algorithm = "nearest-neighbor"
. Seed for random number generator.rfact (int, optional, default 10) – Only if
algorithm = "reasenberg"
. Number of crack radii surrounding each earthquake within which to consider linking a new event into a cluster.xmeff (scalar or None, optional, default None) – Only if
algorithm = "reasenberg"
. “Effective” lower magnitude cutoff for catalog. If None, use minimum magnitude in catalog.xk (scalar, optional, default 0.5) – Only if
algorithm = "reasenberg"
. Factor by whichxmeff
is raised during clusters.tau_min (scalar, timedelta_like or None, optional, default None) – Only if
algorithm = "reasenberg"
. Look ahead time for non-clustered events (in days if scalar). Default is 1 day.tau_max (tau_min : scalar, timedelta_like or None, optional, default None) – Only if
algorithm = "reasenberg"
. Maximum look ahead time for clustered events (in days if scalar). Default is 10 days.p (scalar, optional, default 0.95) – Only if
algorithm = "reasenberg"
. Confidence of observing the next event in the sequence.
- Returns:
Declustered earthquake catalog or indices of background events.
- Return type:
bruces.Catalog
or array_like
Available declustering algorithms#
Gardner and Knopoff (1974)#
- bruces.decluster.gardner_knopoff(catalog, return_indices=False, window='default')#
Decluster earthquake catalog using Gardner-Knopoff’s method.
- Parameters:
catalog (
bruces.Catalog
) – Earthquake catalog.return_indices (bool, optional, default False) – If True, return indices of background events instead of declustered catalog.
window (str {'default', 'gruenthal', 'uhrhammer'}, optional, default 'default') –
Distance and time windows:
’default’: Gardner and Knopoff (1974)
’gruenthal’: personnal communication (see van Stiphout et al., 2012)
’uhrhammer’: Uhrhammer (1986)
- Returns:
Declustered earthquake catalog or indices of background events.
- Return type:
bruces.Catalog
or array_like
Nearest-neighbor algorithm#
- bruces.decluster.nearest_neighbor(catalog, return_indices=False, method='gaussian-mixture', d=1.6, w=1.0, eta_0=None, alpha_0=1.5, use_depth=False, M=16, seed=None)#
Decluster earthquake catalog (after Zaliapin and Ben-Zion, 2008).
- Parameters:
catalog (
bruces.Catalog
) – Earthquake catalog.return_indices (bool, optional, default False) – If True, return indices of background events instead of declustered catalog.
method (str, optional, default 'gaussian-mixture') –
Declustering method:
’gaussian-mixture’: use a Gaussian Mixture classifier
’thinning’: random thinning (after Zaliapin and Ben-Zion, 2020)
d (scalar, optional, default 1.6) – Fractal dimension of epicenter/hypocenter.
w (scalar, optional, default 1.0) – Magnitude weighting factor (usually b-value).
use_depth (bool, optional, default False) – If True, consider depth in interevent distance calculation.
eta_0 (scalar or None, optional, default None) – Only if
method = "thinning"
. Initial cutoff threshold. If None, invokebruces.Catalog.fit_cutoff_threshold()
.alpha_0 (scalar, optional, default 1.5) – Only if
method = "thinning"
. Cluster threshold.M (int, optional, default 16) – Only if
method = "thinning"
. Number of reshufflings.seed (int or None, optional, default None) – Seed for random number generator.
- Returns:
Declustered earthquake catalog or indices of background events.
- Return type:
bruces.Catalog
or array_like
Reasenberg (1985)#
- bruces.decluster.reasenberg(catalog, return_indices=False, rfact=10, xmeff=None, xk=0.5, tau_min=1.0, tau_max=10.0, p=0.95)#
Decluster earthquake catalog using Reasenberg’s method.
- Parameters:
catalog (
bruces.Catalog
) – Earthquake catalog.return_indices (bool, optional, default False) – If True, return indices of background events instead of declustered catalog.
rfact (int, optional, default 10) – Number of crack radii surrounding each earthquake within which to consider linking a new event into a cluster.
xmeff (scalar or None, optional, default None) – “Effective” lower magnitude cutoff for catalog. If None, use minimum magnitude in catalog.
xk (scalar, optional, default 0.5) – Factor by which
xmeff
is raised during clusters.tau_min (scalar, timedelta_like or None, optional, default None) – Look ahead time for non-clustered events (in days if scalar). Default is 1 day.
tau_max (scalar, timedelta_like or None, optional, default None) – Maximum look ahead time for clustered events (in days if scalar). Default is 10 days.
p (scalar, optional, default 0.95) – Confidence of observing the next event in the sequence.
- Returns:
Declustered earthquake catalog or indices of background events.
- Return type:
bruces.Catalog
or array_like