Time Resolved MS Coherence Errors

Hello,

I have a 10-channel EEG dataset that is 4071.99s long, sampled at 200Hz. I'm trying to run the time-resolved magnitude squared coherence [NxN] function but receive the following errors:

Input signals are too few (1 files) or too short (400 samples) for the requested window length (5.00 s). Provide 2 or more files with a duration >= 5.00 s; or 1 file with a duration >= 7.50 s.
Coherence for the selected time segment could not be calculated.

I've selected the following parameters:

  • All file
  • Include bad channels
  • Sliding window duration of 2000ms
  • 50% overlap
  • Magnitude square
  • 5s PSD estimation
  • 50% overlap for PSD
  • 55Hz highest frequency

This is the only function that gives me this error. Have I missed something/am misunderstanding the calculations?

Thank you.
-Geoff

HI Geoff,

For time-resolved (magnitude squared) coherence, the signals are divided first in segments of using Sliding window duration and Sliding window overlap. Each of these signal segments is then further divided in smaller windows with the parameters Window length for PSD estimation and Overlap for PSD estimation to compute estimated the PSDs and from them coherence.

The issue that you are having is that the segment is 2s while the requested window to estimate the PSDs is 5s. Thus it is not possible to estimate the PSDs. As such, your segment duration should be enough to contain 5 windows for PSD estimation. In the case of 50% overlap in the PSD windows, it means that the segment duration should be at least 3 times as long as the PSD window.

Best,
Raymundo