Welcome to galpy’s documentation (2024)

Table of Contents
Try galpy¶ Plot the rotation curve of the Milky Way >>> from galpy.potential import (plotRotcurve, MWPotential2014 as mwp14)>>> import matplotlib.pyplot as plt>>> plotRotcurve(mwp14)>>> plotRotcurve(mwp14[0],label='Bulge',overplot=True)>>> plotRotcurve(mwp14[1],label='Disk',overplot=True)>>> plotRotcurve(mwp14[2],label='Halo',overplot=True)>>> plt.legend() or integrate the orbit of MW satellites >>> from galpy.orbit import Orbit>>> from galpy.potential import MWPotential2014>>> import numpy>>> ts= numpy.linspace(0.,5.,2001)*u.Gyr>>> o= Orbit.from_name('MW satellite galaxies')>>> o.integrate(ts,MWPotential2014)>>> o.plot(xrange=[0.,100.],yrange=[-100.,100.])>>> o[o.name=='LMC'].plot(c='r',lw=5.,overplot=True) or calculate the Sun's orbital actions, frequencies, and angles >>> from galpy.orbit import Orbit>>> from galpy.potential import ( MWPotential2014 as mwp14)>>> o= Orbit()>>> print(o.jr(pot=mwp14),o.Lz(),o.jz(pot=mwp14))>>> print(o.Or(pot=mwp14),o.Op(pot=mwp14),o.Oz(pot=mwp14))>>> print(o.wr(pot=mwp14),o.wp(pot=mwp14),o.wz(pot=mwp14)) and much more... Start your journey below or integrate the orbit of MW satellites >>> from galpy.orbit import Orbit>>> from galpy.potential import MWPotential2014>>> import numpy>>> ts= numpy.linspace(0.,5.,2001)*u.Gyr>>> o= Orbit.from_name('MW satellite galaxies')>>> o.integrate(ts,MWPotential2014)>>> o.plot(xrange=[0.,100.],yrange=[-100.,100.])>>> o[o.name=='LMC'].plot(c='r',lw=5.,overplot=True) or calculate the Sun's orbital actions, frequencies, and angles >>> from galpy.orbit import Orbit>>> from galpy.potential import ( MWPotential2014 as mwp14)>>> o= Orbit()>>> print(o.jr(pot=mwp14),o.Lz(),o.jz(pot=mwp14))>>> print(o.Or(pot=mwp14),o.Op(pot=mwp14),o.Oz(pot=mwp14))>>> print(o.wr(pot=mwp14),o.wp(pot=mwp14),o.wz(pot=mwp14)) and much more... Start your journey below and much more... Start your journey below Quick-start guide¶ Library reference¶ Acknowledging galpy¶ Papers using galpy¶ References

galpy is a Python package for galacticdynamics. It supports orbit integration in a variety of potentials,evaluating and sampling various distribution functions, and thecalculation of action-angle coordinates for all staticpotentials. galpy is an astropyaffiliated package andprovides full support for astropy’s Quantityframework for variables with units.

galpy is developed on GitHub. If you are looking to report an issue, join the galpy slack community, or for information on howto contribute to the code,please head over to galpy’s GitHub page for more information.

Try galpy

Give galpy a try in the interactive IPython-like shell below!

Plot the rotation curve of the Milky Way
>>> from galpy.potential import (plotRotcurve, MWPotential2014 as mwp14)>>> import matplotlib.pyplot as plt>>> plotRotcurve(mwp14)>>> plotRotcurve(mwp14[0],label='Bulge',overplot=True)>>> plotRotcurve(mwp14[1],label='Disk',overplot=True)>>> plotRotcurve(mwp14[2],label='Halo',overplot=True)>>> plt.legend()

or integrate the orbit of MW satellites
>>> from galpy.orbit import Orbit>>> from galpy.potential import MWPotential2014>>> import numpy>>> ts= numpy.linspace(0.,5.,2001)*u.Gyr>>> o= Orbit.from_name('MW satellite galaxies')>>> o.integrate(ts,MWPotential2014)>>> o.plot(xrange=[0.,100.],yrange=[-100.,100.])>>> o[o.name=='LMC'].plot(c='r',lw=5.,overplot=True)

or calculate the Sun's orbital actions, frequencies, and angles

>>> from galpy.orbit import Orbit>>> from galpy.potential import ( MWPotential2014 as mwp14)>>> o= Orbit()>>> print(o.jr(pot=mwp14),o.Lz(),o.jz(pot=mwp14))>>> print(o.Or(pot=mwp14),o.Op(pot=mwp14),o.Oz(pot=mwp14))>>> print(o.wr(pot=mwp14),o.wp(pot=mwp14),o.wz(pot=mwp14))

and much more... Start your journey below


(This interactive shell runs using the pyodide Python kernel, a version of Python that runs in your browser. galpy runs in your browser at compiled-C-like speed! Please open an Issue for any problems that you find with the interactive session.)

Quick-start guide

  • Installation
    • TL;DR
    • Dependencies
    • Detailed installation instructions
    • Development installation
    • More esoteric installations
    • Installation FAQ
    • Configuration file
  • What’s new?
    • v1.10
    • v1.9
    • v1.8
    • v1.7
    • v1.6
    • v1.5
    • Pre-v1.5
  • Introduction
    • Rotation curves
    • Units in galpy
    • Orbit integration
    • Escape velocity curves
  • Potentials in galpy
    • Potentials and forces
    • Densities
    • Modifying potential instances using wrappers
    • Close-to-circular orbits and orbital frequencies
    • Using interpolations of potentials
    • Initializing potentials with parameters with units
    • General density/potential pairs with basis-function expansions
    • The potential of N-body simulations
    • Conversion to NEMO potentials
    • Conversion to AMUSE potentials
    • Dissipative forces
    • Adding potentials to the galpy framework
    • Adding wrapper potentials to the galpy framework
    • Adding dissipative forces to the galpy framework
  • A closer look at orbit integration
    • Orbit initialization
    • Orbit integration
    • Orbit integration in non-inertial frames
    • Displaying the orbit
    • Animating the orbit
    • Orbit characterization
    • Fast orbit characterization
    • Accessing the raw orbit
    • Fast orbit integration and available integrators
    • Surfaces of section
    • Integration of the phase-space volume
    • Example: The eccentricity distribution of the Milky Way’s thick disk
    • Example: The orbit of the Large Magellanic Cloud in the presence of dynamical friction
    • Example: Including the Milky Way center’s barycentric acceleration due to the Large Magellanic Cloud in orbit integrations
  • Two-dimensional disk distribution functions
    • Types of disk distribution functions
    • Evaluating moments of the DF
    • Using corrected disk distribution functions
    • Oort constants and functions
    • Sampling data from the DF
    • Non-axisymmetric, time-dependent disk distribution functions
    • Example: The Hercules stream in the Solar neighborhood as a result of the Galactic bar
  • Action-angle coordinates
    • Action-angle coordinates for the isochrone/harmonic potentials
    • Forward action-angle transformations (x, v) –> (J, O, a)
    • Reverse action-angle transformations (J, a) –> (x, v, O)
    • Accessing action-angle coordinates for Orbit instances
    • Example: Evidence for a Lindblad resonance in the Solar neighborhood
    • Example: actions in an N-body simulation
  • Three-dimensional disk distribution functions
    • Setting up the DF and basic properties
    • Evaluating moments
    • Evaluating and sampling the full probability distribution function
  • Dynamical modeling of tidal streams
    • Modeling streams in action-angle coordinates with streamdf
    • Particle-spray modeling of streams with streamspraydf

Library reference

  • Orbit (galpy.orbit)
    • Initialization
    • Plotting
    • Attributes
    • Methods
  • Potential (galpy.potential)
    • 3D potentials
    • Milky-Way-like potentials
    • 2D potentials
    • 1D potentials
    • Potential wrappers
  • actionAngle (galpy.actionAngle)
    • (x, v) –> (J, O, a)
    • (J, a) –> (x, v, O)
  • DF (galpy.df)
    • Jeans modeling tools (galpy.df.jeans)
    • General instance routines for all df classes
    • Spherical distribution functions
    • Two-dimensional, axisymmetric disk distribution functions
    • Two-dimensional, non-axisymmetric disk distribution functions
    • Three-dimensional disk distribution functions
    • The distribution function of a tidal stream in action-angle coordinates
    • The distribution function of a gap in a tidal stream
    • The distribution function of a tidal stream using a particle-spray technique
  • Utilities (galpy.util)
    • config: galpy configuration module
    • plot: general wrappers for matplotlib plotting
    • conversion: transformation between *natural* units and *physical* units
    • coords: coordinate transformation functions
    • ars: adaptive-rejection sampling

