diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index e9d4efdb4..db53e6aa0 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -28,4 +28,5 @@ the released changes. - Fixed `gridutils` behavior for 1 CPU - Fixed bug in `GaussianRV_gen`, where the probability distribution function was not normalized correctly. Changed to use `scipy.stats.truncnorm` instead of the custom `GaussianRV_gen`. - Fixed bug in printing of parameter correlation/covariance matrices +- `make_fake_toas_fromMJDs` now does not assume `PLANET_SHAPIRO` is in the model - it checks. ### Removed diff --git a/src/pint/simulation.py b/src/pint/simulation.py index 97de3d3e1..2123bf2c2 100644 --- a/src/pint/simulation.py +++ b/src/pint/simulation.py @@ -1,5 +1,4 @@ -"""Functions related to simulating TOAs and models -""" +"""Functions related to simulating TOAs and models""" from collections import OrderedDict from copy import deepcopy @@ -454,7 +453,7 @@ def make_fake_toas_fromMJDs( ephem=model["EPHEM"].value, include_bipm=clk_version["include_bipm"], bipm_version=clk_version["bipm_version"], - planets=model["PLANET_SHAPIRO"].value, + planets=model["PLANET_SHAPIRO"].value if "PLANET_SHAPIRO" in model else False, flags=flags, )