phase

tayph.phase(dp, start=False, end=False)[source] [edit on github]

Calculates the orbital phase of the planet in the data sequence provided using the parameters in dp/config and the timings in dp/obstimes.

The output is an array with length N, corresponding to N exposures.

Be CAREFUL: This program provides a time difference of ~1 minute compared to IDL/calctimes. This likely has to do with the difference between HJD and BJD, and the TDB timescale. In the future you should have a thorough look at the time-issue, because you should be able to get this right to the second. At the very least, make sure that the time conventions are ok.

More importantly: The transit center time needs to be provided in config in BJD.

As of 20-08-2022, this function returns the phase at the middle of the observation as it is supposed to, by adding half of the exposure time to each timestamp. This is relied on by functions such as inject_model, transit and construct_kpvsys, as per isssue #113.

Set the start keyword to return back to the old functionality to get the phase at the start of each exposure.