code: def evaluateDensities(Pot,R,z,phi=None,t=0.,forcepoisson=False):
      
      isList= isinstance(Pot,list)
      nonAxi= _isNonAxi(Pot)
      if nonAxi and phi is None:
          raise PotentialError("The (list of) Potential instances is non-axisymmetric, but you did not provide phi")
      if isList:
          sum= 0.
          for pot in Pot:
              if not isinstance(pot,DissipativeForce):
                  sum+= pot.dens(R,z,phi=phi,t=t,forcepoisson=forcepoisson,
                                 use_physical=False)
          return sum
      elif isinstance(Pot,Potential):
          return Pot.dens(R,z,phi=phi,t=t,forcepoisson=forcepoisson,
                          use_physical=False)
      else: #pragma: no cover 
          raise PotentialError("Input to 'evaluateDensities' is neither a Potential-instance or a list of such instances")
docs: NAME:
  
         evaluateDensities
  
      PURPOSE:
  
         convenience function to evaluate a possible sum of densities
  
      INPUT:
  
         Pot - potential or list of potentials (dissipative forces in such a list are ignored)
  
         R - cylindrical Galactocentric distance (can be Quantity)
  
         z - distance above the plane (can be Quantity)
  
         phi - azimuth (can be Quantity)
  
         t - time (can be Quantity)
  
         forcepoisson= if True, calculate the density through the Poisson equation, even if an explicit expression for the density exists
  
      OUTPUT:
  
         rho(R,z)
  
      HISTORY:
  
         2010-08-08 - Written - Bovy (NYU)
  
         2013-12-28 - Added forcepoisson - Bovy (IAS)