Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCB to TDB conversion #1531

Merged
merged 56 commits into from
Apr 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
742b8df
allow_tcb option
abhisrkckl Feb 10, 2023
2e961eb
improved error message
abhisrkckl Feb 10, 2023
aabd2b8
IFTE constants
abhisrkckl Feb 10, 2023
199cce7
tcb conversion code
abhisrkckl Feb 11, 2023
717ac24
conversion script
abhisrkckl Feb 11, 2023
8480903
warning
abhisrkckl Feb 11, 2023
8fe3681
setup
abhisrkckl Feb 11, 2023
0f0c03e
welcome message
abhisrkckl Feb 11, 2023
58677bc
typo
abhisrkckl Feb 11, 2023
2a638b2
black
abhisrkckl Feb 11, 2023
3ddcc31
sourcery
abhisrkckl Feb 13, 2023
9764280
message
abhisrkckl Feb 13, 2023
88d60ba
script works.
abhisrkckl Feb 13, 2023
eb0f52c
test_tcb2tdb
abhisrkckl Feb 13, 2023
824bf8a
refact error msg
abhisrkckl Feb 13, 2023
02a3f6a
doc entry
abhisrkckl Feb 13, 2023
44d64f9
docs
abhisrkckl Feb 13, 2023
382b559
sourcery
abhisrkckl Feb 13, 2023
0cea703
sourcery
abhisrkckl Feb 13, 2023
9638fc4
docs
abhisrkckl Feb 13, 2023
97ce07e
docs and sourcery
abhisrkckl Feb 13, 2023
1ad4153
improve test
abhisrkckl Feb 13, 2023
a41c8fd
improve test
abhisrkckl Feb 13, 2023
145a395
assert
abhisrkckl Feb 13, 2023
412ed7b
docs
abhisrkckl Feb 13, 2023
6c2b249
typos
abhisrkckl Feb 13, 2023
d4ce402
isort
abhisrkckl Feb 13, 2023
f4b0e72
Update CHANGELOG.md
abhisrkckl Feb 14, 2023
805c5e9
welcome msg as warning
abhisrkckl Feb 14, 2023
0a1cd02
convert DM and DM derivatives
abhisrkckl Feb 14, 2023
eb66a35
docstrings
abhisrkckl Feb 15, 2023
96f7862
warning
abhisrkckl Feb 15, 2023
8845e16
warning and help message
abhisrkckl Feb 15, 2023
41b1198
get_prefix_mapping
abhisrkckl Feb 15, 2023
920b749
fix power
abhisrkckl Feb 15, 2023
ebd1d5f
fix for loop
abhisrkckl Feb 16, 2023
5e0229f
get_model and get_model_and_toas do not need allow_tcb option.
abhisrkckl Feb 16, 2023
fd18592
back conversion and roundtrip test
abhisrkckl Feb 16, 2023
dd6622e
docstring
abhisrkckl Feb 16, 2023
dc9b39e
Merge branch 'nanograv:master' into tcb2tdb
abhisrkckl Feb 16, 2023
e7d5d4f
minor corrections
abhisrkckl Feb 17, 2023
6cb11dd
convert upon read option
abhisrkckl Feb 17, 2023
c9e70d5
target_units
abhisrkckl Feb 17, 2023
570eb8e
target_units skip
abhisrkckl Feb 17, 2023
7b1399c
convert tcb upon read in ModelBuilder
abhisrkckl Feb 17, 2023
1e650c8
Merge branch 'nanograv:master' into tcb2tdb
abhisrkckl Feb 18, 2023
3ea3ad7
Merge branch 'nanograv:master' into tcb2tdb
abhisrkckl Mar 2, 2023
307f69a
fix roundtrip test
abhisrkckl Mar 23, 2023
9a114f7
Merge branch 'nanograv:master' into tcb2tdb
abhisrkckl Mar 30, 2023
d348777
Merge branch 'master' into tcb2tdb
abhisrkckl Apr 3, 2023
628f78e
don't (try to) convert twice
abhisrkckl Apr 6, 2023
296ce2c
space
abhisrkckl Apr 6, 2023
91daff7
space
abhisrkckl Apr 6, 2023
458a044
log msg
abhisrkckl Apr 6, 2023
664cdd8
update tcb explanation
abhisrkckl Apr 6, 2023
0976fa4
fix test
abhisrkckl Apr 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
get_prefix_mapping
abhisrkckl committed Feb 15, 2023
commit 41b11984dc41cb5f602fc1518eba62a66bf777cc
7 changes: 3 additions & 4 deletions src/pint/models/tcb_conversion.py
Original file line number Diff line number Diff line change
@@ -108,8 +108,7 @@ def convert_tcb_to_tdb(model):
)

if "Spindown" in model.components:
dlakaplan marked this conversation as resolved.
Show resolved Hide resolved
for Fn_par in model.components["Spindown"].F_terms:
n = int(Fn_par[1:])
for n, Fn_par in model.get_prefix_mapping("F"):
scale_parameter(model, Fn_par, n + 1)

transform_mjd_parameter(model, "PEPOCH")
@@ -129,8 +128,8 @@ def convert_tcb_to_tdb(model):
# scaled by IFTE_K**(i+1).
if "DispersionDM" in model.components:
scale_parameter(model, "DM", IFTE_K)
for i in range(1, len(model.get_DM_terms())):
scale_parameter(model, f"DM{i}", IFTE_K ** (i + 1))
for n, DMn_par in model.get_prefix_mapping("DM"):
scale_parameter(model, DMn_par, IFTE_K ** (n + 1))
transform_mjd_parameter(model, "DMEPOCH")

if hasattr(model, "BINARY") and getattr(model, "BINARY").value is not None: