Third Kepler's LawĀ¶
In the case of eccentric orbits, the compact object travels at different velocities throughout the orbit, moving faster at periastron (the closest point to the star) and slower at apoastron (the farthest point from the star).
This function uses the principle of constant areolar velocity, which states that a line segment joining a compact object and the donnor star sweeps out equal areas during equal intervals of time. This principle provides a good and easy approximation for translating orbital phase to time and vice versa.
InĀ [5]:
Copied!
import xraybinaryorbit
from xraybinaryorbit import *
import xraybinaryorbit
from xraybinaryorbit import *
InĀ [3]:
Copied!
ph=np.arange(0,1,0.1)
phase,time,W= orbital_phase_to_time(ph,precision=0.01, load_directly=True)
plt.plot(time, phase)
plt.xlabel("Time (s)")
plt.ylabel("Orbital phase")
ph=np.arange(0,1,0.1)
phase,time,W= orbital_phase_to_time(ph,precision=0.01, load_directly=True)
plt.plot(time, phase)
plt.xlabel("Time (s)")
plt.ylabel("Orbital phase")
Out[3]:
Text(0, 0.5, 'Orbital phase')
InĀ [4]:
Copied!
t = np.arange(0,4*24*60*60)
phase,time,W= orbital_time_to_phase(t ,precision=0.01,load_directly=True)
plt.plot(time, phase)
t = np.arange(0,4*24*60*60)
phase,time,W= orbital_time_to_phase(t ,precision=0.01,load_directly=True)
plt.plot(time, phase)
Out[4]:
[<matplotlib.lines.Line2D at 0x16dfc4f10>]