From f3ae8cf30cb05d4baf15a95447bd3ce1adefd07a Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Fri, 12 Jun 2026 16:31:54 -0500 Subject: [PATCH 1/2] #2009 --- CHANGELOG-unreleased.md | 1 + src/pint/simulation.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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..9325b7b8b 100644 --- a/src/pint/simulation.py +++ b/src/pint/simulation.py @@ -454,7 +454,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, ) From 3112cc661fdc08b201e6e4b8b97afa2057aa35bb Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Mon, 15 Jun 2026 08:39:31 -0500 Subject: [PATCH 2/2] fix extra comma --- src/pint/simulation.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pint/simulation.py b/src/pint/simulation.py index 9325b7b8b..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 if "PLANET_SHAPIRO" in model else False,, + planets=model["PLANET_SHAPIRO"].value if "PLANET_SHAPIRO" in model else False, flags=flags, )