galpy.df.diskdf.sampledSurfacemassLOS

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

Sample a distance along the line of sight

Parameters:
  • l (float or Quantity) – Galactic longitude.

  • n (int, optional) – Number of distances to sample.

  • maxd (float or Quantity, optional) – Maximum distance to consider (for the rejection sampling).

  • target (bool, optional) – If True, sample from the ‘target’ surface mass density, rather than the actual surface mass density (default=True).

Returns:

List of samples.

Return type:

list

Notes

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