Barycenter

class twobody.Barycenter(origin=None, t0=None, radial_velocity=None)[source]

Bases: object

The location of the barycenter at the specified epoch.

This class is used to specify a reference location and velocity of the barycenter at a given epoch. This is used for computing astrometric orbits, and for specifying the barycentric motion.

In the future, this class will contain more functionality that supports, e.g., acceleration of the barycenter from a third body.

Parameters
originSkyCoord or frame instance

The sky position of and distance to the barycenter at the specified epoch, t0. If only a barycentric radial velocity is known or needed, pass in radial_velocity.

t0quantity-like, numeric, Time (optional)

Reference epoch for the location of the barycenter. The default is J2000 if not specified.

radial_velocityquantity-like (optional)

If the coordinates or distance to the barycenter are not known or needed, you can just pass the radial velocity of the barycenter instead.

Examples

>>> import astropy.units as u
>>> from astropy.coordinates import SkyCoord
>>> b = Barycenter(radial_velocity=100*u.km/u.s)
>>> b = Barycenter(origin=SkyCoord(ra=150*u.deg, dec=37*u.deg,
...                                distance=100*u.pc)) # assumes J2000
>>> from astropy.time import Time
>>> b = Barycenter(origin=SkyCoord(ra=150*u.deg, dec=37*u.deg,
...                                distance=100*u.pc),
...                t0=Time(58912.481293, format='mjd'))