Inconsistent scaled magnitude and scaled magnitude squared in FFT
For FFT of a real-valued input, the output modes of 4 (Scaled magnitude) and of 7 (Scaled magnitude square) seem to have an inconsistent result at the Nyquist frequency.
Specifically, the value of /OUT=3 (magnitude) and /OUT=6 (Scaled magnitude) differ by sqrt(2) at the Nyguist frequency. By contrast, the value of /OUT=4 (magnitude square) and /OUT=7 (scaled magnitude square) are the same at the Nyguist frequency. From the manual:
The scaled quantities apply to transforms of real valued inputs where the output is normally folded in the first dimension (because of symmetry). The scaling applies a factor of 2 to the squared magnitude of all components except the DC. The scaled transforms should be used whenever Parseval's relation is expected to hold.
Is there potentially a bug for /OUT=3 at the Nyguist frequency? And for the manual description, should it be "except the DC and Nyguist frequency"?
Thanks for the report. This has been fixed for the next nightly build.
Note that it is also simple enough to execute something like:
MatrixOP/O out6=sqrt(out7)
A.G.
September 12, 2022 at 06:21 pm - Permalink