Average Connectivity on recordings of different lengths

Hello,

I'm doing source connectivity (1xN coherence) on resting state data that has variable length in different subjects. When choosing "All file" for the time window and "save average connectivity matrix" as the output, BST throws an error if any of the subject files have a time length shorter than the first file. Are there any suggestions for how to achieve a similar output without the time errors?

All the methods available need signals of the same duration (exact same number of time samples).
If your recordings have different duration, you need to select a common time window across all the files (and therefore NOT use the option "All file", or import the recordings before)

Thanks, Francois. I know the connectivity tutorial is still in the works, but one more question. As an alternative, would it be appropriate to calculate individual connectivity matrices for each subject (all of different time length) and then just average them after? Is that the same process behind the built in "save average matrix" output?

I'm sorry, I misunderstood your question initially: I thought you wanted to compute a connectivity measure between signals of different duration. But obviously this is not the case.

If I understand well, you have multiple recordings of different duration, you put them all in the Process1 box and run the Coherence [1xN] process with the option "Save average connectivity matrix". But Brainstorm does not let you do this and you get an error message like this one:
image

What you are trying to do is correct for the estimation of Coherence, but the pre-loading of the files by bst_connectivity doesn't let you do it, as not all the connectivity metrics would work in this configuration.

As a workaround, yes you can compute the coherence values separately for each file and average them after. What you can do is to select the option "Save individual results" instead, followed by the Average process. To be tested, but I think it should give you the same results.

image image

Hi thanks! That was exactly my question. All the best!