Python interface for the dynamics of galaxies. Uses agama, gala, and galpy as backends.
Project description
pidgey
A python interface for dynamics of galaxies, using existing galactic dynamics libraries in Python (galpy
, gala
and agama
) as backends.
This is currently used in the commensurability library.
Installation
Install this package via pip
:
python -m pip install pidgey
Usage
Get the points from an orbit integration stored in an astropy.coordinates.SkyCoord
object by calling the compute_orbit
method of a backend. The backend can generally be obtained from the potential used for the orbit integration with the get_backend_from
function.
import astropy.coordinates as c
import astropy.units as u
from pidgey import get_backend_from
def calculate_orbit(ic: c.SkyCoord,
potential: Any
) -> c.SkyCoord:
backend = get_backend_from(potential)
orbit = backend.compute_orbit(ic, potential, dt=0.01 * u.Gyr, steps=1000)
return orbit
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pidgey-0.2.2.tar.gz
(6.9 kB
view hashes)
Built Distribution
pidgey-0.2.2-py3-none-any.whl
(5.4 kB
view hashes)