das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

Verification of fftPower routines #45

Closed jbfaden closed 1 year ago

jbfaden commented 1 year ago

We were asked to verify our fftPower routine, and after finding the script https://github.com/autoplot/dev/blob/master/demos/2023/20230209/checkPowerFFT.jy at http://www-pw.physics.uiowa.edu/~jbf/rbsp/script/chris/powerfft/checkPowerFFT.jy, I could see that it was off by a factor of 2. The code contained a comment about the factor 4 being incorrect and a factor of 2 should be used.

I reviewed other functionally similar codes (there's a more general version which is used widely in Autoplot, but it handles more cases and is harder to follow), and found these use the correct factor of 2.

I've made the code used in checkPowerFFT.jy consistent, all are using 2 now.