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=(-4.605170185988091, 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=(-4.605170185988091, 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]

NAME:

__init__

PURPOSE:

Initialize an InterpSnapshotRZPotential instance

INPUT:

s - a simulation snapshot loaded with pynbody

rgrid - R grid to be given to linspace as in rs= linspace(*rgrid)

zgrid - z grid to be given to linspace as in zs= linspace(*zgrid)

logR - if True, rgrid is in the log of R so logrs= linspace(*rgrid)

interpPot, interpepifreq, interpverticalfreq= if True, interpolate these functions (interpPot=True also interpolates the R and zforce)

enable_c= enable use of C for interpolations

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

numcores= if set to an integer, use this many cores

nazimuths= (4) number of azimuths to average over

use_pkdgrav= (False) use PKDGRAV to calculate the snapshot’s potential and forces (CURRENTLY NOT IMPLEMENTED)

ro=, vo= distance and velocity scales for translation into internal units (default from configuration file)

OUTPUT:

instance

HISTORY:

2013 - Written - Rok Roskar (ETH)

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