Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renamed function simulated_magnitueds_binned to simulate_magnitudes_b… #154

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -34,7 +34,7 @@ def simulate_magnitudes(
return mags


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