High, I am currently writing my Master's thesis on susceptibility for hypnosis. I am comparing EGG signals of lowly and highly susceptible individuals.
The imaginary coherence is given by:
$$ \text{ImCoh} = \frac{\mathcal{Im}\{E\{S_{xy}\}\}}{ \sqrt{ E\{S_{xx}\} E\{S_{yy}\}} }$$
I found out that I can calculate the coherence like the scipy.signal.coherence function with the following code:
sfarrA, Pxx = scipy.signal.welch(ex_sig1[0], fs=128)
sfarrB, Pyy = scipy.signal.welch(ex_sig1[9], fs=128)
sfarrAB, Pxy = scipy.signal.csd(ex_sig1[0],ex_sig1[9],fs=128) ```
coherence = abs(Pxy)**2/(Pxx*Pyy)
Next I calculate the imaginary coherence using following code:
Icoh = np.imag(Pxy)/np.sqrt(Pxx*Pyy)
As a result I get an array of negative and non-negative values.
array([ 0. , 0.15618352, 0.09958203, 0.00483643, 0.02767622,
0.07590722, 0.06308123, 0.05571067, 0.0312004 , -0.06364436,
-0.15178242, -0.0313257 , 0.01023862, -0.02718701, -0.03659143,
0.04386298, -0.05511231, -0.05728281, -0.03789811, -0.07106073,
-0.34574961, -0.27614587, -0.27608529, -0.37483751, -0.34951999,
How could I compare these values in a meaningful way?
Any help would be greatly appreciated.
Many thanks