galpy.potential.mass¶
- galpy.potential.mass(Pot, R, z=None, t=0.0, forceint=False)[source]¶
Calculate the mass enclosed either within a spherical shell with radius R or in the slab <R and between -z and z.
- Parameters:
Pot (Potential or list of Potentials) – Potential or list of Potentials (dissipative forces in such a list are ignored).
R (float or Quantity) – Cylindrical Galactocentric distance.
z (float or Quantity, optional) – Vertical height up to which to integrate. Default is None.
t (float or Quantity, optional) – Time. Default: 0.0.
forceint (bool, optional) – If True, calculate the mass through integration of the density, even if an explicit expression for the mass exists. Default is False.
- Returns:
Mass enclosed within the spherical shell with radius R if z is None else mass in the slab <R and between -z and z.
- Return type:
float or Quantity
Notes
2021-02-07 - Written - Bovy (UofT)
2021-03-15 - Changed to integrate to spherical shell for z is None slab otherwise - Bovy (UofT)