Skip to content

Commit

Permalink
fixed find_empty_masks
Browse files Browse the repository at this point in the history
  • Loading branch information
dlakaplan committed Dec 10, 2024
1 parent ee1852d commit a8a811d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

5 changes: 4 additions & 1 deletion src/pint/models/timing_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a8a811d

Please sign in to comment.