pint.derived_quantities.pulsar_mass
- pint.derived_quantities.pulsar_mass(pb: Unit('d'), x: Unit('cm'), mc: Unit('solMass'), i: Unit('deg'))[source]
Compute pulsar mass from orbital parameters
Return the pulsar mass (in solar mass units) for a binary. Can handle scalar or array inputs.
- Parameters:
pb (astropy.units.Quantity) – Binary orbital period
x (astropy.units.Quantity) – Projected pulsar semi-major axis (aka ASINI) in
pint.ls
mc (astropy.units.Quantity) – Companion mass in
u.solMass
i (astropy.coordinates.Angle or astropy.units.Quantity) – Inclination angle, in
u.deg
oru.rad
- Returns:
mass – In
u.solMass
- Return type:
- Raises:
astropy.units.UnitsError – If the input data are not appropriate quantities
TypeError – If the input data are not quantities
Example
>>> import pint >>> import pint.derived_quantities >>> from astropy import units as u >>> print(pint.derived_quantities.pulsar_mass(2*u.hr, .2*pint.ls, 0.5*u.Msun, 60*u.deg)) 7.6018341985817885 solMass
Notes
This forms a quadratic equation of the form: \(a M_p^2 + b M_p + c = 0`\)
with:
\(a = f(P_b,x)\) (the mass function)
\(b = 2 f(P_b,x) M_c\)
\(c = f(P_b,x) M_c^2 - M_c\sin^3 i\)
except the discriminant simplifies to: \(4f(P_b,x) M_c^3 \sin^3 i\)
solve it directly this has to be the positive branch of the quadratic because the vertex is at \(-M_c\), so the negative branch will always be < 0