Closed thomas-nilsson-irfu closed 4 years ago
Just to help highlight the difference, if changing back to the old irf_powerfft.m, and running the same code as above we get:
dslFastSpect = irf_powerfft(dceTs, 512, MMS_CONST.Samplerate.fast)
dslFastSpect =
struct with fields:
f: [256×1 double]
p: {[5340×256 double] [5340×256 double] [5340×256 double]}
t: [5340×1 double]
which is more along with the expected result for the 3d data.
Your case concerns vector data (one 1D vector per timestamp), but TSeries seems to even support having 2D data (one 2D array per time stamp). I assume that irf_powerfft could in principle be generalized to handle that too, but from what I see in the old implementation, it only handled vector data: comp=number of components per timestamp was scalar ==> Could only describe size of vector data.
I have found at least one bug in the code now.
OK. I think I have fixed the bug and I have pushed it. irf_powerfft can however only handle scalar and 1D vector data now, as it originally did (I think), not tensor data (>=2D).
FYI, I thought I had fixed the bug and pushed it (0f3105c3).
However, I think there is ANOTHER BUG so wait a bit. ( intervalSec2 = intervalSec1 + nSamplesOut*samplFreqHz) Need to look at bit more closely, but I am going away next week so I may not have enough time now.
OK. Think I have pushed a bugfix for abovementioned bug too. It was an "old" bug; introduced (by me) in e0b725fad7762da848e77ec76cac6fc257b7198f (Aug 13).
@ErikPGJ, Thank you!
Now it appears this issue is fixed (along with the one I sent you via e-mail back in may).. Enjoy your time off!
Step 1: Latest code?
git pull
this is still a problem).Step 2: Describe your environment
Step 3: Describe the problem
Expected behavior
3d data (in form of TSeries) should properly have its power spectra computed per component in irf_powerfft.m, now it is not.
Actual behavior
Returned output is single matrix.
Steps to reproduce:
Relevant code:
I am assigning this to @ErikPGJ, since he was the one who changed in irf_powerfft last.