galpy.potential.Potential.mass¶

Potential.
mass
(R, z=None, t=0.0, forceint=False)[source]¶ NAME:
massPURPOSE:
evaluate the mass enclosedINPUT:
R  Cylindrical Galactocentric radius (can be Quantity)
z= (None) vertical height up to which to integrate (can be Quantity)
t  time (optional; can be Quantity)
forceint= if True, calculate the mass through integration of the density, even if an explicit expression for the mass exists
OUTPUT:
Mass enclosed within the spherical shell with radius R if z is None else mass in the slab <R and between z and z; except: potentials inheriting from EllipsoidalPotential, which if z is None return the mass within the ellipsoidal shell with semimajor axis RHISTORY:
20140129  Written  Bovy (IAS)
20190815  Added spherical warning  Bovy (UofT)
20210315  Changed to integrate to spherical shell for z is None slab otherwise  Bovy (UofT)
20210318  Switched to using Gauss’ theorem  Bovy (UofT)