Skip to content

Commit

Permalink
Merge pull request #1857 from dlakaplan/tnequad_tcb
Browse files Browse the repository at this point in the history
Add TCB->TDB flag for EQUAD created from TNEQUAD
  • Loading branch information
abhisrkckl authored Nov 12, 2024
2 parents 8c8b126 + e559035 commit 6eebdcb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ the released changes.
## Unreleased
### Changed
### Added
- When TCB->TDB conversion info is missing, will print parameter name
### Fixed
- When EQUAD is created from TNEQ, has proper TCB->TDB conversion info
### Removed
1 change: 1 addition & 0 deletions src/pint/models/noise_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def setup(self):
index=tneq_par.index,
aliases=["T2EQUAD"],
description="An error term added in quadrature to the scaled (by EFAC) TOA uncertainty.",
convert_tcb2tdb=False,
)
)
EQUAD_par = getattr(self, EQUAD_name)
Expand Down
8 changes: 4 additions & 4 deletions src/pint/models/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def __init__(

assert (
not convert_tcb2tdb or tcb2tdb_scale_factor is not None
), "Please specify the tcb2tdb_scale_factor explicitly."
), f"Please specify the tcb2tdb_scale_factor explicitly for {name}."
self.convert_tcb2tdb = convert_tcb2tdb
self.tcb2tdb_scale_factor = tcb2tdb_scale_factor

Expand Down Expand Up @@ -1133,7 +1133,7 @@ def __init__(

assert (
not convert_tcb2tdb or tcb2tdb_scale_factor is not None
), "Please specify the tcb2tdb_scale_factor explicitly."
), f"Please specify the tcb2tdb_scale_factor explicitly for {name}."
self.convert_tcb2tdb = convert_tcb2tdb
self.tcb2tdb_scale_factor = tcb2tdb_scale_factor

Expand Down Expand Up @@ -1334,7 +1334,7 @@ def __init__(

assert (
not convert_tcb2tdb or tcb2tdb_scale_factor is not None
), "Please specify the tcb2tdb_scale_factor explicitly."
), f"Please specify the tcb2tdb_scale_factor explicitly for {name}."
self.convert_tcb2tdb = convert_tcb2tdb
self.tcb2tdb_scale_factor = tcb2tdb_scale_factor

Expand Down Expand Up @@ -1554,7 +1554,7 @@ def __init__(
# a function of the prefix.
assert (
not convert_tcb2tdb or tcb2tdb_scale_factor is not None
), "Please specify the tcb2tdb_scale_factor explicitly."
), f"Please specify the tcb2tdb_scale_factor explicitly for {name}."
tcb2tdb_scale_factor_val = (
tcb2tdb_scale_factor(self.prefix)
if hasattr(tcb2tdb_scale_factor, "__call__")
Expand Down

0 comments on commit 6eebdcb

Please sign in to comment.