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]

Initialize a SnapshotRZ potential object

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

  • num_threads (int, optional) – Number of threads to use for calculation. Default is None.

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

  • 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)