# galpy.df.streamspraydf.sample¶

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

NAME:

sample

PURPOSE:

sample from the DF

INPUT:

n - number of points to return

return_orbit= (True) If True, the output phase-space positions is an orbit.Orbit object, if False, the output is (R,vR,vT,z,vz,phi)

returndt= (False) if True, also return the time since the star was stripped

integrate= (True) 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!)

xy= (False) if True, return Galactocentric rectangular coordinates

lb= (False) if True, return Galactic l,b,d,vlos,pmll,pmbb coordinates

OUTPUT:

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

HISTORY:

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)