Open rebekah9969 opened 3 years ago
Hi @rebekah9969,
The CBVs are loaded from the 2-minute cadence data. When you call CBVCorrector it by default "aligns" the CBVs to the cadences of the light curve (lc_S32). But no cadences line up. Instead try using interpolate_cbvs=True
. See the CBVCorrector tutorial section on "Aligning versus Interpolating CBVs."
cbvCorrector = CBVCorrector(lc_S32, interpolate_cbvs=True)
cbvCorrector.cbvs[0].plot();
Note that with alpha = 1e-4
you are severely overfitting:
cbvCorrector.goodness_metric_scan_plot(cbv_type=cbv_type, cbv_indices=cbv_indices);
This might work better for you:
cbv_type = ['MultiScale.1', 'MultiScale.2', 'MultiScale.3','Spike']
cbv_indices = [np.arange(1,9), np.arange(1,9), np.arange(1,9), 'ALL']
cbvCorrector.goodness_metric_scan_plot(cbv_type=cbv_type, cbv_indices=cbv_indices);
cbvCorrector.correct_gaussian_prior(cbv_type=cbv_type, cbv_indices=cbv_indices, alpha=1e-1)
pltAxis = cbvCorrector.diagnose()
pltAxis[0].set_ylim(650, 800);
pltAxis[1].set_ylim(650, 800);
Of course, even more tweaking might be needed...
Thinking out loud: applying CBV correction to TESSCut data is likely one of the principal use cases for CBVCorrector, so I wonder if we should have interpolate_cbvs=True
by default to make the API more friendly.
Perhaps we can think of more user-friendly mechanisms to alert users of the dangers of interpolation, e.g. something folded into one of the diagnose()
plots?
I agree with what @barentsen stated above and thank you @jcsmithhere
Yes, I agree. We need to make this more user friendly. I very much welcome the feedback to understand where users are hitting confusing aspects or bugs. Perhaps the default between interpolate vs align will be dependent on which data type the class is being applied to. Align really is more reliable. Interpolation can introduce artifacts, and which interpolation method you use really depends on which types of signals one is interested in.
I also think more integration between the CBVCorrector and PLDCorrector classes would be good. They really are two complementary methods and we should set up tools to apply both to the same data set, while using the same performance metrics.
I have been trying to apply CBVCorrector to FFI cut out but am running into some issues.
This returns
I then try to plot these,
And get the following plot which is empty.
After I try
Which outputs,
I note that this method cannot be applied to Kepler 10 min FFI data, but is the same also true for TESS? @jcsmithhere do you have any advice?
Thanks