TimeseriesSurrogates.jl icon indicating copy to clipboard operation
TimeseriesSurrogates.jl copied to clipboard

Welch's Method for IAAFT or AAFT

Open duodenum96 opened this issue 1 year ago • 5 comments

The neurophysiological data I'm analyzing have long time series (let's say 5-10 minutes) however the frequencies of interest tend to be between 1 to 40 Hz. A common practice in our field is to estimate the power spectrum via Welch's method of averaging periodograms. Would doing the same be worthwile in IAAFT method? If so, I would be willing to contribute this to the package, since I'm already going to implement it for my own project.

duodenum96 avatar May 15 '24 21:05 duodenum96

Hi, thanks for considering a contribution!

However, it is not clear to me what you wish to contribute :S ...

Do you want to contribute a new method for computing Power Spectra? If so, this doesn't really belong in this package. Probably DSP.jl makes more sense.

Do you instead want to enhance the current IAFFT algorithm to instead of use the standard FFT to compute the spectrum, to instead use the Welch's method? Sure, that can go in here if you think it is worthwhile, i.e., it increases either teh accuracy or the computational performance of the rsults.

Datseris avatar May 16 '24 08:05 Datseris

Do you instead want to enhance the current IAFFT algorithm to instead of use the standard FFT to compute the spectrum, to instead use the Welch's method?

This one. Thanks, I'll get to it and do some tests to see if it is worthwhile or not.

duodenum96 avatar May 16 '24 12:05 duodenum96

Since this involves averaging multiple periodograms, I guess it will be more time-consuming than using a single estimate of the periodogram? I suggest that if you implement this, @duodenum96, the user should be able to pick whether they want to estimate the periodogram using the standard FFT method or by averaging, depending on their needs.

kahaaga avatar May 22 '24 12:05 kahaaga

Of course, you are right. I wrote a small matlab code that does this and it is working as intended. I am getting familiar with the coding style of TimeseriesSurrogates.jl now, I will implement it in Julia after I figure out the process.

duodenum96 avatar May 22 '24 15:05 duodenum96

Excellent! Looking forwards to your contribution :D

kahaaga avatar May 22 '24 15:05 kahaaga

Hello again,

Just an update: I no longer need this functionality and since this is probably not very useful for the rest of the community, I think we can close this issue. Sorry for taking your time about it.

duodenum96 avatar Jan 05 '25 13:01 duodenum96