galpy: A Python Library for Galactic Dynamics
arXiv:1412.3451 · doi:10.1088/0067-0049/216/2/29
Abstract
I describe the design, implementation, and usage of galpy, a Python package for galactic-dynamics calculations. At its core, galpy consists of a general framework for representing galactic potentials both in Python and in C (for accelerated computations); galpy functions, objects, and methods can generally take arbitrary combinations of these as arguments. Numerical orbit integration is supported with a variety of Runge-Kutta-type and symplectic integrators. For planar orbits, integration of the phase-space volume is also possible. galpy supports the calculation of action-angle coordinates and orbital frequencies for a given phase-space point for general spherical potentials, using state-of-the-art numerical approximations for axisymmetric potentials, and making use of a recent general approximation for any static potential. A number of different distribution functions (DFs) are also included in the current release; currently these consist of two-dimensional axisymmetric and non-axisymmetric disk DFs, a three-dimensional disk DF, and a DF framework for tidal streams. I provide several examples to illustrate the use of the code. I present a simple model for the Milky Way's gravitational potential consistent with the latest observations. I also numerically calculate the Oort functions for different tracer populations of stars and compare it to a new analytical approximation. Additionally, I characterize the response of a kinematically-warm disk to an elliptical m=2 perturbation in detail. Overall, galpy consists of about 54,000 lines, including 23,000 lines of code in the module, 11,000 lines of test code, and about 20,000 lines of documentation. The test suite covers 99.6% of the code. galpy is available at http://github.com/jobovy/galpy with extensive documentation available at http://galpy.readthedocs.org/en/latest .
ApJS, in press; 29 pages, 30 figures, including many code examples. galpy is available at http://github.com/jobovy/galpy and code to reproduce this paper's figures can be found at http://github.com/jobovy/galpy-paper-figures
References in corpus (8)
- The Milky Way's Circular Velocity Curve to 60 kpc and an Estimate of the Dark Matter Halo Mass from Kinematics of ~2400 SDSS Blue Horizontal Branch Stars
- The RAVE Survey: Constraining the Local Galactic Escape Speed
- The Milky Way's circular velocity curve between 4 and 14 kpc from APOGEE data
- On the local dark matter density
- Constraining the Galaxy's dark halo with RAVE stars
- Milky Way Kinematics: Measurements at the Subcentral Point of the Fourth Quadrant
- New Constraints on the Galactic Bar
- The Effect of Spiral Structure on the Measurements of the Oort Constants
Cited by in corpus (37)
- The Radial Velocity Experiment (RAVE): Fifth Data Release
- The shape of the inner Milky Way halo from observations of the Pal 5 and GD-1 stellar streams
- The AMBRE Project: chemical evolution models for the Milky Way thick and thin discs
- Generation of mock tidal streams
- The AMBRE project: The thick thin disk and thin thick disk of the Milky Way
- The power spectrum of the Milky Way: Velocity fluctuations in the Galactic disk
- The evolution of the Milky Way: New insights from open clusters
- Differences in the rotational properties of multiple stellar populations in M 13: a faster rotation for the "extreme" chemical subpopulation
- The Clouds are breaking: tracing the Magellanic system with Gaia DR1 Mira variables
- Deep Subaru Hyper Suprime-Cam observations of Milky Way satellites Columba I and Triangulum II
- Proper motions in the VVV Survey: Results for more than 15 million stars across NGC 6544
- The Hercules stream as seen by APOGEE-2 South
- Constraints on Radial Migration in Spiral Galaxies - II. Angular momentum distribution and preferential migration
- The Gaia-ESO Survey: Churning through the Milky Way
- Applying Schwarzschild's orbit superposition method to barred or non-barred disc galaxies
- An artificial neural network to discover Hypervelocity stars: Candidates in Gaia DR1/TGAS
- : a new compilation of the Milky Way rotation curve data
- ESO452-SC11: The lowest mass globular cluster with a potential chemical inhomogeneity
- The Rotation-Metallicity Relation for the Galactic Disk as Measured in the Gaia DR1 TGAS and APOGEE Data
- Using the Multi-Object Adaptive Optics demonstrator RAVEN to observe metal-poor stars in and towards the Galactic Centre
- How to make a mature accreting magnetar
- Local Stellar Kinematics from RAVE data - VII. Metallicity Gradients from Red Clump Stars
- Activity and Kinematics of White Dwarf-M Dwarf Binaries from the SUPERBLINK Proper Motion Survey
- Detailed chemical abundance analysis of the thick disk star cluster Gaia 1
- The universality of the rapid neutron-capture process revealed by a possible disrupted dwarf galaxy star
- On the Oosterhoff dichotomy in the Galactic bulge: II. kinematical distribution
- Star Streams and the Assembly History of the Galaxy
- Detection of a dearth of stars with zero angular momentum in the solar neighbourhood
- Torus Models of the Outer Disc of the Milky Way using LAMOST Survey Data
- The vertical metallicity gradients of mono-age stellar populations in the Milky Way with the RAVE and Gaia data
- Study of Eclipsing Binary and Multiple Systems in OB Associations IV: Cas OB6 Member DN Cas
- The influence of dark matter halo on the stellar stream asymmetry via dynamical friction
- Velocity Variations in the Phoenix-Hermus Star Stream
- 6-quark Dark Matter
- Architecture of the Andromeda: a quantitative analysis of clustering in the inner stellar halo
- Integrals of motion for non-axisymmetric potentials
- iota Horologii is unlikely to be an evaporated Hyades star