nanograv / enterprise

ENTERPRISE (Enhanced Numerical Toolbox Enabling a Robust PulsaR Inference SuitE) is a pulsar timing analysis code, aimed at noise analysis, gravitational-wave searches, and timing model analysis.
https://enterprise.readthedocs.io
MIT License
64 stars 65 forks source link

Change ssb_to_psb_xyz_ICRS to not pass PINT a quantity #382

Closed tcromartie closed 4 months ago

tcromartie commented 4 months ago

See https://github.com/nanograv/PINT/issues/1733

vhaasteren commented 4 months ago

Thank you for fixing this @tcromartie. I just looked at this, and I'm not convinced Enterprise should be changed in this way. It depends a bit on what is meant with the docstring. As I said in the PINT issue, PINT is inconsistent between Equatorial and Ecliptic coordinates. PINT should be accepting units, and Enterprise is providing them. But apparently the 'quantity' that works for Ecliptic coordinates is not ok. Why would the Ecliptic coordinate model accept quantities, and the Equatorial coordinate model not accept them?

Perhaps the best way to make this consistent is to fix PINT, and in Enterprise do this:

self._pos_t = model.components[which_astrometry].ssb_to_psb_xyz_ICRS(Time(model.get_barycentric_toas(toas),format='mjd')).value

Want to change the PR in that way @tcromartie ?