Axisymmetrized N-body snapshot potential¶
- class galpy.potential.SnapshotRZPotential(s, num_threads=None, nazimuths=4, ro=None, vo=None)[source]¶
Class that implements an axisymmetrized version of the potential of an N-body snapshot (requires pynbody)
_evaluate, _Rforce, and _zforce calculate a hash for the array of points that is passed in by the user. The hash and corresponding potential/force arrays are stored – if a subsequent request matches a previously computed hash, the previous results are returned and not recalculated.
- __init__(s, num_threads=None, nazimuths=4, ro=None, vo=None)[source]¶
NAME:
__init__
PURPOSE:
Initialize a SnapshotRZ potential object
INPUT:
s - a simulation snapshot loaded with pynbody
num_threads= (4) number of threads to use for calculation
nazimuths= (4) number of azimuths to average over
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)