Skip to content

Python interface for barycentric correction web applets

Notifications You must be signed in to change notification settings

tronsgaard/barycorr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

barycorr.py

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:

The Python interface is written by René Tronsgaard (Aarhus University) and may be used, modified or redistributed without restrictions.

See also:

Installation

Download barycorr.py to a directory of choice.

The following packages are required (available in PyPI):

Recommended:

Usage example

import barycorr
params = {
    'jd_utc': [2457535.067362, 2457462.12724721],
    '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': [-4.99432219e-06,  1.16637407e-05]
}
barycorr.bvc(**params)

# Returns: numpy.array([-1312.08186269,   515.87479325])

Version history

Version 1.4 (16 September 2021)

Added unit test and prevent the code from crashing when there is a warning about outdated leap second file.

Version 1.3 (16 June 2020)

Added cache functionality (courtesy of @vterron)

Version 1.2 (01 Oct 2017)

Allowed keyword raunits to switch between hours and degrees (courtesy of Mathias Zechmeister)

Version 1.1 (26 May 2016)

Initial release

About

Python interface for barycentric correction web applets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages