Skip to content

Commit

Permalink
Merge pull request #154 from swiss-seismological-service/rename_simul…
Browse files Browse the repository at this point in the history
…ated_magnitudes_binned

renamed function simulated_magnitueds_binned to simulate_magnitudes_b…
  • Loading branch information
aronsho authored Jun 5, 2024
2 parents 008d7d6 + 49a5c99 commit ef0c733
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions seismostats/analysis/estimate_mc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from seismostats.analysis.estimate_beta import estimate_b
from seismostats.utils.binning import bin_to_precision, get_fmd
from seismostats.utils.simulate_distributions import \
simulated_magnitudes_binned
simulate_magnitudes_binned


def cdf_discrete_GR(
Expand Down Expand Up @@ -122,12 +122,12 @@ def ks_test_gr(
ks_ds = []

n_sample = len(sample)
simulated_all = simulated_magnitudes_binned(
simulate_all = simulate_magnitudes_binned(
n * n_sample, beta, mc, delta_m, b_parameter="beta"
)

for ii in range(n):
simulated = simulated_all[n_sample * ii: n_sample * (ii + 1)]
simulated = simulate_all[n_sample * ii: n_sample * (ii + 1)]
_, y_th = cdf_discrete_GR(simulated, mc=mc, delta_m=delta_m, beta=beta)
_, y_emp = empirical_cdf(simulated)

Expand Down
2 changes: 1 addition & 1 deletion seismostats/utils/simulate_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def simulate_magnitudes(
return mags


def simulated_magnitudes_binned(
def simulate_magnitudes_binned(
n: int,
b: float | np.ndarray,
mc: float,
Expand Down

0 comments on commit ef0c733

Please sign in to comment.