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

Broken Fourier model: "Cannot find specified frequency in DCDFT result" error #278

Closed mpyat2 closed 2 years ago

mpyat2 commented 2 years ago

To reproduce: 1) File->New Star from AAVSO database..., load PMAK V1 all times. 2) Analyse->Fourier model: Johnson V, Number of Periods = 1, P= 0.4028, OK. 3) You will get an error: image

dbenn commented 2 years ago

@mpyat2, findIndexOfFrequency() in PeriodAnalysisDerivedMultiPeriodicModel is invoked for FWHM and Standard Error of the Frequency, which in turn invokes algorithm.getResultSeries(). This will return an empty list unless a period analysis (DCDFT) has been carried out. In the case of the Fourier model plugin, there is no period analysis so no result data.

Standard Error of the Semi-amplitude, surprisingly, does not rely upon a period analysis but by itself, I'm not sure this is useful.

My suggestion is therefore, rather than allowing the exception to propagate, it should be caught or prevented from occurring and no Uncertainty tab will be created in the Models dialog where a period analysis result is available.

So basically, at the moment, if the user wants to get period error information, a DCDFT will have to be performed, not just a Fourier model.

Perhaps in a future release we can find another approach to this problem or use another approach to period error.

mpyat2 commented 2 years ago

@dbenn , I agree, that the exception should be caught and the Model dialog should be available without the Uncertainty tab if the uncertainty information is not available, or the Uncertainty tab could be displayed with a short message pointing to the requirement of the period analysis to get the uncertainty. There are cases where the Fourier model is useful even without detailed period info.

dbenn commented 2 years ago

I like your idea of adding a message to the Uncertainty tab. I'll do this right now.

dbenn commented 2 years ago

I'm adding the text: A period analysis must be carried out for uncertainty information to be computed.

mpyat2 commented 2 years ago

@dbenn , great