diskdf.sample(n=1, rrange=None, returnROrbit=True, returnOrbit=False, nphi=1.0, los=None, losdeg=True, nsigma=None, maxd=None, target=True)[source]




sample n*nphi points from this DF


n - number of desired sample (specifying this rather than calling this routine n times is more efficient)

rrange - if you only want samples in this rrange, set this keyword (only works when asking for an (RZ)Orbit) (can be Quantity)

returnROrbit - if True, return a planarROrbit instance:

[R,vR,vT] (default)

returnOrbit - if True, return a planarOrbit instance (including phi)

nphi - number of azimuths to sample for each E,L

los= line of sight sampling along this line of sight (can be Quantity)

losdeg= los in degrees? (default=True)

target= if True, use target surface mass and sigma2 profiles (default=True)

nsigma= number of sigma to rejection-sample on

maxd= maximum distance to consider (for the rejection sampling)


n*nphi list of [[E,Lz],…] or list of planar(R)Orbits

CAUTION: lists of EL need to be post-processed to account for the

kappa/omega_R discrepancy


2010-07-10 - Started - Bovy (NYU)