Galpy

Latest version: v1.10.2

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

1.7.1

===================

- Main reason for this minor version is to add a Python 3.10 wheel

1.7

=================

- Added a general framework for spherical distribution function as
well as a general implementation of (a) the Eddington inversion to
obtain the ergodic distribution function, (b) the equivalent
inversion to get the Osipkov-Merritt-style anisotropy, and (c) the
Cuddeford inversion to obtain a distribution function with constant
anisotropy, all three for any spherical density in any spherical
potential (where it exists). Also added the distribution function of
a few well-known distribution functions, including (a) Hernquist
distribution functions that are isotropic, have constant anisotropy,
or have Osipkov-Merritt type anisotropy; (b) an isotropic Plummer
profile; (c) the isotropic NFW profile (either using the
approx. from Widrow 2000 or using an improved approximation) and the
Osipkov-Merritt NFW profile (new approximate form); (d) the King
model (also added as a potential as KingPotential). These
distribution functions can be evaluated and sampled, and their
velocity moments can be computed. Work started in 432 and continued
on from there. Distribution functions with constant anisotropy
require the JAX.

- Implemented the calculation of SCF density/potential expansion
coefficients based on an N-body representation of the density
(444).

- Added NFWPotential initialization method using rmax and vmax, the
radius and value at which the rotation curve peaks; also added rmax
and vmax methods to NFWPotential to compute these quantities for any
NFWPotential.

- Added general class SphericalPotential to make defining spherical
potentials easier (424).

- Added interpSphericalPotential class to build interpolated versions
of spherical potentials (424).

- Added AdiabaticContractionWrapperPotential, a wrapper potential to
adiabatically contract a spherical dark-matter halo in response to
the adiabatic growth of a baryonic component.

- Added potential functions to compute the zero-velocity curve: zvc
and zvc_range; the latter computes the range in R over which the
zero-velocity curve is defined, the former gives the positive z
position on the zero-velocity curve for a given radius in this
range.

- Added potential function and method rhalf to compute the half-mass
radius.

- Added potential function and member tdyn to compute the dynamical
time from the average density.

- Added TriaxialGaussianPotential, the potential of a Gaussian that is
stratified on triaxial ellipsoids (Emsellem et al. 1994). Useful for
implementing multi-Gaussian expansions of galactic potentials.

- Added PowerTriaxialPotential, the potential of a triaxial power-law
density (like PowerSphericalPotential, but triaxial).

- Added AnyAxisymmetricRazorThinDiskPotential, the potential of an
arbitrary razor-thin, axisymmetric disk.

- Added AnySphericalPotential, the potential of an arbitrary spherical
density distribution.

- Added RotateAndTiltWrapperPotential, a wrapper potential to
re-orient a potential arbitrarily in three dimensions using three
angles.

- Updated the definition of a Potential's mass to always return the
mass within a spherical shell if only one argument is
specified. Also implemented faster implementations of the masses of
SCF and diskSCF potentials.

- Added mixed azimuthal,vertical second derivative for all
non-axisymmetric potentials: potential function evaluatephizderivs
and Potential method phizderiv.

- Added inverse action-angle transformations for the isochrone
potential (actionAngleIsochroneInverse) and for a one-dimensional
harmonic oscillator (actionAngleHarmonicInverse; also added the
[x,v] -> [J,O,a] transformation for the latter,
actionAngleHarmonic).

- Added Potential.plotSurfaceDensity (potential.plotSurfaceDensities)
method (function) to plot the surface density of a Potential
instance (of Potential instance of a list of Potential instances).

- Re-implemented the DoubleExponentialDiskPotential in a simpler and
more accurate manner, using the double-exponential formula (no
relation) for integrals of Bessel functions from Ogata 2005. The
DoubleExponentialDiskPotential is now calculated to ~machine
precision almost everywhere and there is no longer any switch to a
Keplerian behavior at large R.

