pypeit / PypeIt

The Python Spectroscopic Data Reduction Pipeline
BSD 3-Clause "New" or "Revised" License
160 stars 102 forks source link

Include a barycentric velocity correction #80

Closed rcooke-ast closed 7 years ago

rcooke-ast commented 8 years ago

As titled ;-)

rcooke-ast commented 8 years ago

Perhaps it would be easiest to port the following JAVA code:

Barycentric Velocity Correction

profxj commented 8 years ago

jxp> From xavier@ucolick.org Sat Aug 20 17:21:45 2016 jxp> From: "J. Xavier Prochaska" xavier@ucolick.org jxp> Subject: Baryocentric jxp> Date: Sat, 20 Aug 2016 08:21:39 -0700 jxp> To: mathar@mpia.de jxp> jxp> Is there any possibility that you (or someone else) jxp> will be providing a Python version of your Java based code?

I will not try it, ... I have no use case for it. There is likely somewhere Python code that is doing almost the same thing, because the application is not at all new, see e.g. https://pythonhosted.org/PyTPM/ ; but I am not aware of any python implementation that mixes ephemerides, the IERS bulletin and the Earth rotation.

Instead of porting the code it might be easier to start from scratch with the python reader in https://pypi.python.org/pypi/EphemPy and the SOFA interface in https://pypi.python.org/pypi/pysofa (which of course is not up-to-date with respect to leap seconds...) or https://pypi.python.org/pypi/erfa_python/2016.06.11 or https://pythonhosted.org/Astropysics/coremods/coords.html

rcooke-ast commented 8 years ago

Thanks for sharing this communication! That is definitely the best way to proceed. For record, the CERES routines perform a barycentric velocity:

arXiv paper GitHub code

rcooke-ast commented 7 years ago

Just found out that astropy apparently has this functionality:

astropy barycentric velocity correction

rcooke-ast commented 7 years ago

Implemented in PR #190