# How to compare imaginary coherence values?

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, fs=128)
sfarrB, Pyy = scipy.signal.welch(ex_sig1, fs=128)
sfarrAB, Pxy = scipy.signal.csd(ex_sig1,ex_sig1,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

• Your signals are real-valued vectors? Can you make your data available? – Michael_RW Nov 5 '19 at 17:48
• Hi Michael, yes they are real valued. Imaginary coherence is defined in a way, that it can have negative or positive values. I cannot make the data available. – andyfilip Nov 9 '19 at 12:32