ISPC-trials - using FFT and Welch's method

140 views
Skip to first unread message

Germano Gallicchio

unread,
Nov 18, 2014, 2:29:06 PM11/18/14
to analyzingneura...@googlegroups.com
Dear Mike (and other readers),

I have computed cross-channel ISPC-trials using FFT with Welch's overlapping windows method.

Everything looks alright to me and the results go in the expected directions, but since I could not find this exact procedure described anywhere I thought about asking your opinion :)
Shortly, the reason why I want to average across overlapping windows is that I also computed magnitude squared coherence (using mscohere() function of matlab), which uses Welch's method and therefore I wanted to be consistent and use a similar procedure for ISPC-trials.

1. First of all, I select overlapping segments within my signals.
2. I apply a Hanning windowing function to each overlapping segment.
3. I compute the FFT of each overlapping segment, 0-padding the data and scaling the output of the FFT by its length. If I understood it correctly the scaling is actually not necessary if I am just interested in the phase angles, or if I use power values with a baseline.
4. The meaningful frequencies of the FFT are as many as half plus 1 of the frequencies contained in the FFT output and range from 0 to the Nyquist/2 frequency.
5. I compute the phase angle for each overlapping segment in all frequencies.
6. Now I want to average the phase angles across overlapping segments, which is the idea of Welch's method. In order to do that I create complex unit vectors using the phase angles as arguments: e^ik. I compute a standard mean between these complex vectors.
7. Then I proceed as described in chapter 26. I compute the phase angle from each of these complex unit vectors and subtract the phase angle from channel x to phase angle from channel y.
8. Since I have done this for each trial and I want to average across trials, I create once again complex unit vectors using the difference phase angles and average them. Then I just take the length of such complex vectors and that is the cross-channel ISPC-trials that I am looking for..

..does this sound correct to you?

Thanks in advance for your time!

Germano

Mike X Cohen

unread,
Nov 18, 2014, 2:42:41 PM11/18/14
to analyzingneura...@googlegroups.com
Hi Germano. From your detailed description, it all sounds correct. If you want to verify your code, you could run some simulations as sanity checks. For example, you can repeat channel X's data; the ISPC should be 1.0. Then repeat channel X's data and add some noise; the ISPC should decrease as a function of increasing levels of noise. 

If you have any other questions, feel free to ask. 

Mike



--
You received this message because you are subscribed to the Google Groups "AnalyzingNeuralTimeSeriesData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to analyzingneuraltimes...@googlegroups.com.
Visit this group at http://groups.google.com/group/analyzingneuraltimeseriesdata.
For more options, visit https://groups.google.com/d/optout.



--
Mike X Cohen, PhD
mikexcohen.com

Germano Gallicchio

unread,
Nov 18, 2014, 4:03:54 PM11/18/14
to analyzingneura...@googlegroups.com
Dear Mike,

thanks for your quick reply, I ran a few sanity checks as you suggested and everything looks in good order :)

All the best,
Germano
To unsubscribe from this group and stop receiving emails from it, send an email to analyzingneuraltimeseriesdata+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages