LSST-nonproject/sims_maf_contrib

Updating variability metrics

Closed this issue · 4 comments

Eric Bellm and I (mostly Eric) are updating the variability metrics. Starting by replacing the SinPeriodMetric with PeriodDeviation (to calculate and report deltaP/P instead of just recovered period).

Perhaps somewhat obviously (in hindsight) one thing we discovered was that it's hard to write a good metric about period finding, if you're not using good period finding techniques in your metric.
As an example, see the attached figure:

figure_1

At each point in the sky, we generated a series of sin curves with periods between 2 and 10 days, then tried to recover each of those periods with scipy's lombscargle period fitter. You can see the code in the branch 'variability_metrics'. Suggestions for improving the fitter appreciated. The results for observations in r band in the first two years, across the whole sky, are shown in the attached figure. It's interesting because you can see
(a) the fit periods bump up against the limits of the range we gave to the LS fitter (2-10days +/- 20%).
(b) a lot of the periods do actually get fit correctly - see
figure_2
but we have a lot of outliers and you can see the double and half period aliasing

We also found that the fitting (again, obviously in retrospect) takes seriously long time if you try to fit all the years and use an appropriately small binsize for the LS fitter to get really good period resolution. You do, on average, get fewer outliers.

For the record, with ten years of survey, the fit period vs true period plot looks much nicer.
figure_1

Ready to merge the variability branch! We made a period deviation metric (generating an artifical light curve and then fitting the resulting lightcurve -- no noise though) and a phase coverage metric.