Kwee Van Woerden (KvW) method for eclipse or transit minimum timing, with improved error calculation, as described in Deeg (2020). This improvement avoids underestimated errors in minimum times that may appear with Kwee & Van Woerden's (1956) original method. Errouneous error-estimates (or even numerical faults) using KvW's original prescription are prevalent for low-noise eclipse or transit lightcurves, the way they can be achieved from space or from modern ground instrumentation. The failures become pronouced when the noise between subsequent points is smaller than the flux-variation due to eclipse in/egress between subsequent points.
The main programs are kvw.py (python) and kvw.pro (IDL).
The python and IDL versions deliver identical numerical results and very similar graphics output.
The code requires an input light curve of near-equidistant points that contains only the eclipse, without any off-eclipse points. A value for the rms (noise) of the input light curve is also requested (but not necessary; the code can also attempt to estimate it). The eclipse minimum time is obtained using KvW's original method (Kwee & Van Woerden 1956), but using a default of 5 reflections (nfold parameter; KvW's original uses 3 reflections). The error of the minimum time is calculated following Deeg (2020); the error-estimate from KvW's original formula is also provided by the code. Both IDL and phython codes are functions that return the eclipse minimum time with its error; they also provide optional text output, graphics, as well as several levels of debug information.
python:
In directory with the codes, within IPython or similar interactive environment: run kvw
IDL:
From IDL cmd-line in directory with the codes:
IDL> .rnew kvwdemo1
The text-output should be in either language:
infile= CMDra7024.lc
mintime: 58739.9291169+-0.0000125 orig. KvW error: NaN
----------------------------------
infile= CMDra7023.lc
mintime: 58738.6607358+-0.0000191 orig. KvW error: 0.0000662
----------------------------------
From CMDra7024.lc, the demos generate also Fig. 1 and the first entry in Table 1 of the paper by Deeg (2021). From CMDra7023.lc, the demos will generate Figs. 3 and 4. (Only the IDL version will generate exact reproductions)
python Directory with python code
- 'kvw.py' code with the main kvw function. Executing
kvw.pyfrom command line will also provide a demo run, giving minimum times of the CM Dra lightcurves in example_data and generating some figures similar to the paper by Deeg 2021
IDL Directory with IDL code
kvw.prois the self-contained kvw codekvwcore.prois a plugin replacement forkvw.proin which non-essential code (options for graphics, printing, debugging, time-offset) has been removed. It is provided in order to facilitate translation into other languages.kvwdemo1.proruns a demo ofkvw.pro, providing minimum times of the lightcurves in example_data and generating some figures from the paper by Deeg 2021rdtab.prois a table-reader that is used by kvwdemo1.pro
example_data:
-
CMDra7023.lcandCMDra7024.lcLightcurves of CM Dra eclipses from the TESS mission, used by demos in kvw.py or kvwdemo1.pro. These curves are:- An incomplete primary eclipse at epoch 7023
- A complete primary eclipse at epoch 7024
Both lightcurves were extracted from the PDCSAP_FLUX of the file
tess2019253231442-s0016-0000000199574208-0152-s_lc.fits, available on NASA's MAST and processed as described in the paper (Deeg 2021). -
*.lcFurther lightcurves used in tests during development.
The preferred way is by citing Deeg, H.J. 2020, "A Modified Kwee-Van Woerden Method for Eclipse Minimum Timing with Reliable Error Estimates", Galaxies, vol. 9, issue 1, p. 1.