From dad21a5d2507b83ef763d64cc4fa033ffe229b11 Mon Sep 17 00:00:00 2001 From: Richard Styron Date: Tue, 10 Dec 2024 14:50:36 -0800 Subject: [PATCH] updates to fermi inversion --- openquake/fnm/all_together_now.py | 2 ++ openquake/fnm/inversion/soe_builder.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openquake/fnm/all_together_now.py b/openquake/fnm/all_together_now.py index a54622b9a..b92af7c42 100644 --- a/openquake/fnm/all_together_now.py +++ b/openquake/fnm/all_together_now.py @@ -78,6 +78,7 @@ 'surface_type': 'simple', 'min_mag': None, 'max_mag': None, + "filter_seed": 69, } @@ -333,6 +334,7 @@ def build_fault_network( filter_proportionally_to_plausibility( fault_network['rupture_df'], fault_network['plausibility']['total'], + seed=settings['filter_seed'], ) ) t8 = time.time() diff --git a/openquake/fnm/inversion/soe_builder.py b/openquake/fnm/inversion/soe_builder.py index 7a56782df..a0b743f69 100644 --- a/openquake/fnm/inversion/soe_builder.py +++ b/openquake/fnm/inversion/soe_builder.py @@ -197,8 +197,10 @@ def make_rel_gr_mfd_eqns( rel_mag_eqns_lhs = rel_mag_eqns rel_mag_eqns_rhs = np.zeros(rel_mag_eqns_lhs.shape[0]) # flat, not column - rel_mag_eqns_errs = np.sqrt([(rel_rates_adj[M]) for M in unique_mags[1:]]) - rel_mag_eqns_errs /= weight + # rel_mag_eqns_errs = np.sqrt([(rel_rates_adj[M]) for M in unique_mags[1:]]) + rel_mag_eqns_errs = np.array([(rel_rates_adj[M]) for M in unique_mags[1:]]) + # rel_mag_eqns_errs = rel_mag_eqns_errs**-2 + rel_mag_eqns_errs *= weight return rel_mag_eqns_lhs, rel_mag_eqns_rhs, rel_mag_eqns_errs