Acknowledging galpy

If you use galpy in a publication, please cite the following paper

  • galpy: A Python Library for Galactic Dynamics, Jo Bovy (2015), Astrophys. J. Supp., 216, 29 (arXiv/1412.3451).

and link to http://github.com/jobovy/galpy. Some of the code’sfunctionality is introduced in separate papers:

Please also send me a reference to the paper or send a pull requestincluding your paper in the list of galpy papers on this page (thispage is at doc/source/index.rst). Thanks!

Papers using galpy

galpy has been used in more than 200 scientific publications in the astrophysical literature. Covering topics as diverse as the properties of planetary systems around distant stars, the kinematics of pulsars and stars ejected from the Milky Way by supernova explosions, binary evolution in stellar clusters, chemo-dynamical modeling of stellar populations in the Milky Way, and the dynamics of satellites around external galaxies, galpy is widely used throughout astrophysics.

Check out the gallery below for examples:

  • Index

  • Module Index

  • Search Page

Welcome to galpy’s documentation (2024)

References

Top Articles
What Does Breckie Hill Do? – Bahay Nakpil-Bautista
Getting Breckie Hill - Elite2com
Housing near Juneau, WI - craigslist
Prosper TX Visitors Guide - Dallas Fort Worth Guide
Owatc Canvas
King Fields Mortuary
Irving Hac
A.e.a.o.n.m.s
Find your energy supplier
Whitley County Ky Mugshots Busted
Funny Marco Birth Chart
Bowlero (BOWL) Earnings Date and Reports 2024
Nj State Police Private Detective Unit
Baywatch 2017 123Movies
Mile Split Fl
Truck Trader Pennsylvania
History of Osceola County
Velocity. The Revolutionary Way to Measure in Scrum
Osborn-Checkliste: Ideen finden mit System
Pjs Obits
Drift Boss 911
Plaza Bonita Sycuan Bus Schedule
What Time Does Walmart Auto Center Open
8000 Cranberry Springs Drive Suite 2M600
The Creator Showtimes Near R/C Gateway Theater 8
Best Middle Schools In Queens Ny
Garden Grove Classlink
Royalfh Obituaries Home
Narragansett Bay Cruising - A Complete Guide: Explore Newport, Providence & More
Section 408 Allegiant Stadium
What we lost when Craigslist shut down its personals section
Stickley Furniture
Downloahub
Ff14 Sage Stat Priority
Angel del Villar Net Worth | Wife
Sun Haven Pufferfish
Free Robux Without Downloading Apps
Craigslist Greencastle
Best Weapons For Psyker Darktide
Myfxbook Historical Data
Lamp Repair Kansas City Mo
Panolian Batesville Ms Obituaries 2022
Citroen | Skąd pobrać program do lexia diagbox?
2013 Honda Odyssey Serpentine Belt Diagram
705 Us 74 Bus Rockingham Nc
Theater X Orange Heights Florida
N33.Ultipro
Whitney Wisconsin 2022
House For Sale On Trulia
FactoryEye | Enabling data-driven smart manufacturing
Coldestuknow
Ranking 134 college football teams after Week 1, from Georgia to Temple
Latest Posts
Article information

Author: Allyn Kozey

Last Updated:

Views: 6322

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Allyn Kozey

Birthday: 1993-12-21

Address: Suite 454 40343 Larson Union, Port Melia, TX 16164

Phone: +2456904400762

Job: Investor Administrator

Hobby: Sketching, Puzzles, Pet, Mountaineering, Skydiving, Dowsing, Sports

Introduction: My name is Allyn Kozey, I am a outstanding, colorful, adventurous, encouraging, zealous, tender, helpful person who loves writing and wants to share my knowledge and understanding with you.