From b88b28edbdce0fda8b8e3f6e3698b32e082c2cf8 Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Tue, 5 Nov 2024 14:03:45 -0600 Subject: [PATCH 1/5] add printing of parameters that need TCB->TDB scaling; make conversion from TNEQUAD to EQUAD free of scaling --- src/pint/models/noise_model.py | 1 + src/pint/models/parameter.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pint/models/noise_model.py b/src/pint/models/noise_model.py index b53ebdb2d..b1af8e10f 100644 --- a/src/pint/models/noise_model.py +++ b/src/pint/models/noise_model.py @@ -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) diff --git a/src/pint/models/parameter.py b/src/pint/models/parameter.py index ea92f4611..5e3d9e607 100644 --- a/src/pint/models/parameter.py +++ b/src/pint/models/parameter.py @@ -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 @@ -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 @@ -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 @@ -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__") From d1c6b0be80e2375439774e5350ac1aa40d0dc120 Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Tue, 5 Nov 2024 14:08:45 -0600 Subject: [PATCH 2/5] Revert "add printing of parameters that need TCB->TDB scaling; make conversion from TNEQUAD to EQUAD free of scaling" This reverts commit b88b28edbdce0fda8b8e3f6e3698b32e082c2cf8. --- src/pint/models/noise_model.py | 1 - src/pint/models/parameter.py | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pint/models/noise_model.py b/src/pint/models/noise_model.py index b1af8e10f..b53ebdb2d 100644 --- a/src/pint/models/noise_model.py +++ b/src/pint/models/noise_model.py @@ -122,7 +122,6 @@ 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) diff --git a/src/pint/models/parameter.py b/src/pint/models/parameter.py index 5e3d9e607..ea92f4611 100644 --- a/src/pint/models/parameter.py +++ b/src/pint/models/parameter.py @@ -709,7 +709,7 @@ def __init__( assert ( not convert_tcb2tdb or tcb2tdb_scale_factor is not None - ), f"Please specify the tcb2tdb_scale_factor explicitly for {name}." + ), "Please specify the tcb2tdb_scale_factor explicitly." self.convert_tcb2tdb = convert_tcb2tdb self.tcb2tdb_scale_factor = tcb2tdb_scale_factor @@ -1133,7 +1133,7 @@ def __init__( assert ( not convert_tcb2tdb or tcb2tdb_scale_factor is not None - ), f"Please specify the tcb2tdb_scale_factor explicitly for {name}." + ), "Please specify the tcb2tdb_scale_factor explicitly." self.convert_tcb2tdb = convert_tcb2tdb self.tcb2tdb_scale_factor = tcb2tdb_scale_factor @@ -1334,7 +1334,7 @@ def __init__( assert ( not convert_tcb2tdb or tcb2tdb_scale_factor is not None - ), f"Please specify the tcb2tdb_scale_factor explicitly for {name}." + ), "Please specify the tcb2tdb_scale_factor explicitly." self.convert_tcb2tdb = convert_tcb2tdb self.tcb2tdb_scale_factor = tcb2tdb_scale_factor @@ -1554,7 +1554,7 @@ def __init__( # a function of the prefix. assert ( not convert_tcb2tdb or tcb2tdb_scale_factor is not None - ), f"Please specify the tcb2tdb_scale_factor explicitly for {name}." + ), "Please specify the tcb2tdb_scale_factor explicitly." tcb2tdb_scale_factor_val = ( tcb2tdb_scale_factor(self.prefix) if hasattr(tcb2tdb_scale_factor, "__call__") From 71bd859152ebb5aaca19cb91668987f56b23aa2d Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Tue, 5 Nov 2024 14:10:55 -0600 Subject: [PATCH 3/5] add printing of parameters that need TCB->TDB scaling; make conversion from TNEQUAD to EQUAD free of scaling --- src/pint/models/noise_model.py | 1 + src/pint/models/parameter.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pint/models/noise_model.py b/src/pint/models/noise_model.py index b53ebdb2d..b1af8e10f 100644 --- a/src/pint/models/noise_model.py +++ b/src/pint/models/noise_model.py @@ -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) diff --git a/src/pint/models/parameter.py b/src/pint/models/parameter.py index ea92f4611..5e3d9e607 100644 --- a/src/pint/models/parameter.py +++ b/src/pint/models/parameter.py @@ -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 @@ -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 @@ -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 @@ -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__") From bc3873d2fc85f6462bbf19beb9fc44ad9e939874 Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Wed, 6 Nov 2024 12:17:57 -0600 Subject: [PATCH 4/5] changelog --- CHANGELOG-unreleased.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index 2899b99f8..175886dcc 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -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 From e55903551c397c9fe1bc7a01ffc3edd05747ded7 Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Mon, 11 Nov 2024 09:11:48 -0600 Subject: [PATCH 5/5] fixed changelog --- CHANGELOG-unreleased.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index 175886dcc..d15e5e781 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -10,7 +10,7 @@ the released changes. ## Unreleased ### Changed ### Added -* When TCB->TDB conversion info is missing, will print parameter name +- When TCB->TDB conversion info is missing, will print parameter name ### Fixed -* When EQUAD is created from TNEQ, has proper TCB->TDB conversion info +- When EQUAD is created from TNEQ, has proper TCB->TDB conversion info ### Removed