- Made potentials as much as possible numerically stable at r=0 and
r=numpy.inf (i.e., they don't give NaN). Still a few missing, but
the majority of potentials are well behaved now.

- Fixed angle calculation for actionAngleIsochrone and
actionAngleSpherical for non-inclined orbits (which are tricky).

- Replace Quantity parsing through the package as much as possible
with a set of centralized parsers (430).

- Renamed galpy.util.bovy_coords to galpy.util.coords,
galpy.util.bovy_conversion to galpy.util.conversion, and
galpy.util.bovy_plot to galpy.util.plot (but old 'from galpy.util
import bovy_X' will keep working for now). Also renamed some other
internal utility modules in the same way (bovy_symplecticode,
bovy_quadpack, and bovy_ars; these are not kept
backwards-compatible).

- Added Python 3.9 support.

- Switched Linux CI from Travis to GitHub Actions. Also added Windows
CI to GitHub Actions covering almost all tests. Appveyor CI for
Windows also still running.

1.6

=================

- Added HomogeneousSpherePotential, the potential of a constant
density sphere out to some radius R.

- Added DehnenSphericalPotential and DehnenCoreSphericalPotential, the
general potential from Dehnen (1993) and its cored special case
(403).

- Standardized the way packages are imported: numpy as 'import numpy',
avoid use of math, don't use scipy's numpy interface, internal
imports for all galpy imports.

- Implemented ChandrasekharDynamicalFrictionForce in C, introducing a
general scheme for easily implementing velocity-dependent forces in
C without requiring all forces to take velocity arguments (420).

- Fixed AMUSE compatibility with Potentials instantiated with physical
inputs (405).

- Fix how DiskSCFPotential instances with a hole in the surface
density get passed to C (was wrong when type == 'exp', but 'Rhole'
was in the list of parameters, hole was not passed; meant that
McMillan17 was wrong in C in v1.5).

- Add time dependence to all relevant Potential functions and method
(404).

- Raise warning when r < minr (where dynamical friction gets turned
off) in an orbit integration that includes dynamical friction (to
avoid silent turning off of the dynamical friction force; 356).

- Improve performance of orbit animations (414).

- Fixed compilation issue for Intel compilers: no need to include
'lgomp' in the linking step (416).

- Compile all main galpy C extensions into a single shared-object
library libgalpy.

- Automatically build Linux, Mac, and Windows wheels with GitHub
Actions and upload them to PyPI upon release creation (421).

1.5

=================

- Added support for holding multiple objects in an Orbit instance,
with efficient handling of multiple objects and parallelized
integration and action-angle-related functions. Orbit instances can
now have arbitrary shapes. Full re-write of Orbit class (PR 384).

- Added support for 1D orbit integration in C (PR 354).

- Added a (JSON) list with the phase-space coordinates of known
objects (mainly globular clusters and dwarf galaxies) for easy
Orbit.from_name initialization. For ease of use,
Orbit.from_name also supports tab completion for known objects in
this list in IPython/Jupyter (PR 392).

- Added the galpy.potentials.mwpotentials module with various
Milky-Way-like potentials. Currently included are MWPotential2014,
McMillan17 for the potential from McMillan (2017), models 1 through
4 from Dehnen & Binney (1998), and the three models from Irrgang et
al. (2013). See PR 395.

- Added potential.to_amuse to create an AMUSE
(http://www.amusecode.org) representation of any galpy potential,
allowing galpy potentials to be used as external gravitational
fields in AMUSE N-body simulations (398).

- Added potential.toVerticalPotential to convert any 3D potential to a
1D potential at a given (R,phi) [generalizes RZToverticalPotential
to non-axi potentials; RZToverticalPotential retained for backwards
compatibility].

- Re-wrote potential.MovingObjectPotential to allow general mass
distributions for the moving object, implemented now as standard
galpy potentials rather than with separate ForceSoftening class,
which has now been removed (355). Initialization keywords for
potential.MovingObjectPotential have changed because of this in a
non-backwards-compatible manner.

- Added support to combine Potential instances or lists thereof
through the addition operator. E.g., pot= pot1+pot2+pot3 to create
the combined potential of the three component potentials
(pot1,pot2,pot3). Each of these components can be a combined
potential itself. As before, combined potentials are simply lists of
potentials, so this is simply an alternative (and perhaps more
intuitive) way to create these lists (369).

- Added support to adjust the amplitude of a Potential instance
through multiplication of the instance by a number or through
division by a number. E.g., pot= 2.*pot1 returns a Potential instance
that is the same as pot1, except that the amplitude is twice
larger. Similarly, pot= pot1/2. decreases the amplitude by a factor
of two. This is useful, for example, to quickly change the mass of a
potential. Only works for Potential instances, not for lists of
Potential instances (369).

- Added support to plot arbitrary combinations of the basic Orbit
attributes by giving them as an expression (e.g.,
orb.plot(d2='vR*R/r+vz*z/r')); requires the numexpr package.

- Switched default Sun's vertical height zo parameter for Orbit
initialization to be the value of 20.8 pc from Bennett & Bovy
(2019).

- Added IsothermalDiskPotential, the one-dimensional potential of an
isothermal self-gravitating disk (sech^2 profile).

- Added NumericalPotentialDerivativesMixin, a Mixin class to add
numerically-computed forces and second derivatives to any Potential
class, allowing new potentials to be implemented quickly by only
implementing the potential itself and obtaining all forces and
second derivatives numerically.

- Added nemo_accname and nemo_accpars for the HernquistPotential,
allowing it to be converted to NEMO.

- DehnenSmoothWrapperPotential can now decay rather than grow a
potential by setting ``decay=True``.

- DehnenBarPotential and SpiralArmsPotential method now work for array
inputs (PR 388, by webbjj).

- Allow transformations of custom coordinate systems (positions
and proper motions) to ICRS (ra,dec) and (pmra,pmdec).

- Allow orbit integrations to be KeyboardInterrupted on Windows as well
(362 by Henry Leung)

- Add Python and C implementation of Dormand-Prince 8(5,3) integrator
(363 by Henry Leung)

- Added function galpy.util.bovy_conversion.get_physical to obtain the
ro and vo parameters describing the conversion between physical and
internal units as a dictionary. This works for any galpy object or
lists of such objects.

- Improved efficiency of requesting an integrated orbit at the exact
times at which it was integrated (~10x faster now).

1.4

=================

- Added ChandrasekharDynamicalFrictionForce, an implementation of
dynamical friction based on the classical Chandrasekhar formula
(with recent tweaks from the literature to better represent the
results from N-body simulations).

- Added galpy.df.jeans with tools for Jeans modeling. Currently only
contains the functions sigmar and sigmalos to calculate the velocity
dispersion in the radial or line-of-sight direction using the
spherical Jeans equation in a given potential, density profile, and
anisotropy profile (anisotropy can be radially varying).

- Added CorotatingRotationWrapperPotential to galpy.potential: a
wrapper to make a pattern wind up over time such that it is always
corotating (for use in simulating corotating spiral structure like
that of Grand, Kawata, Baba, et al.)

- Added GaussianAmplitudeWrapperPotential to galpy.potential: a
wrapper to modulate the amplitude of any Potential instance with a
Gaussian (growing from zero to the full amplitude and dying off
again).

- Added a general class EllipsoidalPotential that is a superclass for
implementing potentials with densities that are constant on
ellipsoids (functions of m^2 = x^2 + y^2/b^2 + z^2/c^2). Also
implemented in C. Implementing new types of ellipsoidal potentials
now only requires three simple functions to be defined: the density
as a function of m, its derivative with respect to m, and its
integral with respect to m^2 (348).

- Added PerfectEllipsoidPotential, the potential of a perfect
ellipsoid (de Zeeuw 1985): this is a fully integrable
(Staeckel-type), triaxial potential.

- Re-implemented TwoPowerTriaxialPotential and special cases
TriaxialHernquistPotential, TriaxialJaffePotential, and
TriaxialNFWPotential using the general EllipsoidalPotential class.

- Allow nested lists of Potential instances everywhere where lists of
Potential instances were previously allowed; allow easy adding of
components (e.g., a bar) to previously defined potentials (which may
be lists themselves): new_pot= [pot,bar_pot].

- Add from_name class method of Orbit, which allows Orbit instances to
be initialized using the coordinates of a named object found in SIMBAD.

- Add rguiding method of Orbit, to compute the guiding-center radius
of an orbit. Also added Lz method to easily obtain the z-component
of the angular momentum for different types of orbits.

- Defined Orbit initialization without any arguments (or, more
generally, without specifying the vxvv initial phase-space input) to
return an Orbit instances representing the Sun. Can therefore setup
an Orbit representing the Sun's as o= Orbit().

- Allow Orbit instances to be initialized using a SkyCoord with
position and velocity data, with optional Galactocentric frame
specification as part of the SkyCoord that is correctly propagated
to the Orbit instance. Requires astropy>3

- Added rtide and ttensor methods/functions for Potentials: tidal
radius and tidal tensor.

- Added surfdens and evaluateSurfaceDensities method and function,
respectively, for Potentials for evaluating the surface density up
to a given z.

- Added potentials SphericalShellPotential and RingPotential for the
potential of a spherical shell and a circular ring,
respectively. Useful for talking about Newton's theorems.

- Switched default solarmotion parameter for Orbit initialization to
be schoenrich (for the Schoenrich, Binney, & Dehnen 2010 solar
motion wrt the LSR).

- Added Potential method r2deriv and function evaluater2derivs to
evaluate the second derivative wrt the spherical radius. Also added
convenience functions evaluatephi2derivs and evaluateRphiderivs.

- Added quasiisothermaldf method sampleV_interpolate that allows
velocities at different positions to be sampled efficiently
(quasiisothermaldf.sampleV only works for a single position). See PR
350.

- Add warnings/verbose configuration parameter to set level of
verbosity of non-crucial warnings (like: "Using C implementation to
integrate orbits").

- If astropy version > 3, Orbit.SkyCoord returns a SkyCoord object
that includes the velocity information and the Galactocentric frame
used by the Orbit instance.

- Tweaked coordinate-transformations to Galactocentric coordinates to
be consistent with astropy's.

- Introduced general Force class of which Potential and
DissipativeForce inherit, the former for forces that derive from a
potential, the latter for those that do not.

- Introduced DissipativeForce, a superclass for all dissipative
forces. ChandrasekharDynamicalFrictionForce is currently the only
class that inherits from DissipativeForce.

- Re-arranged the package structure to better comply with the standard
layout. All subpackages (e.g., galpy.potential) are now contained in
subdirectories of the same name (e.g., galpy/potential/ rather than
the old galpy/potential_src/).

- Made the code fully compilable on Windows with MSVC and test Windows
builds automatically on appveyor (333).

1.3

==================

- Added a fast and precise method for approximating an orbit's
eccentricity, peri- and apocenter radii, and maximum height above
the midplane using the Staeckel approximation (see Mackereth & Bovy
2018); available as an actionAngle method EccZmaxRperiRap and for
Orbit instances through the e, rperi, rap, and zmax methods.

- Added support for potential wrappers---classes that wrap existing
potentials to modify their behavior (307). See the documentation on
potentials and the potential API for more information on these.

- Added DehnenSmoothWrapperPotential, a potential wrapper to smoothly
grow a gravitational potential (e.g., a bar) following Dehnen
(2000).

- Added SolidBodyRotationWrapperPotential, a potential wrapper to make
a gravitational potential rotate around the z axis with a fixed,
uniform pattern speed.

- Added DiskSCFPotential, a class that implements general
density/potential pairs for disk potentials by combining Kuijken &
Dubinski (1995)'s trick for turning a separable disk density
[rho(R,z) = \Sigma(R) x h(z)] into a ellipsoidal-ish density, with
the SCF basis-function-expansion approach of Hernquist & Ostriker
(1992) for solving for the ellipsoidal-ish density's potential. This
is a fully general Poisson solver (i.e., any density can be
represented in this way).

- Added SoftenedNeedleBarPotential, a simple potential for a bar that
consists of a needle softened by a Miyamoto-Nagai kernel (Long &
Murali 1992).

- Added FerrersPotential, a class that implements the potential for
triaxial ellipsoids (Binney & Tremaine 2008, Ch 2.5) with an option
to give a pattern speed to the ellipsoid.

- Added SpiralArmsPotential, a class that implements the spiral arms
potential from Cox and Gomez
(2002). https://arxiv.org/abs/astro-ph/0207635v1 (#305)

- Added the Henon & Heiles (1964) potential

- Added an Orbit method to display an animation of an integrated orbit
in jupyter notebooks (Orbit.animate).

- Added galpy.df.schwarzschilddf, the simple Schwarzschild
distribution function for a razor-thin disk.

- Upgraded LogarithmicHaloPotential to allow it to be a triaxial
potential.

- Upgraded DehnenBarPotential to a 3D potential following Monari et
al. (2016) (304).

- Generalized CosmphiDiskPotential to allow for a break radius within
which the radial dependence of the potential changes from R^p to
R^-p; also added C implementation of CosmphiDiskPotential.

- Changed default method for computing actions, frequencies, and
angles for Orbit instances to be the Staeckel approximation with an
automatically-estimated delta parameter.

- Added an option to the estimateDeltaStaeckel function to facilitate the
return of an estimated delta parameter at every phase space point passed,
rather than returning a median of the estimate at each point.

- Generalized actionAngleStaeckel to allow for different focal lengths
delta for different phase-space points. Also allowed the order of
the Gauss-Legendre integration to be specified (default: 10, which
is good enough when using actionAngleStaeckel to compute approximate
actions etc. for an axisymmetric potential).

- Allow transformations of (ra,dec) and (pmra,pmdec) to custom
coordinate systems.

- Allow plotting of the spherical radius in Orbit.plot

- Allow plotting of arbitrary user-supplied functions of time in
Orbit.plot, Orbit.plot3d, and Orbit.animate.

- Added conversion to and from oblate spheroidal coordinates. Also
added conversion of velocities to the momenta in oblate or prolate
spheroidal coordinates (but not the other way around).

- Made SCFPotential compatible with GSL v2.

- Orbit methods now all return a scalar when called with a single
time (see 247 and 294).

- Added a warning whenever the orbit-integration method that is used
is different from the requested one (for when C integration falls
back onto Python; see 286).

- Turn off changing the seaborn default plot configuration to that
preferred by this code's maintainer; can be turned back on by
specifying ``seaborn-bovy-defaults = True`` in the configuration
file (see documentation). Old configuration files will be
automatically updated to add this option (but remain otherwise the
same).

- Added button to code examples in the documentation that copies the
examples to the user's clipboard for easy pasting into a Python
interpreter.

- Switched test suite from nose to pytest (303).

- quasiisothermaldf.tilt return unit switched from deg to rad.

- streamdf.misalignment return unit switched from deg to rad.

- evolveddiskdf.vertexdev return unit switched from deg to rad.

- In quasiisothermaldf.py, the following prefactors were added
to the following functions: [nsigma^2/2] --> pvT(),
[nsigma/2] --> pvRvT(), [nsigma/2] --> pvTvz(),
[vTmax/2] --> pvRvz(). This change was required to correctly
account for the Gauss-Legendre integration limits.

Page 3 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.