dyad.period_from_semimajor_axis

dyad.period_from_semimajor_axis(a, m_1, m_2)[source]

Return the period given the semimajor axis

Parameters:
aarray-like

Total semimajor axis, \(a = a_{1} + a_{2}\)

m_1array-like

Mass of the primary body, \(m_{1}\)

m_2array-like

Mass of the secondary body, \(m_{2}\)

Returns:
resndarray

Semimajor axis

Examples

Scalar parameters.

>>> period_from_semimajor_axis(1., 1., 3.00362e-6)
365.25634990292843

Array-like parameters defining multiple orbits.

>>> a, m_1, m_2 = [1., 1.], [1., 1.], [3.00362e-6, 3.00362e-6]
>>> period_from_semimajor_axis(a, m_1, m_2)
array([365.2563499, 365.2563499])