Interpolated SnapshotRZ potential

This class is built on the interpRZPotential class; see the documentation of that class here for additional information on how to setup objects of the InterpSnapshotRZPotential class.

class galpy.potential.InterpSnapshotRZPotential(s, ro=None, vo=None, rgrid=(np.float64(-4.605170185988091), np.float64(2.995732273553991), 101), zgrid=(0.0, 1.0, 101), interpepifreq=False, interpverticalfreq=False, interpPot=True, enable_c=True, logR=True, zsym=True, numcores=None, nazimuths=4, use_pkdgrav=False)[source]

Interpolated axisymmetrized potential extracted from a simulation output (see interpRZPotential and SnapshotRZPotential)

__init__(s, ro=None, vo=None, rgrid=(np.float64(-4.605170185988091), np.float64(2.995732273553991), 101), zgrid=(0.0, 1.0, 101), interpepifreq=False, interpverticalfreq=False, interpPot=True, enable_c=True, logR=True, zsym=True, numcores=None, nazimuths=4, use_pkdgrav=False)[source]

Initialize an InterpSnapshotRZPotential instance

Parameters:
  • s (pynbody.snapshot) – A simulation snapshot loaded with pynbody.

  • rgrid (tuple, optional) – R grid to be given to linspace as in rs= linspace(*rgrid).

  • zgrid (tuple, optional) – z grid to be given to linspace as in zs= linspace(*zgrid).

  • interpepifreq (bool, optional) – If True, interpolate the epicycle frequencies (default: False).

  • interpverticalfreq (bool, optional) – If True, interpolate the vertical frequencies (default: False).

  • interpPot (bool, optional) – If True, interpolate the potential (default: True).

  • enable_c (bool, optional) – If True, use C for the interpolation (default: True).

  • logR (bool, optional) – If True, rgrid is in the log of R so logrs= linspace(*rgrid) (default: True).

  • zsym (bool, optional) – If True (default), the potential is assumed to be symmetric around z=0 (so you can use, e.g., zgrid=(0.,1.,101)).

  • numcores (int, optional) – Number of cores to use for the interpolation (default: from pynbody configuration).

  • nazimuths (int, optional) – Number of azimuths to average over (default: 4).

  • use_pkdgrav (bool, optional) – If True, use PKDGRAV to calculate the snapshot’s potential and forces (default: False).

  • ro (float or Quantity, optional) – Distance scale for translation into internal units (default from configuration file).

  • vo (float or Quantity, optional) – Velocity scale for translation into internal units (default from configuration file).

Notes

  • 2013 - Written - Rok Roskar (ETH)

  • 2014-11-24 - Edited for merging into main galpy - Bovy (IAS)