code: def mvir(self,H=70.,Om=0.3,overdens=200.,wrtcrit=False,
               forceint=False,ro=None,vo=None,
               use_physical=False): # use_physical necessary bc of pop=False, does nothing inside
          
          if ro is None: ro= self._ro
          if vo is None: vo= self._vo
          #Evaluate the virial radius
          try:
              rvir= self.rvir(H=H,Om=Om,overdens=overdens,wrtcrit=wrtcrit,
                              use_physical=False,ro=ro,vo=vo)
          except AttributeError:
              raise AttributeError("This potential does not have a '_scale' defined to base the concentration on or does not support calculating the virial radius")
          return self.mass(rvir,forceint=forceint,use_physical=False,ro=ro,vo=vo)
docs: NAME:
  
             mvir
  
          PURPOSE:
  
             calculate the virial mass
  
          INPUT:
  
             H= (default: 70) Hubble constant in km/s/Mpc
             
             Om= (default: 0.3) Omega matter
         
             overdens= (200) overdensity which defines the virial radius
  
             wrtcrit= (False) if True, the overdensity is wrt the critical density rather than the mean matter density
             
             ro= distance scale in kpc or as Quantity (default: object-wide, which if not set is 8 kpc))
  
             vo= velocity scale in km/s or as Quantity (default: object-wide, which if not set is 220 km/s))
  
          KEYWORDS:
  
             forceint= if True, calculate the mass through integration of the density, even if an explicit expression for the mass exists
  
          OUTPUT:
  
             M(<rvir)
  
          HISTORY:
  
             2014-09-12 - Written - Bovy (IAS)