NOTE: A full Python implementation of the barycentric correction algorighms now exists in the form of barycorrpy, which runs locally without invoking any web applets. Please consider using their code directly instead, or call it seamlessly through this Python package using the keyword argument
localmode=True.
Python routines that query Jason Eastman's web applets for barycentric
velocity and time correction (
barycorr.pro,
utc2bjd.pro and
bjd2utc.pro)
When using one of the services provided through this module, please cite the corresponding paper:
- Wright and Eastman (2014), PASP 126, pp. 838–852 [BVC calculation]
- Eastman et al. (2010), PASP 122, pp. 935–946 [BJD calculations]
- Kanodia and Wright (2018), Res. Notes AAS 2, 4 [localmode]
The Python interface is written by René Tronsgaard and may be used, modified or redistributed without restrictions.
See also:
- http://astroutils.astronomy.ohio-state.edu/exofast/barycorr.html
- http://astroutils.astronomy.ohio-state.edu/time/utc2bjd.html
- http://astroutils.astronomy.ohio-state.edu/time/bjd2utc.html
Download barycorr.py to a directory of choice.
The following packages are required (available in PyPI):
Recommended:
import barycorr
params = {
'jd_utc': [2457462.12724721, 2457535.067362],
'ra': 293.08995940,
'dec': 69.66117649,
'lat': 28.2983,
'lon': -16.5094,
'elevation': 2400,
'pmra': 598.07,
'pmdec': -1738.40,
'parallax': 173.77,
'rv': 26780,
'zmeas': [1.16637407e-05, -4.99432219e-06]
}
barycorr.bvc(**params)
# Returns: numpy.array([ 515.87479898, 1047.21353446])Added "localmode" that calls barycorrpy as a fallback option.
Added unit test and prevent the code from crashing when there is a warning about outdated leap second file.
Added cache functionality (courtesy of @vterron)
Allowed keyword raunits to switch between hours and degrees (courtesy of Mathias Zechmeister)
Initial release