Hoeijmakers / tayph

Analysis of high resolution spectroscopic time-series of exoplanets
9 stars 9 forks source link

sp.phase() returns the phase at the start of observation, not in the middle. #113

Closed Hoeijmakers closed 2 years ago

Hoeijmakers commented 2 years ago

Here's a headsup! In ESO instrumentation, MJD-OBS is the date at the start of the observation. Therefore, system_parameters.phase returns the phase at the start, not in the middle of each observation. If you have interpreted that as the mean of the observation (KpVsys and inject_model do that), then all your phases are off by 0.5*t_exp / P. This is typically a very small number (0.0014 for WASP-121), but for fast-moving planets this could be an issue if you're measuring radial velocities really accurately.

The fix is simple: sp.phase needs to add 0.5*t_exp to each timestamp.

Hoeijmakers commented 2 years ago

This is now solved, with optional keywords in sp.phase to return start and end phases, implicitly taking into account readout times!