galpy.orbit.Orbit¶
- Orbit.__init__(vxvv=None, ro=None, vo=None, zo=None, solarmotion=None, radec=False, uvw=False, lb=False)[source]¶
Initialize an Orbit instance.
- Parameters:
vxvv (numpy.ndarray, optional) –
Initial conditions (must all have the same phase-space dimension); can be either:
astropy (>v3.0) SkyCoord with arbitrary shape, including velocities (note that this turns on physical output even if ro and vo are not given)
- array of arbitrary shape (shape,phasedim) (shape of the orbits, followed by the phase-space dimension of the orbit); shape information is retained and used in outputs; elements can be either:
In Galactocentric cylindrical coordinates with phase-space coordinates arranged as [R,vR,vT(,z,vz,phi)]; needs to be in internal units (for Quantity input; see ‘list’ option below)
[ra,dec,d,mu_ra, mu_dec,vlos] in [deg,deg,kpc,mas/yr,mas/yr,km/s] (ICRS; mu_ra = mu_ra * cos dec); (for Quantity input, see ‘list’ option below);
[ra,dec,d,U,V,W] in [deg,deg,kpc,km/s,km/s,kms]; (for Quantity input; see ‘list’ option below); ICRS frame
(l,b,d,mu_l, mu_b, vlos) in [deg,deg,kpc,mas/yr,mas/yr,km/s) (mu_l = mu_l * cos b); (for Quantity input; see ‘list’ option below)
[l,b,d,U,V,W] in [deg,deg,kpc,km/s,km/s,kms]; (for Quantity input; see ‘list’ option below)
And 5) also work when leaving out b and mu_b/W
- lists of initial conditions, entries can be:
Individual Orbit instances (of single objects)
Regular or Quantity arrays arranged as in section 2) above (so things like [R,vR,vT,z,vz,phi], where R, vR, … can be arbitrary shape Quantity arrays)
List of Quantities (so things like [R1,vR1,..,], where R1, vR1, … are scalar Quantities
None: assumed to be the Sun; if None occurs in a list it is assumed to be the Sun and all other items in the list are assumed to be [ra,dec,…]; cannot be combined with Quantity lists (2 and 3 above)
Lists of scalar phase-space coordinates arranged as in b) (so things like [R,vR,…] where R,vR are scalars in internal units
ro (float or Quantity, optional) – Distance from vantage point to Galactic center (kpc; can be an array with the same shape as the Orbit itself).
vo (float or Quantity, optional) – Circular velocity at ro (km/s; can be an array with the same shape as the Orbit itself).
zo (float or Quantity, optional) – Offset toward the NGP of the Sun wrt the plane in kpc; default = 20.8 pc from Bennett & Bovy 2019). Can be an array with the same shape as the Orbit itself
solarmotion (str, numpy.ndarray or Quantity, optional) – ‘hogg’ or ‘dehnen’, or ‘schoenrich’, or value in [-U,V,W] in km/s. Can be an array with the same shape as the Orbit itself
radec (bool, optional) – If set, treat input as being in ICRS coordinates [ra,dec,d,mu_ra, mu_dec,vlos] in [deg,deg,kpc,mas/yr,mas/yr,km/s] (mu_ra = mu_ra * cos dec).
lb (bool, optional) – If set, treat input as being in Galactic coordinates (l,b,d,mu_l, mu_b, vlos) in [deg,deg,kpc,mas/yr,mas/yr,km/s) (mu_l = mu_l * cos b).
uvw (bool, optional) – If set, treat velocity part of radec or lb input as [U,V,W] in km/s.
- Return type:
instance
Notes
2010-07-XX - Original version started - Bovy (NYU)
2018-10-13 - Start of re-write to allow multiple orbits - Mathew Bub (UofT)
2019-01-01 - Better handling of unit/coordinate-conversion parameters and consistency checks - Bovy (UofT)
2019-02-01 - Handle array of SkyCoords in a faster way by making use of the fact that array of SkyCoords is processed correctly by Orbit
2019-03-19 - Allow array vxvv and arbitrary shapes - Bovy (UofT)
2023-07-20 - Allowed ro/zo/vo/solarmotion input to be arrays with the same shape as the Orbit itself - Bovy (UofT)