# galpy.df.diskdf.sampledSurfacemassLOS¶

diskdf.sampledSurfacemassLOS(l, n=1, maxd=None, target=True)[source]

NAME:

sampledSurfacemassLOS

PURPOSE:

sample a distance along the line of sight

INPUT:

l - Galactic longitude (in rad; can be Quantity)

n= number of distances to sample

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

target= if True, sample from the ‘target’ surface mass density, rather than the actual surface mass density (default=True)

OUTPUT:

list of samples

HISTORY:

2011-03-24 - Written - Bovy (NYU)