pynbody.analysis.gravity.potential

Contents

pynbody.analysis.gravity.potential#

pynbody.analysis.gravity.potential(f, pos_vec, eps=None, unit=None)[source]#

Calculates the gravitational potential at the specified position using all particles in the specified snapshot.

The gravitational softening length is determined by (in order of preference):

  1. The parameter eps (scalar, unit or array)

  2. The array f[‘eps’]

  3. f.properties[‘eps’] (scalar or unit)