varenius / salsa

Code developed for the 2.3m radio telescopes SALSA in Onsala, Sweden
MIT License
16 stars 6 forks source link

Use astropy to calculate velocity corrections? #42

Open varenius opened 6 years ago

varenius commented 6 years ago

From the astropy tutorial at http://docs.astropy.org/en/stable/coordinates/index.html#module-astropy.coordinates it seems one can use astropy to calculate radial velocity corrections. This may be preferred to the current calculation of VLSR corrections in SALSA. Astropy example:

from astropy.time import Time obstime = Time('2017-2-14') target = SkyCoord.from_name('M31')
keck = EarthLocation.of_site('Keck')
target.radial_velocity_correction(obstime=obstime, location=keck).to('km/s')
<Quantity -22.359784554780255 km / s>

Perhaps worth investigating for SALSA code. It would be good to use more astropy functions in general instead of custom or other libraries.

varenius commented 3 years ago

This may be re-considered (or ignored) for the Web-based UI, see #50.