-
Notifications
You must be signed in to change notification settings - Fork 101
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
WIP: An attempt at allowing the 'TCB' units in PINT #465
base: master
Are you sure you want to change the base?
Conversation
Hi @mattpitkin thanks for the pull request, |
Hi @luojing1211, thanks for the telecon invite. What time is it at? |
It is 4:00pm EST / 9:00 pm Glasgow time .
-Jing
…On Tue, Feb 5, 2019 at 5:19 PM Matt Pitkin ***@***.***> wrote:
Hi @luojing1211 <https://github.com/luojing1211>, thanks for the telecon
invite. What time is it at?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#465 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFFAgzjHhYJbXUaPCzsYzB1-wxD8LxPKks5vKgNWgaJpZM4aiRZ8>
.
|
@luojing1211 I think I should be able to make the call, but send me a reminder closer to the time. |
The changes now don't break the test suite. However, I've not actually added any tests to check that 'TCB' actually works correctly. I imagine that what I could do would be to generate a set of fake time file with Tempo2 with the default units of TCB, and then have a test that does some comparison of those with PINT. |
@luojing1211 can you email me (matthew.pitkin "at" glasgow.ac.uk) with information on joining the PINT call later? |
@mattpitkin did you get the PINT meeting email? |
Yes, thanks.
…On Tue, 19 Feb 2019, 18:50 Jing Luo ***@***.*** wrote:
@mattpitkin <https://github.com/mattpitkin> did you get the PINT meeting
email?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#465 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABWvJHCIq6pW7UTOmYlsCRnNkWb6q5Lgks5vPEeMgaJpZM4aiRZ8>
.
|
- fix missing tcb conversion in glitch.py
I've made some changes as suggestion on the call. I've also added a test script. It succeeds when I allow it to accept residuals on less than 10 microseconds (the maximum residual is ~5.4 microsecs). The TOAs that I create with the TEMPO2 fake plugin have residuals of 0.1 nanoseconds, so I don't know if I would expect PINT to be closer to TEMPO2 or not. What do others think? |
The differences between PINT and TEMPO2 are within 10ns.
-Jing
…On Tue, Feb 19, 2019 at 6:02 PM Matt Pitkin ***@***.***> wrote:
I've made some changes as suggestion on the call.
I've also added a test script. It succeeds when I allow it to accept
residuals on less than 10 microseconds (the maximum residual is ~5.4
microsecs). The TOAs that I create with the TEMPO2 fake plugin have
residuals of 0.1 nanoseconds, so I don't know if I would expect PINT to be
closer to TEMPO2 or not. What do others think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#465 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFFAg78NZuR9UoTMW0bcP0qfbNIpfepfks5vPIKJgaJpZM4aiRZ8>
.
|
I suggest generating fake TOAs on a few different timescales and look for signatures in the errors compared to Tempo2. There may be a big annual or diurnal term, which should give a clue. For example, if the code is now looking up the planetary positions in the ephemeris tables using TCB, that will cause an error. Those lookups must be done using TDB units even in the case where the par file is in TCB units since TDB is the independent variable in the planetary ephemerides. |
It looks like there is a periodic (annually varying) difference between the TCB and TDB values as calculated by TEMPO2 and those computed by astropy, with a magnitude of a few microseconds. This is most likely to be the cause of my error. This is probably due to not including the topocentric correction in the |
It doesn't look like I can do this as the |
Sorry, I can see that the |
If a |
Ah, yes! I hadn't realised that. Taking that into account it looks like astropy and TEMPO2 give the same TDBs to within tens of ns, and TCBs to within hundreds of ns. |
I think my issue might have been coming about due to me simulations being past the last valid Parkes to GPS conversion value in https://github.com/nanograv/PINT/blob/master/pint/datafiles/time_pks.dat. I'll change my simulation to be within the valid range for that and run again. |
Does this allow mixing of TDB and TCB units? In particular, flexible conversion of everything from TOAs to model parameters back and forth between TDB and TCB would be a very valuable application of PINT. |
@aarchiba Unfortunately the patch that I've put together is an either/or thing and doesn't allow conversion of parameters back and forth between equivalents in TDB/TCB. |
@paulray @mattpitkin any chance that we can refresh this or maybe try another approach? |
Yes, I can look into this again. I think I need to look more carefully at how the astropy TCB conversion compares to Tempo2. If there not close enough, PINT will need routines to try and replicate the Tempo2 method (which I know makes use of a lookup file). |
I agree this would be great to have. But, the assumption of TDB is baked in pretty deep in PINT, so I think this will require some discussion, e.g. at PINT telecons, to get this done. |
Should this be closed because of #1531 ? That doesn't really do the same thing but in the end it does allow PINT users to do TCB <-> TDB. |
It is already labeled as tabled. It might be useful as reference for a future effort to do this, so maybe leave it open? |
I'm not sure if/when I'd ever be able to complete this. I never got round to having the in-depth look into how the astropy TCB -> TDB conversion compares directory to the Tempo2 version. I'm happy for this to stay open as a reference or be closed. |
I write here because it's still an open issue, although my comment is more about the things that are already implemented. I'm interested in converting a model using SIFUNC terms. For a pulsar requiring ~10us precision, would it be as easy as converting all MJDs from |
@matteobachetti TZRMJD is pretty easy to implement. I didn't implement its conversion because I didn't think it made much of a difference, since it only changes the overall phase offset. SIFUNC is easy to do in theory, but I didn't do it because it involved |
@abhisrkckl thanks for your reply! I'm trying to use some ephemerides from the Fermi archive, and they use TCB and SIFUNC functions. The TZRMJD parameter would also be very useful for those trying to measure the residuals of their TOAs compared to published ephemerides. |
I've started an attempt at allowing the inclusion of 'TCB' units in PINT. Hopefully what I've started doing is along the right lines, but any suggestions (including to scrub everything and start again, if it looks wrong) are welcome.
Refs #37 and #151