Conversation
|
Really cool @mpyat2! Perhaps the DFT will have issues with unevenly spaced data, which your comment may be alluding to, but this is a great addition! I am less familiar with Spectral Window, but see some references, e.g. https://encyclopediaofmath.org/wiki/Spectral_window If you have another reference you are using, could you point me to that? As you may see from #204 I'm implementing a piecewise linear model (almost done) that will be incorporated with the AoV period search plugin for model creation as well as being standalone. Some of the other issues you see could be collaborated on if it helps. |
…rovement); Math.tan(a/2) instead of sin(a), cos(a) increased performance at ~40% on my machine
|
Hi @dbenn , concerning "Spectral Window": it is implemented like in Period04, see http://period04.net/files/p04manual_v1.0.0.pdf, page 53. There is no theory (unfortunately) in the guide, but only a practical example. I'll look for a better description. Also, a very lapidary description can be found here: https://www.cbabelgium.com/peranso/UserGuideHTML/Spectralwindow.html. I also wrote a couple of words about it in the documentation for the plug-in (see DFT and Spectral Window Plug-In.pdf) |
|
Recommending a new minimal version of Java of VStar may be worth considering @mpyat2. |
…eless, and the lists indices are int.
Well, it's probably sufficient to indicate that it it recommended to switch to the newest version available because of better optimization, performance win, etc. |
Also, the Spectral Window can be considered as a 'representation of gaps' and the finite nature of the observing interval. The Fourier spectrum of the real data is a convolution of an 'ideal' spectrum with the Fourier transform of this "gaps' function" (see this abstract https://ui.adsabs.harvard.edu/abs/1975Ap%26SS..36..137D/abstract). By the way, in the appendix to the article, a short Fortran program, which calculates both DFT and Spectral Window, is listed. Well, I noticed it now only; in fact, it is quite simple and is easy to reinvent (this is a straightforward calculation of Eq. 3 from the article). |
I have found issues with some of the newer versions with respect to Swing drop-down list collection widgets. Other than that, agreed. Some testing required. |
…ultipleLinearRegression. See multiPeriodicFit(...)
|
Hi David, @dbenn |
…the currently existing one, it is disabled by default and is remained for experimental purposes only.
|
Very cool @mpyat2. A bit slow to get to the review and trying this. Apologies. Will get to it in the next day or so. I will also have something for you to review for me soon. :) |
|
No problem, David, thank you! Anyway, I still need to create a unit test for it. |
…ere with each other. Local vars and unique message tags help to avoid this. This problem may occur in the other Period Analysis plug-ins.
…gorithm. It could be set to true at the previous run.
|
Hi David @dbenn , |
…bled: I'm not sure that the current algorithm fits this variant of the analysis.
|
All looking great @mpyat2 I have not reviewed the code yet. I can start doing so now if you are ready. Noticed one small error. For default low frequency of 0 for spectral window, there is a top hit (and no doubt, data table item) that has frequency 0, so period NaN. |
|
Indeed, @dbenn , there is an error. However, it is not on the zero side. The Fourier frequency spectrum of a real-valued signal is symmetric relative to 0 (it continues to the negative frequencies), so we can determine if it is a top-hit (local maximum) or not. On the other hand, we cannot determine if the last point is a top-hit. I fixed this. I think I'm ready with the plug-in. At first, I thought I would limit myself to SpectralWindow, but then I got carried away :) |
…on): in rare cases, equal times may occur in the dataset.
|
Hi @dbenn |
I recently had some non Java 8 test failures for the plugin I'm working on as well @mpyat2. Odd. Will see what I can find unless you beat me to it :). |
|
Hi @dbenn I've done local tests with
Plugin tests succeeded in all cases. See the attached file: Also, I needed to set JAVA_TOOL_OPTIONS=-Duser.country=EN -Duser.language=en before running the tests. In my locale, a comma is used as a decimal separator, which causes problems in some tests where floating-point numbers are compared. With my original locale, I see the errors in
and
|
|
The VSX issues could be related to #458 I'm seeing lots on failures too. Will have to return to this tomorrow. |
This implements the "Spectral Window" algorithm (with the results identical to the popular program Period04, http://period04.net/). The algorithm is essentially the 'classic' Discrete Fourier Transform as it is described in (Deeming 1975, bibcode 1975Ap&SS..36..137D) for a signal with unit amplitude.
Since we need DFT for this, I made the plug-in 2 in 1: DFT itself (again, identical to Period04, which uses this very algorithm) and Spectral Window. The 'Classic' DFT is the most primitive one and loses to other algorithms (for example, DC DFT) in many cases, yet why not have it for the collection?
To-do:
Side notes:
Test data: eta_Aql_2024_visual.txt
eta_Aql_2024_visual.txt