[SOLVED] gpu_fft troubleshooting
Posted: Mon Apr 01, 2019 3:20 am
I've been testing out the gpu_fft api on my pi and came upon some strangeness.
By changing the test data from being a cosine to a sine wave my program does not behave like I would anticipate it (same freq), while the cosine data works just fine.
(Code at the bottom)
I've attached a screenshot of output diagrams. The top one is just the test cosine wave (sine would be redundant to show) and the middle one is the corresponding output of fft for that (cos), so far so good, but at the bottom you'll find the output for the sine wave (same freq, just changed from cos to sin) and here it gets weird.
Why should my program work for the cosine but not for the sinus function?
EDIT: Just tested a square wave and it looked fine
Here my code (+ makefile): repo
By changing the test data from being a cosine to a sine wave my program does not behave like I would anticipate it (same freq), while the cosine data works just fine.
(Code at the bottom)
I've attached a screenshot of output diagrams. The top one is just the test cosine wave (sine would be redundant to show) and the middle one is the corresponding output of fft for that (cos), so far so good, but at the bottom you'll find the output for the sine wave (same freq, just changed from cos to sin) and here it gets weird.
Why should my program work for the cosine but not for the sinus function?
EDIT: Just tested a square wave and it looked fine
Here my code (+ makefile): repo