Skip to content

Commit

Permalink
Moving def for mb sims
Browse files Browse the repository at this point in the history
  • Loading branch information
karllark committed Aug 17, 2024
1 parent 8082513 commit b67272d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions megabeast/tools/simulate_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,6 @@ def simulate_obs(
binfo = af.tree
age_prior_model = binfo["age_prior_model"]
mass_prior_model = binfo["mass_prior_model"]

Check warning on line 377 in megabeast/tools/simulate_obs.py

View check run for this annotation

Codecov / codecov/patch

megabeast/tools/simulate_obs.py#L373-L377

Added lines #L373 - L377 were not covered by tests
elif ensembleparams is not None:
if nsim > 0:
age_prior_model = None
mass_prior_model = None
else:
age_prior_model=mbmod.physics_model["logA"],
mass_prior_model=mbmod.physics_model["M_ini"],
else:
age_prior_model = None
mass_prior_model = None

Check warning on line 380 in megabeast/tools/simulate_obs.py

View check run for this annotation

Codecov / codecov/patch

megabeast/tools/simulate_obs.py#L379-L380

Added lines #L379 - L380 were not covered by tests
Expand All @@ -393,6 +386,13 @@ def simulate_obs(

mbmod = MB_Model(mbparams)

Check warning on line 387 in megabeast/tools/simulate_obs.py

View check run for this annotation

Codecov / codecov/patch

megabeast/tools/simulate_obs.py#L387

Added line #L387 was not covered by tests

if nsim > 0:
age_prior_model = None
mass_prior_model = None

Check warning on line 391 in megabeast/tools/simulate_obs.py

View check run for this annotation

Codecov / codecov/patch

megabeast/tools/simulate_obs.py#L389-L391

Added lines #L389 - L391 were not covered by tests
else:
age_prior_model=mbmod.physics_model["logA"],
mass_prior_model=mbmod.physics_model["M_ini"],

Check warning on line 394 in megabeast/tools/simulate_obs.py

View check run for this annotation

Codecov / codecov/patch

megabeast/tools/simulate_obs.py#L393-L394

Added lines #L393 - L394 were not covered by tests

# mock up a beast spectral grid so that the BEAST code can be used
cur_physmod = Table()
for cparam in ["logA", "M_ini", "Z", "distance", "Av", "Rv", "f_A"]:
Expand Down

0 comments on commit b67272d

Please sign in to comment.