Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmonics search should give a more helpful message if frequency doesn't exist in data (e.g. a CLEANest value added to top-hits) #61

Closed
dbenn opened this issue Sep 26, 2020 · 13 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dbenn
Copy link
Collaborator

dbenn commented Sep 26, 2020

Brad W reports:

If I select a tophit and click on the button in some cases It gives harmonics other than the 1st however, if I click on the harmonics in the list that comes up. Nothing seems to happen in some cases but for other harmonics an error dialog opens up Java.lang.IllegalArgumentException: Unknown frequency. Does that mean this frequency is not really a harmonic but the ones for which nothing happens are harmonics.

If I apply find harmonics to a cleanest output frequency it only shows the fundamental even if harmonics are listed for the frequency to which cleanest was applied. Also if I click on the 1st Harmonic frequency (the only frequency listed) in the find harmonics output for a CLEANest result, I always get the above Java.lang Unknown frequency error.

@dbenn dbenn added the bug Something isn't working label Sep 26, 2020
@dbenn
Copy link
Collaborator Author

dbenn commented Sep 26, 2020

Additional detail from Brad:

I get the same error for harmonics of the original DCDFT generated frequencies in the tophits. For example the attached shows 19 harmonics of this DCDFT tophit frequency (not CLEANest) but all except the fundamental throw this error. That makes me question whether these are actually harmonics rather than a bug in the harmonic function. Is it possible I get the error because there are result in the data file that are not included in the tophits selected from the data file and when you click on the frequency in the list located in the data file by the harmonic tool it checks whether it is also a tophit as a means of checking significance?

The way I am doing my search for signal in this very complicated light curve is
DCDFT the original LC pick the most powerful freq,
CLEANest that Frequency & check the tophit freq generated by DCDFT (Not CLEANest) for harmonics
Create a model with the CLEANest frequency
DCDFT residuals Select the highest frequency, CLEANest that frequency & check the tophit freq generated by DCDFT (Not CLEANest) for harmonics
Return to the original LC data Run DCDFT
CLEANest all frequencies discovered to that point all at once update (manually kept) list of discovered frequencies/periods including changes to any previously discovered frequencies cause by added signal.
Create a model with all freq discovered to that point
Repeat steps 4-7 iteratively

My problem is that I don’t trust the harmonics that I get from the harmonic tool because of the error messages generated. I get the error when I click on all except the 2nd harmonic 0f 0.001234 (the 3rd H throws the error) Right now the harmonics tool has provided harmonics for 6 fundamentals. The number of harmonics shown for each are in the list below.

Freq # Harmonics
0.001234 3
0.001173 2
0.002158 2
0.001039 19
0.002359 8
0.001228 16

There a number of additional fundamental remaining in addition to the 12 I Have isolated so far. This WD has more frequencies than the bells of a carillon.

@dbenn
Copy link
Collaborator Author

dbenn commented Sep 27, 2020

From Brad:

See gd358_2006_t0-BJED2453868.31187236PlusSeconds.txt file in Week X above and beyond in the Analyzing Data With VStar course. Warning. It is a 2.5 MB txt file Lots of observations

@dbenn
Copy link
Collaborator Author

dbenn commented Sep 27, 2020

Further comment from Brad:

TopHits (Incl CLEANest List) of the 12 fundamentals discovered so far I set the precision to 8 for JD and All Other. Left it at the default 6 for magnitude. Timing of these WD observations is normally very precise. Cameras are usually triggered on the UTC second by GPS signal.

GD358_1st12FundamentalsDiscovered

@mdadighat
Copy link
Collaborator

I saw this error while using DC DFT standard scan to test the harmonic tolerance range - I've tracked it down to where the issue is coming from which plot's domain and range is being used to compare the harmonic frequency against the data frequencies. When the top hits plot is made active/top in line 190 of PeriodAnalysis2DResultDialog.java, it makes that data set active as well so if the harmonic didn't happen to be one of the top hits then it says the frequency wasn't found.

What I'm still not certain of is the implication - are the values showing up in the harmonics list not correct and it should be just the top hits, or is there an issue with the way the plot/data set is made active and it should really be pointing at the same data that was used to create the harmonics list? Also this was just one case I had tested and doesn't match all the workflows Brad has mentioned so there might be more.

@dbenn
Copy link
Collaborator Author

dbenn commented Oct 25, 2020

It may help us reason about this if we look at a particular target and JD range from AID.

Do you recall the target and JD range where you saw the error and the particular table/plot selection?

@mdadighat
Copy link
Collaborator

This was just with the default R Lyr and min/max JD of 2458417.5/2459148.5

The 3rd and 4th harmonics had the error in the table below - there probably were more but those were the ones I was using to test. The 5th harmonic in the list below was one of the top hits so when clicked it just highlighted that data point in the plot as opposed to showing the error.

Screen Shot 2020-10-25 at 6 34 49 AM

@dbenn
Copy link
Collaborator Author

dbenn commented Oct 27, 2020

With that JD range I get a top hit at 55.93. Odd. Still thinking about all this. Could be a tolerance based problem again here.

@mdadighat
Copy link
Collaborator

@dbenn I just retried and got 55.65. Not checked why yet but another data point.

@dbenn
Copy link
Collaborator Author

dbenn commented Oct 28, 2020

@mdadighat Hmm. I just repeated with the JD range you specified above and still get a 55.93 top-hit.

@mdadighat
Copy link
Collaborator

@dbenn I was able to get 55.93 if I removed the .5 from both JDs which doesn’t make much sense since I’m not sure that even affected the number of observations.

@dbenn
Copy link
Collaborator Author

dbenn commented Oct 30, 2020

@mdadighat Curioser and curiosier. :) Have to give this some thought. What series did you choose for DCDFT Standard Scan? Vis or V?

@mdadighat
Copy link
Collaborator

@dbenn I used Vis for all. I'll get the same value testing multiple times, and then if I come back to it after working on something else I get something different, which doesn't make sense. The frequencies are the same (at least as far as I can tell), but the period tends to differ by a bit. I think it's still independent of the other issue where only the top hit values don't cause the original error since top hits is the active data set for the plot as opposed to the full one (not sure if I'm wording that right).

Also have you seen where the harmonics dialog pops up twice each time?

@dbenn
Copy link
Collaborator Author

dbenn commented Nov 2, 2020

@mdadighat Non-reproducible is never fun. Agreed that it doesn't make sense.

Yes, I have seen the harmonic dialog pop-up twice bug. Annoying isn't it? I thought it was one that I had in SourceForge tickets and was going to "move it over". This bug may have something to do with VStar's Observer pattern based message notifier registering more than once for the message type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants