I am looking for an alternative to the Kwee van Woerden method that is more computationally up to date. A data-fitting model that has caught my eye is one that used to be on the web site of the Variable Star and Exoplanet Section of the Czech Astronomical Society. It uses a five-parameter function that is described in the paper "Minima Timing of Eclipsing Binaries," by Brat, Mikulasek, and Pejcha.
I contacted the Czech Astronomical Society several days ago to see if this data-fitting model is still available online somewhere, but have not received a response yet.
Is anyone familiar with this model? I've built a trial version of the model in Excel, and it shows promise. In the case of a recent BU Vul eclipse, it appears to give a better result than KvW. I like how it implements two different ways to obtain realistic estimates of the calculated ToM error.
Hi Andy, I've been using, or at least experimenting, with this for a while. I just coded the function in R (one line of code for their eq'n (3), plus a few lines of function wrapper), and solve it using "nls". No GUI or anything, I just run it from an R console after having input my time series data to a data frame.
One thing I like about the Brat+ method, is that it uses the photometric time-series as given. KvW interpolates the time series to get regular sampling, symmetric about the trial ToM. If you use linear interpolation (as the paper describes) across a gap in observations when the true lightcurve was not straight, i.e. where it has curvature, the interpolated magnitudes will be biased away from the curve, and so the resulting ToM will be biased away from the true value. If you use "smarter" interpolation you can avoid that bias, but then I don't think you can strictly say your are using the KvW algorithm. The Brat+ method just fits an interesting functional form to the magnitude time-series, without resampling / interpolating.
As an aside, I've also coded KvW in R, and have been testing it against KvW as implemented in AVE -- which is an ancient implementation that has to be installed on Win XP (I run it on a Virtual PC on Win7). It would be nice to be working with open-source implementations of these codes. I am not averse to the idea of making my KvW code available, but haven't thought about how to do that, nor created suitable documentation etc. There are a few tricky / interpretive elements re first last points, the interpolation, etc.
I haven't made a study of the errors reported by the Brat+ method.
Hi Gary, Good to know you are doing & have done the same using R. I have started writing a Python routine to accomplish pretty much the same. I don't recall whether KvW uses least-squares optimization, but I do agree that linear interpolation between points would be a source of inaccuracy. Visually, I noticed a discrepancy between KvW and Brat+ in my recent light curve of BU Vul. I believe that the former's ToM result is biased. To get a handle on this alternative method's estimate of time error, I plan to incorporate resampling of the observational data, more or less as the Brat+ paper explains. A possible drawback is that the objective function in the Brat+ model assumes symmetry around the time of minimum. However, the paper points out at the very end that a linear term in time (c2ti is how the paper references it) could be included in the objective function. This might accommodate time trends caused by factors such as changing air mass. I look forward to comparing our results soon.
Hi Andy, Your comments remind me of another reason I like the Brat+ method: it is trivial to fit the additional linear term, which I think is a useful way to examine one aspect of the quality of the time-series.
Re assuming symmetry: that is at the core of the KvW algorithm too. And I think we want it to be so: in the absence of systematic time-dependent errors in the photometry, noise, and spots, the lightcurve through an eclipse should be symmetric. And the time of the min of that symmetric LC is the time of the conjunction of the two stars, and it is the time of conjunction that we are actually seeking. When we analyze ToMs looking for 3rd body light-time effects, apsidal rotation etc, we actually want times of conjunctions. We say we want the time of the min of the LC, and we are hoping that is the same as time of conjunction, i.e. that the ToM we have determined hasn't been perturbed away from the "ToConjunction" by some other effect.
So, another useful thing to do, which is trivial to do, is look at how much the actual LC deviates from the assumed (fitted) symmetric one. I.e. compute and plot the residuals of the fitted LC. With the Brat+ method, it might have systematic mis-fits (but they should be symmetric!), and random noise.
It would be great to discuss this further: there are probably further nuances and exceptions than I have not acknowledged...
I've been using KvW for my research, so this newer method is interesting to me. It may be beneficial for me to update my methods. This shouldn't be too hard, as I've implemented the KvW into Python already. It should be trivial to modify it to Brat+.
However, one thing I want to talk about is where you mentioned symmetry. You said you think that assuming symmetry is something we want to do as the eclipses should be symmetric (neglecting some effects). The issue with that is that there are many systems in my sample where the eclipses are asymmetric, and these systems are so interesting to me that they're the ones I prioritized observing. So the assumption of symmetry is explicitly false for the majority of the observations I've made. Thus the time of minimum light does not correspond to conjunction but to another point in the orbit (slightly before in practice).
From what you're saying, then, when there are these intrinsic asymmetries, it will find the time of conjunction, not the time of minimum light. Is that correct? Or does it find the time of minimum or something in between? I've noticed that KvW seems to do something in between the two, which is less than optimal.
Hi Matthew, it is great to find people concerned with these details!
I think of it this way: KvW and Brat+ and don't know any physics. They are just finding the time of symmetry (KvW: by finding minimum SSQ difference between forward and time-reversed light curves; Brat+ by LSQ fitting a symmetric function). When the LC really is symmetric (e.g. no spots), this corresponds to the time of conjunction, and for examining period changes, apsidal motion, etc, that is what we want. If there are spots, and the LC is not actually symmetric, these algorithms will produce some compromise output that no longer matches the time of conjunction. They won't necessarily even produce a time that matches the time of the bottom of the curve ("time of minimum").
So, referring to your last paragraph, these methods will find "something in between".
(Unnecessary elaboration, for completeness: I dimly recall Kopal (?), (not that I've read more than a few pages of his vast work!) commenting that even in the spot-free case, if the orbit is eccentric the time of min of the LC is not precisely the time of conjunction, but it is a very small difference.)
If you want to really find the time of conjunction in a situation where there are spots making the light curve asymmetric, then I think you must fit the light curve in a W-D/phoebe sense, and extract the time of conjunction from the orbital parameters.
The above is pretty dense, let me know if I have to elaborate (or correct!) any of it!
Cheers, Gary Billings
P.S. Brat+ is much easier to implement than KvW. The interpolation for KvW is a pain.
I have been looking for online Python versions of the KvW method to implement into my universities research. Would you be adverse to providing this code for use by others?
I started experimenting with Brat+ earlier this year. I put together a little Python implementation. One of my hesitations with it is that I don't know how "universal" the underlying model is. I used it on V1463 Her, a semi-detached EB with a slightly asymmetric primary eclipse (due to an accretion hotspot??). Brat+ ignored the asymmetry, but gave an otherwise very good match for the overall shape of the eclipse. It left me wondering if there are any EB geometries that the Brat+ model doesn't match well. (I don't have much EB experience, but this seemed more "bulletproof" than KvW.)
Hi Mark, I also wrote a Python program that implements the Brat+ method to graph the light curve and calculate ToM. I've successfully used on half a dozen light curves so far. It gave a good ToM for an eclipsing binary yesterday where Peranso had some difficulty. If you'd like to try it out, let me know.
I'm Beta testing Peranso 3, which is an entirely new Peranso implementation. It includes amongst many new functions, a rework of the original Kwee-van Woerden algorithm, which I believe is more powerful than the current Peranso 2 one. I'm interested in the eclipsing binary data you mentioned in your post, to check if Peranso 3 gives a better result than Peranso 2. If you don't mind sending them, you can contact me via PM (tonny.vanmunster -at- gmail.com). Thanks !
Thanks for having made available your data - I really appreciate. I have been able to calculate the KvW ToM both with Peranso 2 and Peranso 3. See my PM.