galpy.df.streamdf.sample

streamdf.sample(n, returnaAdt=False, returndt=False, interp=None, xy=False, lb=False)[source]

Sample from the DF.

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

  • returnaAdt (bool, optional) – If True, return (Omega,angle,dt). Default is False.

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

  • interp (object-wide default, optional) – Use interpolation of the stream track. Default is object-wide default.

  • xy (bool, optional) – If True, return Galactocentric rectangular coordinates. Default is False.

  • lb (bool, optional) – If True, return Galactic l,b,d,vlos,pmll,pmbb coordinates. Default is False.

Returns:

(R,vR,vT,z,vz,phi) of points on the stream in 6,N array. Or (X,Y,Z,vX,vY,vZ) if xy is True. Or (l,b,d,vlos,pmll,pmbb) if lb is True. Or (Omega,angle,dt) if returnaAdt is True. If returndt is set, also return the time since the star was stripped.

Return type:

ndarray or tuple

Notes

  • 2013-12-22 - Written - Bovy (IAS)