Hi @CarinaFo,
if you want to compare two conditions, you want to use mne.stats.permutations_cluster_test, which as the first argument takes a list of conditions, where each condition is an array of (participants, ...) shape.
To compare your tfrs, I would:
- first crop the tfrs to the desired time range (in your case - prestimulus) and frequency range:
tfr_cond1_crop = [tfr.copy().crop(tmin=..., tmax=..., fmin=..., fmax=...) for tfr in tfr_cond1] - then stack all tfr arrays for each condition:
tfr_array_cond1 = np.stack([tfr.data for tfr in tfr_cond1_crop], axis=0) - your
Xargument is now[tfr_array_cond1, tfr_array_cond2](if you are going to use a t test the order of the conditions will affect the sign of the t values) - now you are almost ready to conduct the cluster permutation test, you just need to specify channels adjacency and then build the whole adjacency for the channels-time-frequency space using
mne.stats.combine_adjacency. You also need to choose the correctstat_fun(that depends on the test you want to perform - I guess it is within subjects t test in your case?)