From a8a811d467f7175cc3c6a570f0c86e12b93101f7 Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Tue, 10 Dec 2024 12:23:46 -0600 Subject: [PATCH] fixed find_empty_masks --- CHANGELOG-unreleased.md | 1 + src/pint/models/timing_model.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index 7579adb51..51545be13 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -26,6 +26,7 @@ the released changes. - When EQUAD is created from TNEQ, has proper TCB->TDB conversion info - TOA selection masks will work when only TOA is the first one - Condense code in Glitch model and add test coverage. +- `find_empty_masks` will now search through `CMX` parameters ### Removed - macOS 12 CI diff --git a/src/pint/models/timing_model.py b/src/pint/models/timing_model.py index 68fe886bf..0d3d99431 100644 --- a/src/pint/models/timing_model.py +++ b/src/pint/models/timing_model.py @@ -109,6 +109,9 @@ ignore_prefix = {"DMXF1_", "DMXF2_", "DMXEP_"} +# prefixes of parameters that may need to be checked for empty ranges +prefixes = ["DM", "SW", "CM"] + DEFAULT_ORDER = [ "astrometry", "jump_delay", @@ -2901,7 +2904,7 @@ def find_empty_masks(self, toas, freeze=False): if freeze: log.info(f"'{maskpar}' has no TOAs so freezing") getattr(self, maskpar).frozen = True - for prefix in ["DM", "SW"]: + for prefix in prefixes: mapping = pint.utils.xxxselections(self, toas, prefix=prefix) for k in mapping: if len(mapping[k]) == 0: