lofar-astron / RMextract

extract TEC, vTEC, Earthmagnetic field and Rotation Measures from GPS and WMM data for radio interferometry observations
GNU General Public License v3.0
31 stars 22 forks source link

Simplify PosTools #49

Open AlecThomson opened 4 months ago

AlecThomson commented 4 months ago

Hi @maaijke,

There seem to be a few lurking errors in the GitHub here related to casacore and the troubles it can cause with positional info. Further, there is a quite a bulk of code to maintain in the related PosTools.py. In there there is a switch as well to use either casacore or ephem.

Looking at the code, I think that a bunch could be replaced with calls to the appropriate astropy.coordinates and the appropriate frames. What do you think?

maaijke commented 4 months ago

Also here, this is something I have been wanting to implement for quite some time now. It would be good to become completely independent of both pyephem and casacore (apart from the MS interface)

AlecThomson commented 4 months ago

Glad to see that RMextract is being 'modernized' :) So you might want to replace PyEphem interface with SkyField as PyEphem is no longer being supported. Although super-accurate positions are not all that critical for ionosphere modeling.

@twillis449 is there any reason this can't be done with vanilla astropy?

twillis449 commented 4 months ago

You are quite correct - astropy should be able to do anything SkyField does.