Skip to content

Commit

Permalink
Merge pull request #1531 from abhisrkckl/tcb2tdb
Browse files Browse the repository at this point in the history
TCB to TDB conversion
  • Loading branch information
paulray authored Apr 13, 2023
2 parents 3fbc937 + 0976fa4 commit 489ba29
Show file tree
Hide file tree
Showing 10 changed files with 562 additions and 234 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ and this project, at least loosely, adheres to [Semantic Versioning](https://sem
- Module for converting between binary models also included in `convert_parfile`
- Method to get a parameter as a `uncertainties.ufloat` for doing math
- Method to get current binary period and uncertainty at a given time regardless of binary model
- TCB to TDB conversion on read, and conversion script (`tcb2tdb`)
### Fixed
- Broken notebooks CI test
- BIPM correction for simulated TOAs
Expand Down
8 changes: 8 additions & 0 deletions docs/command-line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,11 @@ the examples subdirectory of the PINT distro.

event_optimize J0030+0451_P8_15.0deg_239557517_458611204_ft1weights_GEO_wt.gt.0.4.fits PSRJ0030+0451_psrcat.par templateJ0030.3gauss --weightcol=PSRJ0030+0451 --minWeight=0.9 --nwalkers=100 --nsteps=500

tcb2tdb
-------

A command line tool that converts par files from TCB timescale to TDB timescale.

::

tcb2tdb J0030+0451_tcb.par J0030+0451_tdb.par
10 changes: 6 additions & 4 deletions docs/explanation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,14 @@ in, and what kind of time you're asking for::

The conventional time scale for working with pulsars, and the one PINT
uses, is Barycentric Dynamical Time (TDB). You should be aware that there
is another time scale, not yet supported in PINT, called Barycentric
Coordinate Time (TCB), and that because of different handling of
relativistic corrections, it does not advance at the same rate as TDB
is another time scale, not yet fully supported in PINT, called Barycentric
Coordinate Time (TCB). Because of different handling of relativistic
corrections, the TCB timescale does not advance at the same rate as TDB
(there is also a many-second offset). TEMPO2 uses TCB by default, so
you may encounter pulsar timing models or even measurements that use
TCB. PINT will attempt to detect this and let you know.
TCB. PINT provides a command line tool `tcb2tdb` to approximately convert
TCB timing models to TDB. PINT can also optionally convert TCB timing models
to TDB (approximately) upon read.

Note that the need for leap seconds is because the Earth's rotation is
somewhat erratic - no, we're not about to be thrown off, but its
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ console_scripts =
pintk = pint.scripts.pintk:main
convert_parfile = pint.scripts.convert_parfile:main
compare_parfiles = pint.scripts.compare_parfiles:main
tcb2tdb = pint.scripts.tcb2tdb:main


# See the docstring in versioneer.py for instructions. Note that you must
Expand Down
Loading

0 comments on commit 489ba29

Please sign in to comment.