AAVSO / VStar

VStar is a visualisation and analysis tool for variable star data brought to you by AAVSO
https://www.aavso.org/vstar
GNU Affero General Public License v3.0
10 stars 3 forks source link

DCDFT standard error of the frequency & semi-amplitude #255

Closed dbenn closed 2 years ago

dbenn commented 2 years ago

Discussion here gives a way forward for DCDFT period error determination:

https://www.aavso.org/how-can-we-figure-out-period-error

@BradWalter points out that Grant Foster:

...outlines a few methods of estimating the uncertainty of the estimated frequency of a signal, but recommends the frequency peak FWHM method. This is the one to use since the theoretical methods depend on too many assumptions that are essentially never completely true and often not close to being true.

Foster's methods fall into two categories (page 153 of his Analyzing Light Curves book):

Foster also says (page 154 of Analyzing Light Curves) that:

In most cases the possible range estimated by the theoretical formula is too liberal while the range estimated by FWHM is too conservative.

Both methods can implemented in VStar. The standard errors would be presented by the Models dialog, as is the case already for polynomial fits. The second could be made available for a selected peak period via a FWHM button and also in the Models dialog for comparison with the standard error values.

I'm surprised I missed (or, forgot about, if I'm being charitable to myself) this brief treatment of period error determination in Foster. I return to Grant's book often, but apparently not often enough! It's one of those gifts that just keeps giving though. Thanks for pointing out section 7.10 Brad.

Section 7.10 also mentions that Grant's AAVSO R code package includes functions for the standard error and FWHM methods. See Rcodes here: https://www.aavso.org/software-directory I've played with some of this code but not all, in particular the peak1 function that includes R implementations of the standard error and FWHM methods. While the standard error calculations were clear from Grant's book, the FWHM approach needed some thought, but the R code will be all I need.

dbenn commented 2 years ago

I'm writing notes to think about all of this (in LaTex), minimally expanding Grant's words:

image

This raises some questions:

  1. Are these standard error formulae valid if harmonics beyond the fundamental period are included in the model, since these will affect the residuals?
  2. Further, is the standard error of the frequency also useful in determining the extent to which adding harmonics is ”helpful”?

I suspect that the answer to question 1. is no, and so in turn, question 2. is also answered in the negative. This suspicion is based upon inspection of Grant Foster's R code which creates a model from the fundamental period, with no harmonics, in order to create the residuals on which the standard error calculations are based:

...
 phi = 2*pi*peakfreq*t
 c1 = cos(phi)
 s1 = sin(phi)
 xfit = lm(x~c1+s1)
 svar = var(xfit$res)
...
dbenn commented 2 years ago

Further to question 1. above, if the model includes harmonics rather than just a single period, we will not return standard error values for inclusion in the models dialog.