Skip to content

Commit

Permalink
fixing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
karllark committed Aug 13, 2024
1 parent 9cdc18f commit da02582
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion docs/megabeast/simulate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ using the `mb_simulate_obs` command once the megabeast has been installed.
Simulations require already created BEAST physics and observation model grids.

The physics model grid includes the ensemble parameters as these are the same as
the BEAST :ref:`beast_priors`. The module uses already created BEAST physics and
the BEAST (see `beast priors <https://beast.readthedocs.io/en/latest/beast_priors.html>`_).
The module uses already created BEAST physics and
observation model grids by sampling the full nD prior function that is part of
the physics model grid. The observation model grid provides the information on
the flux uncertainties and biases as well as the completeness.
Expand Down
14 changes: 6 additions & 8 deletions megabeast/tools/simulate_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from beast.physicsmodel.priormodel import PriorAgeModel, PriorMassModel
from beast.physicsmodel.grid_weights_stars import compute_bin_boundaries
import beast.observationmodel.noisemodel.generic_noisemodel as noisemodel
#from beast.observationmodel.observations import gen_SimObs_from_sedgrid

from astropy.table import vstack

Expand Down Expand Up @@ -201,7 +200,9 @@ def gen_SimObs_from_sedgrid(
compl_indx = model_compl[totsim_indx] >= compl_choice
sim_indx = totsim_indx[compl_indx]
totcompsimmass = np.sum(sedgrid["M_ini"][sim_indx])
print(f"number of simulated stars w/ completeness = {len(sim_indx)}; mass = {totcompsimmass}")
print(
f"number of simulated stars w/ completeness = {len(sim_indx)}; mass = {totcompsimmass}"
)

else: # total number of stars to simulate set by command line input

Expand Down Expand Up @@ -424,13 +425,13 @@ def main():
"--complcut",
default=None,
type=float,
help="completeness cut for selecting seds above the completeness cut"
help="completeness cut for selecting seds above the completeness cut",
)
parser.add_argument(
"--magcut",
default=None,
type=float,
help="magnitdue cut for selecting seds brighter than the magcut in compl_filter"
help="magnitdue cut for selecting seds brighter than the magcut in compl_filter",
)
parser.add_argument(
"--weight_to_use",
Expand All @@ -440,10 +441,7 @@ def main():
'grid_weight' to choose the weighting for SED selection.""",
)
parser.add_argument(
"--ranseed",
default=None,
type=int,
help="seed for random number generator"
"--ranseed", default=None, type=int, help="seed for random number generator"
)
args = parser.parse_args()

Expand Down

0 comments on commit da02582

Please sign in to comment.