barycorrpy icon indicating copy to clipboard operation
barycorrpy copied to clipboard

Support Hubble Space Telescope conversions?

Open nespinoza opened this issue 3 years ago • 8 comments

Hi @shbhuk!

Thanks a lot for this beautiful package. I had one request, though, that it was not obvious to me how to implement (but which apparently Jason Eastman did implement in his IDL and web-version --- which is not working anymore): have you thought of adding support for Hubble Space Telescope time-stamps? This would be super helpful!

Thanks in advance, Néstor

nespinoza avatar Apr 03 '21 21:04 nespinoza

Hi Nestor, You're welcome!

Yes, the IDL code and web version does include support for HST. We currently do not include that, but if this is something that could be useful, we can consider it. Realistically, given time constraints, I don't think this will be feasible in the near future (t > 1 month). Let us know!

Shubham

shbhuk avatar Apr 03 '21 22:04 shbhuk

Hi Shubham,

Thanks for the quick reply! I understand. The reality of HST time-stamps (according to Jason's paper and the HST Helpdesk) is that the actual on-board UTC timing has a precision of only ~1 second. I think this means, thus, that the most important corrections are (a) (because of the Romer delay) the object's coordinates and (b) the UTC to TDB conversion. The Shapiro delay (at most 0.1 ms), the Einstein delay (~sub-second when comparing times measured both at the Earth and Hubble, whose speed around the Earth is about ~7600 m/s) and even the actual location of HST (~20 ms is the light travel-time between HST and the surface of the Earth) seem to not be important at this level of precision, which I think implies one could reasonably just use barycorrpy as is to calculate this and one would obtain a better-than-second precision on the time-stamps even when selecting a random location.

Do you know if any of the other corrections you folks do are also much smaller than the ones I mentioned? If they are, then this might be straightforward to implement. Would be good to check what Jason did in his web-form, though. I do not have an IDL licence, so can't check his code :-(.

Néstor

nespinoza avatar Apr 03 '21 23:04 nespinoza

Hi Nestor, Correct, currently in barycorrpy, we're including the clock correction (UTC to TDB), geometric correction (Romer delay), and then the Einstein delay. We do not include the Shapiro delay, since that would require extra ephemeris calls (+1 for the Sun, and perhaps additional for Jupiter, Saturn), since this is ~ 20 us. We do include the Einstein delay since that does not require any extra queries (even though it's a us effect).

Essentially I think all we need to do is replace the Observatory coordinates with HST coordinates. That should correct for the Romer delay. So I think that ALL we need to do to hack the existing function, is figure out how to represent HST in Astropy's EarthLocation object.

shbhuk avatar Apr 03 '21 23:04 shbhuk

Hi @shbhuk,

I might be able to help figuring out what is needed to get the location of HST from the headers of HST frames; need to ask some questions around here at STScI though. The HST headers do include the radial-velocity and other data that might make the conversion be even more precise (probably more than we need). The JWST folks have already figured out how to convert most of it as well: https://github.com/spacetelescope/jwst/blob/master/jwst/lib/utc_to_tdb.py.

I'll ask around during the week and come back to this ticket to see if I can help make any progress in this direction.

Thanks! Néstor

nespinoza avatar Apr 04 '21 00:04 nespinoza

Hi Nestor, One easy solution I can think of is to use JPL Horizons to query the orbital vectors (x,y,z, and vx,vy,vz) corresponding to the space telescope. This can then trivially be changed to any spacecraft supported by Horizons

https://ssd.jpl.nasa.gov/horizons.cgi#top

image

The JPL Horizon vectors would then just be a drop in replacement for the observatory position/velocity vectors, where both are wrt the geocenter, and are then added to the geocenter's position/velocity vector wrt the SSB.

See here - https://github.com/shbhuk/barycorrpy/blob/7eff82b55d9113ef2ff515eed1bf78b465481961/barycorrpy/utc_tdb.py#L353

shbhuk avatar Apr 04 '21 20:04 shbhuk

Hi Nestor, Do the HST FITS files have geocentric latitude and longitude in their headers? This might be instrument specific though.

shbhuk avatar Apr 08 '21 14:04 shbhuk

I'll just note that we want this for James Webb Space Telescope and other spacecraft also, in which case more corrections come in to play.

nealmcb avatar Jul 25 '22 23:07 nealmcb

If this is something that would be useful for multiple space telescopes and is not implemented in astropy, perhaps we should discuss it further. Things that would be useful to know -

  1. The Telescope
  2. Telescope telemetry in FITS headers (time stamp, time standard, position-velocity vector)
  3. Precision required

shbhuk avatar Jul 25 '22 23:07 shbhuk