lwa-project / lsl

LWA Software Library
GNU General Public License v2.0
8 stars 4 forks source link

Drop support for Python2 #70

Closed jaycedowell closed 5 months ago

jaycedowell commented 5 months ago

This PR drops Python2 support for #53. It also moves more of the internal astronomical calculations uses in LSL from pyephem to astropy.

jaycedowell commented 5 months ago

An interesting problem has popped up here. The version of astropy that work with Py3.6 works a little different from those for Py3.8/3.10/3.12 with regards to coordinate transforms to/from the ITRS frame. If I can't sort out how to fix things for Py3.6 I'll have to drop support for it.

jaycedowell commented 5 months ago

I think what is happening is that for older astropy tranforming from ITRS -> AltAz has to go through CIRS, which introduces things like stellar aberration which shouldn't be there. In newer version of astropy there is a concept of a "topocentric ITRS" frame which can be directly transformed to AltAz without those corrections.

To fix this for Py3.6 we need to backport the relevant portions of the direct ITRS -> AltAz transform into LSL and use those when necessary. The thing that is holding me up is I'm not sure how many people are still on Py3.6. I was hoping telemetry would tell me that but it looks like it only records LSL version info, not Python version info. I should fix that.

jaycedowell commented 5 months ago

The best thing is probably to drop support for Py3.6. Ubuntu 20.04 LTS ships with Py3.8 by default and that came out in April of 2020.