code: def surfacemassLOS(self,d,l,deg=True,target=True,
                         romberg=False,nsigma=None,relative=None):
          
          #Calculate R and phi
          if _APY_LOADED and isinstance(l,units.Quantity):
              lrad= l.to(units.rad).value
          elif deg:
              lrad= l*_DEGTORAD
          else:
              lrad= l
          if _APY_LOADED and isinstance(d,units.Quantity):
              d= d.to(units.kpc).value/self._ro
          R, phi= _dlToRphi(d,lrad)
          if target:
              if relative: return d
              else: return self.targetSurfacemass(R,use_physical=False)*d
          else:
              return self.surfacemass(R,romberg=romberg,nsigma=nsigma,
                                      relative=relative,use_physical=False)\
                                      *d
docs: NAME:
  
             surfacemassLOS
  
          PURPOSE:
  
             evaluate the surface mass along the LOS given l and d
  
          INPUT:
  
             d - distance along the line of sight (can be Quantity)
  
             l - Galactic longitude (in deg, unless deg=False; can be Quantity)
  
          OPTIONAL INPUT:
  
             nsigma - number of sigma to integrate the velocities over
  
          KEYWORDS:
  
             target= if True, use target surfacemass (default)
  
             romberg - if True, use a romberg integrator (default: False)
  
             deg= if False, l is in radians
  
          OUTPUT:
  
             Sigma(d,l) x d
  
          HISTORY:
  
             2011-03-24 - Written - Bovy (NYU)