pynbody.analysis.gravity.accel

Contents

pynbody.analysis.gravity.accel#

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

Calculates the gravitational acceleration vector 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)