galpy.df.streamspraydf.sample

streamspraydf.sample(n, return_orbit=True, returndt=False, integrate=True)[source]

Sample from the DF

Parameters:
  • n (int) – Number of points to return.

  • return_orbit (bool, optional) – If True, the output phase-space positions is an orbit.Orbit object. If False, the output is (R,vR,vT,z,vz,phi). Default is True.

  • returndt (bool, optional) – If True, also return the time since the star was stripped. Default is False.

  • integrate (bool, optional) – If True, integrate the orbits to the present time. If False, return positions at stripping (probably want to combine with returndt=True then to make sense of them!). Default is True.

Returns:

Orbit instance or (R,vR,vT,z,vz,phi) of points on the stream in 6,N array (set of 6 Quantities when physical output is on); optionally the time is included as well. The ro/vo unit-conversion parameters and the zo/solarmotion parameters as well as whether physical outputs are on, match the settings of the progenitor Orbit given to the class initialization

Return type:

Orbit, numpy.ndarray, or tuple

Notes

  • 2018-07-31 - Written - Bovy (UofT)

  • 2022-05-18 - Made output Orbit ro/vo/zo/solarmotion/roSet/voSet match that of the progenitor orbit - Bovy (UofT)