2 samples permutation test on source data with spatio-temporal clustering

Tests if the source space data are significantly different between 2 groups of subjects (simulated here using one subject’s data). The multiple comparisons problem is addressed with a cluster-level permutation test across space and time.

# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
#          Eric Larson <larson.eric.d@gmail.com>
# License: BSD (3-clause)

import os.path as op

import numpy as np
from scipy import stats as stats

import mne
from mne import spatial_src_adjacency
from mne.stats import spatio_temporal_cluster_test, summarize_clusters_stc
from mne.datasets import sample

print(__doc__)

Set parameters

data_path = sample.data_path()
stc_fname = data_path + '/MEG/sample/sample_audvis-meg-lh.stc'
subjects_dir = data_path + '/subjects'
src_fname = subjects_dir + '/fsaverage/bem/fsaverage-ico-5-src.fif'

# Load stc to in common cortical space (fsaverage)
stc = mne.read_source_estimate(stc_fname)
stc.resample(50, npad='auto')

# Read the source space we are morphing to
src = mne.read_source_spaces(src_fname)
fsave_vertices = [s['vertno'] for s in src]
morph = mne.compute_source_morph(stc, 'sample', 'fsaverage',
                                 spacing=fsave_vertices, smooth=20,
                                 subjects_dir=subjects_dir)
stc = morph.apply(stc)
n_vertices_fsave, n_times = stc.data.shape
tstep = stc.tstep * 1000  # convert to milliseconds

n_subjects1, n_subjects2 = 7, 9
print('Simulating data for %d and %d subjects.' % (n_subjects1, n_subjects2))

#    Let's make sure our results replicate, so set the seed.
np.random.seed(0)
X1 = np.random.randn(n_vertices_fsave, n_times, n_subjects1) * 10
X2 = np.random.randn(n_vertices_fsave, n_times, n_subjects2) * 10
X1[:, :, :] += stc.data[:, :, np.newaxis]
# make the activity bigger for the second set of subjects
X2[:, :, :] += 3 * stc.data[:, :, np.newaxis]

#    We want to compare the overall activity levels for each subject
X1 = np.abs(X1)  # only magnitude
X2 = np.abs(X2)  # only magnitude

Out:

    Reading a source space...
    [done]
    Reading a source space...
    [done]
    2 source spaces read
Simulating data for 7 and 9 subjects.

Compute statistic

To use an algorithm optimized for spatio-temporal clustering, we just pass the spatial adjacency matrix (instead of spatio-temporal)

print('Computing adjacency.')
adjacency = spatial_src_adjacency(src)

#    Note that X needs to be a list of multi-dimensional array of shape
#    samples (subjects_k) x time x space, so we permute dimensions
X1 = np.transpose(X1, [2, 1, 0])
X2 = np.transpose(X2, [2, 1, 0])
X = [X1, X2]

#    Now let's actually do the clustering. This can take a long time...
#    Here we set the threshold quite high to reduce computation.
p_threshold = 0.0001
f_threshold = stats.distributions.f.ppf(1. - p_threshold / 2.,
                                        n_subjects1 - 1, n_subjects2 - 1)
print('Clustering.')
T_obs, clusters, cluster_p_values, H0 = clu =\
    spatio_temporal_cluster_test(X, adjacency=adjacency, n_jobs=1,
                                 threshold=f_threshold, buffer_size=None)
#    Now select the clusters that are sig. at p < 0.05 (note that this value
#    is multiple-comparisons corrected).
good_cluster_inds = np.where(cluster_p_values < 0.05)[0]

Out:

Computing adjacency.
-- number of adjacent vertices : 20484
Clustering.
stat_fun(H1): min=0.000000 max=293.441888
Running initial clustering
Found 234 clusters
Permuting 1023 times...

  0%|          |  : 0/1023 [00:00<?,       ?it/s]
  0%|          |  : 2/1023 [00:00<00:34,   29.53it/s]
  0%|          |  : 3/1023 [00:00<00:34,   29.53it/s]
  0%|          |  : 4/1023 [00:00<00:34,   29.53it/s]
  1%|          |  : 6/1023 [00:00<00:33,   30.28it/s]
  1%|          |  : 7/1023 [00:00<00:33,   30.25it/s]
  1%|          |  : 8/1023 [00:00<00:33,   30.21it/s]
  1%|          |  : 9/1023 [00:00<00:33,   30.18it/s]
  1%|1         |  : 11/1023 [00:00<00:32,   30.94it/s]
  1%|1         |  : 12/1023 [00:00<00:32,   30.86it/s]
  1%|1         |  : 13/1023 [00:00<00:32,   30.79it/s]
  1%|1         |  : 15/1023 [00:00<00:31,   31.55it/s]
  2%|1         |  : 16/1023 [00:00<00:32,   31.44it/s]
  2%|1         |  : 17/1023 [00:00<00:32,   31.34it/s]
  2%|1         |  : 18/1023 [00:00<00:32,   31.25it/s]
  2%|1         |  : 20/1023 [00:00<00:31,   32.00it/s]
  2%|2         |  : 21/1023 [00:00<00:31,   31.87it/s]
  2%|2         |  : 22/1023 [00:00<00:31,   31.75it/s]
  2%|2         |  : 23/1023 [00:00<00:31,   31.63it/s]
  2%|2         |  : 25/1023 [00:00<00:30,   32.38it/s]
  3%|2         |  : 26/1023 [00:00<00:30,   32.23it/s]
  3%|2         |  : 27/1023 [00:00<00:31,   32.08it/s]
  3%|2         |  : 29/1023 [00:00<00:30,   32.84it/s]
  3%|2         |  : 30/1023 [00:00<00:30,   32.65it/s]
  3%|3         |  : 31/1023 [00:00<00:30,   32.48it/s]
  3%|3         |  : 32/1023 [00:00<00:30,   32.32it/s]
  3%|3         |  : 34/1023 [00:00<00:29,   33.07it/s]
  3%|3         |  : 35/1023 [00:00<00:30,   32.87it/s]
  4%|3         |  : 36/1023 [00:00<00:30,   32.69it/s]
  4%|3         |  : 38/1023 [00:01<00:29,   33.44it/s]
  4%|3         |  : 39/1023 [00:01<00:29,   33.22it/s]
  4%|3         |  : 40/1023 [00:01<00:29,   33.01it/s]
  4%|4         |  : 42/1023 [00:01<00:29,   33.76it/s]
  4%|4         |  : 43/1023 [00:01<00:29,   33.52it/s]
  4%|4         |  : 44/1023 [00:01<00:29,   33.30it/s]
  4%|4         |  : 45/1023 [00:01<00:29,   33.09it/s]
  5%|4         |  : 47/1023 [00:01<00:28,   33.84it/s]
  5%|4         |  : 48/1023 [00:01<00:29,   33.59it/s]
  5%|4         |  : 49/1023 [00:01<00:29,   33.37it/s]
  5%|4         |  : 51/1023 [00:01<00:28,   34.11it/s]
  5%|5         |  : 52/1023 [00:01<00:28,   33.85it/s]
  5%|5         |  : 53/1023 [00:01<00:28,   33.60it/s]
  5%|5         |  : 54/1023 [00:01<00:29,   33.38it/s]
  5%|5         |  : 56/1023 [00:01<00:28,   34.12it/s]
  6%|5         |  : 57/1023 [00:01<00:28,   33.86it/s]
  6%|5         |  : 58/1023 [00:01<00:28,   33.62it/s]
  6%|5         |  : 60/1023 [00:01<00:28,   34.36it/s]
  6%|5         |  : 61/1023 [00:01<00:28,   34.08it/s]
  6%|6         |  : 62/1023 [00:01<00:28,   33.82it/s]
  6%|6         |  : 63/1023 [00:01<00:28,   33.58it/s]
  6%|6         |  : 65/1023 [00:01<00:27,   34.32it/s]
  6%|6         |  : 66/1023 [00:01<00:28,   34.04it/s]
  7%|6         |  : 67/1023 [00:01<00:28,   33.79it/s]
  7%|6         |  : 68/1023 [00:01<00:28,   33.54it/s]
  7%|6         |  : 70/1023 [00:01<00:27,   34.28it/s]
  7%|6         |  : 71/1023 [00:01<00:27,   34.01it/s]
  7%|7         |  : 72/1023 [00:01<00:28,   33.76it/s]
  7%|7         |  : 74/1023 [00:01<00:27,   34.50it/s]
  7%|7         |  : 75/1023 [00:01<00:27,   34.22it/s]
  7%|7         |  : 76/1023 [00:02<00:27,   33.95it/s]
  8%|7         |  : 77/1023 [00:02<00:28,   33.70it/s]
  8%|7         |  : 79/1023 [00:02<00:27,   34.44it/s]
  8%|7         |  : 80/1023 [00:02<00:27,   34.16it/s]
  8%|7         |  : 81/1023 [00:02<00:27,   33.90it/s]
  8%|8         |  : 82/1023 [00:02<00:27,   33.65it/s]
  8%|8         |  : 84/1023 [00:02<00:27,   34.39it/s]
  8%|8         |  : 85/1023 [00:02<00:27,   34.12it/s]
  8%|8         |  : 86/1023 [00:02<00:27,   33.86it/s]
  9%|8         |  : 87/1023 [00:02<00:27,   33.61it/s]
  9%|8         |  : 89/1023 [00:02<00:27,   34.36it/s]
  9%|8         |  : 90/1023 [00:02<00:27,   34.08it/s]
  9%|8         |  : 91/1023 [00:02<00:27,   33.82it/s]
  9%|9         |  : 93/1023 [00:02<00:26,   34.56it/s]
  9%|9         |  : 94/1023 [00:02<00:27,   34.27it/s]
  9%|9         |  : 95/1023 [00:02<00:27,   34.00it/s]
  9%|9         |  : 96/1023 [00:02<00:27,   33.75it/s]
 10%|9         |  : 98/1023 [00:02<00:26,   34.49it/s]
 10%|9         |  : 99/1023 [00:02<00:27,   34.21it/s]
 10%|9         |  : 100/1023 [00:02<00:27,   33.94it/s]
 10%|9         |  : 102/1023 [00:02<00:26,   34.68it/s]
 10%|#         |  : 103/1023 [00:02<00:26,   34.38it/s]
 10%|#         |  : 104/1023 [00:02<00:26,   34.10it/s]
 10%|#         |  : 105/1023 [00:02<00:27,   33.84it/s]
 10%|#         |  : 107/1023 [00:02<00:26,   34.58it/s]
 11%|#         |  : 108/1023 [00:02<00:26,   34.29it/s]
 11%|#         |  : 109/1023 [00:02<00:26,   34.02it/s]
 11%|#         |  : 110/1023 [00:02<00:27,   33.76it/s]
 11%|#         |  : 112/1023 [00:02<00:26,   34.50it/s]
 11%|#1        |  : 113/1023 [00:03<00:26,   34.22it/s]
 11%|#1        |  : 114/1023 [00:03<00:26,   33.95it/s]
 11%|#1        |  : 116/1023 [00:03<00:26,   34.69it/s]
 11%|#1        |  : 117/1023 [00:03<00:26,   34.39it/s]
 12%|#1        |  : 118/1023 [00:03<00:26,   34.11it/s]
 12%|#1        |  : 119/1023 [00:03<00:26,   33.85it/s]
 12%|#1        |  : 121/1023 [00:03<00:26,   34.59it/s]
 12%|#1        |  : 122/1023 [00:03<00:26,   34.30it/s]
 12%|#2        |  : 123/1023 [00:03<00:26,   34.02it/s]
 12%|#2        |  : 124/1023 [00:03<00:26,   33.77it/s]
 12%|#2        |  : 126/1023 [00:03<00:25,   34.51it/s]
 12%|#2        |  : 127/1023 [00:03<00:26,   34.22it/s]
 13%|#2        |  : 128/1023 [00:03<00:26,   33.95it/s]
 13%|#2        |  : 130/1023 [00:03<00:25,   34.69it/s]
 13%|#2        |  : 131/1023 [00:03<00:25,   34.40it/s]
 13%|#2        |  : 132/1023 [00:03<00:26,   34.12it/s]
 13%|#3        |  : 133/1023 [00:03<00:26,   33.86it/s]
 13%|#3        |  : 135/1023 [00:03<00:25,   34.60it/s]
 13%|#3        |  : 136/1023 [00:03<00:25,   34.30it/s]
 13%|#3        |  : 137/1023 [00:03<00:26,   34.03it/s]
 13%|#3        |  : 138/1023 [00:03<00:26,   33.77it/s]
 14%|#3        |  : 140/1023 [00:03<00:25,   34.51it/s]
 14%|#3        |  : 141/1023 [00:03<00:25,   34.23it/s]
 14%|#3        |  : 142/1023 [00:03<00:25,   33.96it/s]
 14%|#3        |  : 143/1023 [00:03<00:26,   33.71it/s]
 14%|#4        |  : 145/1023 [00:03<00:25,   34.45it/s]
 14%|#4        |  : 146/1023 [00:03<00:25,   34.17it/s]
 14%|#4        |  : 147/1023 [00:03<00:25,   33.91it/s]
 15%|#4        |  : 149/1023 [00:03<00:25,   34.65it/s]
 15%|#4        |  : 150/1023 [00:03<00:25,   34.34it/s]
 15%|#4        |  : 151/1023 [00:04<00:25,   34.07it/s]
 15%|#4        |  : 152/1023 [00:04<00:25,   33.81it/s]
 15%|#5        |  : 154/1023 [00:04<00:25,   34.55it/s]
 15%|#5        |  : 155/1023 [00:04<00:25,   34.26it/s]
 15%|#5        |  : 156/1023 [00:04<00:25,   33.99it/s]
 15%|#5        |  : 157/1023 [00:04<00:25,   33.74it/s]
 16%|#5        |  : 159/1023 [00:04<00:25,   34.48it/s]
 16%|#5        |  : 160/1023 [00:04<00:25,   34.20it/s]
 16%|#5        |  : 161/1023 [00:04<00:25,   33.93it/s]
 16%|#5        |  : 162/1023 [00:04<00:25,   33.68it/s]
 16%|#6        |  : 164/1023 [00:04<00:24,   34.42it/s]
 16%|#6        |  : 165/1023 [00:04<00:25,   34.14it/s]
 16%|#6        |  : 166/1023 [00:04<00:25,   33.87it/s]
 16%|#6        |  : 168/1023 [00:04<00:24,   34.61it/s]
 17%|#6        |  : 169/1023 [00:04<00:24,   34.32it/s]
 17%|#6        |  : 170/1023 [00:04<00:25,   34.05it/s]
 17%|#6        |  : 171/1023 [00:04<00:25,   33.79it/s]
 17%|#6        |  : 173/1023 [00:04<00:24,   34.53it/s]
 17%|#7        |  : 174/1023 [00:04<00:24,   34.24it/s]
 17%|#7        |  : 175/1023 [00:04<00:24,   33.97it/s]
 17%|#7        |  : 176/1023 [00:04<00:25,   33.72it/s]
 17%|#7        |  : 178/1023 [00:04<00:24,   34.46it/s]
 17%|#7        |  : 179/1023 [00:04<00:24,   34.17it/s]
 18%|#7        |  : 180/1023 [00:04<00:24,   33.91it/s]
 18%|#7        |  : 181/1023 [00:04<00:25,   33.66it/s]
 18%|#7        |  : 183/1023 [00:04<00:24,   34.40it/s]
 18%|#7        |  : 184/1023 [00:04<00:24,   34.11it/s]
 18%|#8        |  : 185/1023 [00:04<00:24,   33.85it/s]
 18%|#8        |  : 187/1023 [00:04<00:24,   34.59it/s]
 18%|#8        |  : 188/1023 [00:05<00:24,   34.30it/s]
 18%|#8        |  : 189/1023 [00:05<00:24,   34.03it/s]
 19%|#8        |  : 190/1023 [00:05<00:24,   33.77it/s]
 19%|#8        |  : 192/1023 [00:05<00:24,   34.51it/s]
 19%|#8        |  : 193/1023 [00:05<00:24,   34.23it/s]
 19%|#8        |  : 194/1023 [00:05<00:24,   33.96it/s]
 19%|#9        |  : 195/1023 [00:05<00:24,   33.70it/s]
 19%|#9        |  : 197/1023 [00:05<00:23,   34.45it/s]
 19%|#9        |  : 198/1023 [00:05<00:24,   34.16it/s]
 19%|#9        |  : 199/1023 [00:05<00:24,   33.90it/s]
 20%|#9        |  : 201/1023 [00:05<00:23,   34.63it/s]
 20%|#9        |  : 202/1023 [00:05<00:23,   34.34it/s]
 20%|#9        |  : 203/1023 [00:05<00:24,   34.06it/s]
 20%|##        |  : 205/1023 [00:05<00:23,   34.80it/s]
 20%|##        |  : 206/1023 [00:05<00:23,   34.49it/s]
 20%|##        |  : 207/1023 [00:05<00:23,   34.21it/s]
 20%|##        |  : 208/1023 [00:05<00:24,   33.94it/s]
 21%|##        |  : 210/1023 [00:05<00:23,   34.68it/s]
 21%|##        |  : 211/1023 [00:05<00:23,   34.39it/s]
 21%|##        |  : 212/1023 [00:05<00:23,   34.11it/s]
 21%|##        |  : 213/1023 [00:05<00:23,   33.84it/s]
 21%|##1       |  : 215/1023 [00:05<00:23,   34.58it/s]
 21%|##1       |  : 216/1023 [00:05<00:23,   34.29it/s]
 21%|##1       |  : 217/1023 [00:05<00:23,   34.01it/s]
 21%|##1       |  : 219/1023 [00:05<00:23,   34.75it/s]
 22%|##1       |  : 220/1023 [00:05<00:23,   34.45it/s]
 22%|##1       |  : 221/1023 [00:05<00:23,   34.16it/s]
 22%|##1       |  : 222/1023 [00:05<00:23,   33.90it/s]
 22%|##1       |  : 224/1023 [00:05<00:23,   34.63it/s]
 22%|##1       |  : 225/1023 [00:05<00:23,   34.34it/s]
 22%|##2       |  : 226/1023 [00:06<00:23,   34.06it/s]
 22%|##2       |  : 228/1023 [00:06<00:22,   34.80it/s]
 22%|##2       |  : 229/1023 [00:06<00:23,   34.49it/s]
 22%|##2       |  : 230/1023 [00:06<00:23,   34.21it/s]
 23%|##2       |  : 231/1023 [00:06<00:23,   33.94it/s]
 23%|##2       |  : 233/1023 [00:06<00:22,   34.68it/s]
 23%|##2       |  : 234/1023 [00:06<00:22,   34.38it/s]
 23%|##2       |  : 235/1023 [00:06<00:23,   34.10it/s]
 23%|##3       |  : 236/1023 [00:06<00:23,   33.84it/s]
 23%|##3       |  : 238/1023 [00:06<00:22,   34.58it/s]
 23%|##3       |  : 239/1023 [00:06<00:22,   34.29it/s]
 23%|##3       |  : 240/1023 [00:06<00:23,   34.02it/s]
 24%|##3       |  : 242/1023 [00:06<00:22,   34.76it/s]
 24%|##3       |  : 243/1023 [00:06<00:22,   34.46it/s]
 24%|##3       |  : 244/1023 [00:06<00:22,   34.17it/s]
 24%|##3       |  : 245/1023 [00:06<00:22,   33.91it/s]
 24%|##4       |  : 247/1023 [00:06<00:22,   34.65it/s]
 24%|##4       |  : 248/1023 [00:06<00:22,   34.35it/s]
 24%|##4       |  : 249/1023 [00:06<00:22,   34.07it/s]
 25%|##4       |  : 251/1023 [00:06<00:22,   34.81it/s]
 25%|##4       |  : 252/1023 [00:06<00:22,   34.50it/s]
 25%|##4       |  : 253/1023 [00:06<00:22,   34.21it/s]
 25%|##4       |  : 254/1023 [00:06<00:22,   33.94it/s]
 25%|##5       |  : 256/1023 [00:06<00:22,   34.68it/s]
 25%|##5       |  : 257/1023 [00:06<00:22,   34.39it/s]
 25%|##5       |  : 258/1023 [00:06<00:22,   34.11it/s]
 25%|##5       |  : 260/1023 [00:06<00:21,   34.84it/s]
 26%|##5       |  : 261/1023 [00:06<00:22,   34.53it/s]
 26%|##5       |  : 262/1023 [00:06<00:22,   34.25it/s]
 26%|##5       |  : 263/1023 [00:07<00:22,   33.98it/s]
 26%|##5       |  : 265/1023 [00:07<00:21,   34.71it/s]
 26%|##6       |  : 266/1023 [00:07<00:21,   34.42it/s]
 26%|##6       |  : 267/1023 [00:07<00:22,   34.14it/s]
 26%|##6       |  : 268/1023 [00:07<00:22,   33.88it/s]
 26%|##6       |  : 270/1023 [00:07<00:21,   34.62it/s]
 26%|##6       |  : 271/1023 [00:07<00:21,   34.33it/s]
 27%|##6       |  : 272/1023 [00:07<00:22,   34.05it/s]
 27%|##6       |  : 274/1023 [00:07<00:21,   34.79it/s]
 27%|##6       |  : 275/1023 [00:07<00:21,   34.49it/s]
 27%|##6       |  : 276/1023 [00:07<00:21,   34.20it/s]
 27%|##7       |  : 277/1023 [00:07<00:21,   33.94it/s]
 27%|##7       |  : 279/1023 [00:07<00:21,   34.67it/s]
 27%|##7       |  : 280/1023 [00:07<00:21,   34.37it/s]
 27%|##7       |  : 281/1023 [00:07<00:21,   34.10it/s]
 28%|##7       |  : 283/1023 [00:07<00:21,   34.84it/s]
 28%|##7       |  : 284/1023 [00:07<00:21,   34.53it/s]
 28%|##7       |  : 285/1023 [00:07<00:21,   34.24it/s]
 28%|##7       |  : 286/1023 [00:07<00:21,   33.97it/s]
 28%|##8       |  : 288/1023 [00:07<00:21,   34.70it/s]
 28%|##8       |  : 289/1023 [00:07<00:21,   34.41it/s]
 28%|##8       |  : 290/1023 [00:07<00:21,   34.13it/s]
 29%|##8       |  : 292/1023 [00:07<00:20,   34.86it/s]
 29%|##8       |  : 293/1023 [00:07<00:21,   34.55it/s]
 29%|##8       |  : 294/1023 [00:07<00:21,   34.26it/s]
 29%|##8       |  : 296/1023 [00:07<00:20,   35.00it/s]
 29%|##9       |  : 297/1023 [00:07<00:20,   34.69it/s]
 29%|##9       |  : 298/1023 [00:07<00:21,   34.39it/s]
 29%|##9       |  : 299/1023 [00:07<00:21,   34.11it/s]
 29%|##9       |  : 301/1023 [00:07<00:20,   34.84it/s]
 30%|##9       |  : 302/1023 [00:08<00:20,   34.53it/s]
 30%|##9       |  : 303/1023 [00:08<00:21,   34.24it/s]
 30%|##9       |  : 305/1023 [00:08<00:20,   34.98it/s]
 30%|##9       |  : 306/1023 [00:08<00:20,   34.66it/s]
 30%|###       |  : 307/1023 [00:08<00:20,   34.36it/s]
 30%|###       |  : 308/1023 [00:08<00:20,   34.08it/s]
 30%|###       |  : 310/1023 [00:08<00:20,   34.82it/s]
 30%|###       |  : 311/1023 [00:08<00:20,   34.51it/s]
 30%|###       |  : 312/1023 [00:08<00:20,   34.22it/s]
 31%|###       |  : 314/1023 [00:08<00:20,   34.95it/s]
 31%|###       |  : 315/1023 [00:08<00:20,   34.64it/s]
 31%|###       |  : 316/1023 [00:08<00:20,   34.34it/s]
 31%|###       |  : 317/1023 [00:08<00:20,   34.07it/s]
 31%|###1      |  : 319/1023 [00:08<00:20,   34.81it/s]
 31%|###1      |  : 320/1023 [00:08<00:20,   34.50it/s]
 31%|###1      |  : 321/1023 [00:08<00:20,   34.21it/s]
 31%|###1      |  : 322/1023 [00:08<00:20,   33.95it/s]
 32%|###1      |  : 324/1023 [00:08<00:20,   34.69it/s]
 32%|###1      |  : 325/1023 [00:08<00:20,   34.39it/s]
 32%|###1      |  : 326/1023 [00:08<00:20,   34.10it/s]
 32%|###2      |  : 328/1023 [00:08<00:19,   34.84it/s]
 32%|###2      |  : 329/1023 [00:08<00:20,   34.53it/s]
 32%|###2      |  : 330/1023 [00:08<00:20,   34.25it/s]
 32%|###2      |  : 331/1023 [00:08<00:20,   33.98it/s]
 33%|###2      |  : 333/1023 [00:08<00:19,   34.72it/s]
 33%|###2      |  : 334/1023 [00:08<00:20,   34.42it/s]
 33%|###2      |  : 335/1023 [00:08<00:20,   34.14it/s]
 33%|###2      |  : 337/1023 [00:08<00:19,   34.87it/s]
 33%|###3      |  : 338/1023 [00:08<00:19,   34.56it/s]
 33%|###3      |  : 339/1023 [00:09<00:19,   34.27it/s]
 33%|###3      |  : 340/1023 [00:09<00:20,   34.00it/s]
 33%|###3      |  : 342/1023 [00:09<00:19,   34.74it/s]
 34%|###3      |  : 343/1023 [00:09<00:19,   34.44it/s]
 34%|###3      |  : 344/1023 [00:09<00:19,   34.16it/s]
 34%|###3      |  : 345/1023 [00:09<00:20,   33.90it/s]
 34%|###3      |  : 347/1023 [00:09<00:19,   34.64it/s]
 34%|###4      |  : 348/1023 [00:09<00:19,   34.34it/s]
 34%|###4      |  : 349/1023 [00:09<00:19,   34.07it/s]
 34%|###4      |  : 351/1023 [00:09<00:19,   34.81it/s]
 34%|###4      |  : 352/1023 [00:09<00:19,   34.50it/s]
 35%|###4      |  : 353/1023 [00:09<00:19,   34.21it/s]
 35%|###4      |  : 354/1023 [00:09<00:19,   33.94it/s]
 35%|###4      |  : 356/1023 [00:09<00:19,   34.68it/s]
 35%|###4      |  : 357/1023 [00:09<00:19,   34.38it/s]
 35%|###4      |  : 358/1023 [00:09<00:19,   34.10it/s]
 35%|###5      |  : 360/1023 [00:09<00:19,   34.84it/s]
 35%|###5      |  : 361/1023 [00:09<00:19,   34.53it/s]
 35%|###5      |  : 362/1023 [00:09<00:19,   34.24it/s]
 36%|###5      |  : 364/1023 [00:09<00:18,   34.97it/s]
 36%|###5      |  : 365/1023 [00:09<00:18,   34.66it/s]
 36%|###5      |  : 366/1023 [00:09<00:19,   34.36it/s]
 36%|###5      |  : 367/1023 [00:09<00:19,   34.09it/s]
 36%|###6      |  : 369/1023 [00:09<00:18,   34.83it/s]
 36%|###6      |  : 370/1023 [00:09<00:18,   34.51it/s]
 36%|###6      |  : 371/1023 [00:09<00:19,   34.23it/s]
 36%|###6      |  : 373/1023 [00:09<00:18,   34.97it/s]
 37%|###6      |  : 374/1023 [00:09<00:18,   34.65it/s]
 37%|###6      |  : 375/1023 [00:09<00:18,   34.35it/s]
 37%|###6      |  : 376/1023 [00:09<00:18,   34.08it/s]
 37%|###6      |  : 378/1023 [00:10<00:18,   34.81it/s]
 37%|###7      |  : 379/1023 [00:10<00:18,   34.51it/s]
 37%|###7      |  : 380/1023 [00:10<00:18,   34.22it/s]
 37%|###7      |  : 381/1023 [00:10<00:18,   33.95it/s]
 37%|###7      |  : 383/1023 [00:10<00:18,   34.69it/s]
 38%|###7      |  : 384/1023 [00:10<00:18,   34.39it/s]
 38%|###7      |  : 385/1023 [00:10<00:18,   34.12it/s]
 38%|###7      |  : 387/1023 [00:10<00:18,   34.85it/s]
 38%|###7      |  : 388/1023 [00:10<00:18,   34.55it/s]
 38%|###8      |  : 389/1023 [00:10<00:18,   34.26it/s]
 38%|###8      |  : 390/1023 [00:10<00:18,   33.99it/s]
 38%|###8      |  : 392/1023 [00:10<00:18,   34.73it/s]
 38%|###8      |  : 393/1023 [00:10<00:18,   34.43it/s]
 39%|###8      |  : 394/1023 [00:10<00:18,   34.15it/s]
 39%|###8      |  : 395/1023 [00:10<00:18,   33.89it/s]
 39%|###8      |  : 397/1023 [00:10<00:18,   34.62it/s]
 39%|###8      |  : 398/1023 [00:10<00:18,   34.33it/s]
 39%|###9      |  : 399/1023 [00:10<00:18,   34.05it/s]
 39%|###9      |  : 401/1023 [00:10<00:17,   34.79it/s]
 39%|###9      |  : 402/1023 [00:10<00:18,   34.49it/s]
 39%|###9      |  : 403/1023 [00:10<00:18,   34.20it/s]
 39%|###9      |  : 404/1023 [00:10<00:18,   33.94it/s]
 40%|###9      |  : 406/1023 [00:10<00:17,   34.68it/s]
 40%|###9      |  : 407/1023 [00:10<00:17,   34.38it/s]
 40%|###9      |  : 408/1023 [00:10<00:18,   34.10it/s]
 40%|####      |  : 410/1023 [00:10<00:17,   34.84it/s]
 40%|####      |  : 411/1023 [00:10<00:17,   34.53it/s]
 40%|####      |  : 412/1023 [00:10<00:17,   34.25it/s]
 40%|####      |  : 413/1023 [00:10<00:17,   33.98it/s]
 41%|####      |  : 415/1023 [00:10<00:17,   34.72it/s]
 41%|####      |  : 416/1023 [00:11<00:17,   34.42it/s]
 41%|####      |  : 417/1023 [00:11<00:17,   34.14it/s]
 41%|####      |  : 418/1023 [00:11<00:17,   33.88it/s]
 41%|####1     |  : 420/1023 [00:11<00:17,   34.61it/s]
 41%|####1     |  : 421/1023 [00:11<00:17,   34.32it/s]
 41%|####1     |  : 422/1023 [00:11<00:17,   34.04it/s]
 41%|####1     |  : 423/1023 [00:11<00:17,   33.78it/s]
 42%|####1     |  : 425/1023 [00:11<00:17,   34.53it/s]
 42%|####1     |  : 426/1023 [00:11<00:17,   34.24it/s]
 42%|####1     |  : 427/1023 [00:11<00:17,   33.97it/s]
 42%|####1     |  : 429/1023 [00:11<00:17,   34.71it/s]
 42%|####2     |  : 430/1023 [00:11<00:17,   34.41it/s]
 42%|####2     |  : 431/1023 [00:11<00:17,   34.12it/s]
 42%|####2     |  : 432/1023 [00:11<00:17,   33.86it/s]
 42%|####2     |  : 434/1023 [00:11<00:17,   34.60it/s]
 43%|####2     |  : 435/1023 [00:11<00:17,   34.31it/s]
 43%|####2     |  : 436/1023 [00:11<00:17,   34.04it/s]
 43%|####2     |  : 437/1023 [00:11<00:17,   33.78it/s]
 43%|####2     |  : 439/1023 [00:11<00:16,   34.52it/s]
 43%|####3     |  : 440/1023 [00:11<00:17,   34.24it/s]
 43%|####3     |  : 441/1023 [00:11<00:17,   33.97it/s]
 43%|####3     |  : 443/1023 [00:11<00:16,   34.71it/s]
 43%|####3     |  : 444/1023 [00:11<00:16,   34.41it/s]
 43%|####3     |  : 445/1023 [00:11<00:16,   34.13it/s]
 44%|####3     |  : 447/1023 [00:11<00:16,   34.86it/s]
 44%|####3     |  : 448/1023 [00:11<00:16,   34.55it/s]
 44%|####3     |  : 449/1023 [00:11<00:16,   34.26it/s]
 44%|####3     |  : 450/1023 [00:11<00:16,   33.99it/s]
 44%|####4     |  : 452/1023 [00:11<00:16,   34.73it/s]
 44%|####4     |  : 453/1023 [00:12<00:16,   34.43it/s]
 44%|####4     |  : 454/1023 [00:12<00:16,   34.15it/s]
 45%|####4     |  : 456/1023 [00:12<00:16,   34.88it/s]
 45%|####4     |  : 457/1023 [00:12<00:16,   34.57it/s]
 45%|####4     |  : 458/1023 [00:12<00:16,   34.28it/s]
 45%|####4     |  : 459/1023 [00:12<00:16,   34.01it/s]
 45%|####5     |  : 461/1023 [00:12<00:16,   34.75it/s]
 45%|####5     |  : 462/1023 [00:12<00:16,   34.44it/s]
 45%|####5     |  : 463/1023 [00:12<00:16,   34.16it/s]
 45%|####5     |  : 465/1023 [00:12<00:15,   34.89it/s]
 46%|####5     |  : 466/1023 [00:12<00:16,   34.58it/s]
 46%|####5     |  : 467/1023 [00:12<00:16,   34.29it/s]
 46%|####5     |  : 468/1023 [00:12<00:16,   34.02it/s]
 46%|####5     |  : 470/1023 [00:12<00:15,   34.75it/s]
 46%|####6     |  : 471/1023 [00:12<00:16,   34.45it/s]
 46%|####6     |  : 472/1023 [00:12<00:16,   34.17it/s]
 46%|####6     |  : 474/1023 [00:12<00:15,   34.91it/s]
 46%|####6     |  : 475/1023 [00:12<00:15,   34.60it/s]
 47%|####6     |  : 476/1023 [00:12<00:15,   34.30it/s]
 47%|####6     |  : 477/1023 [00:12<00:16,   34.03it/s]
 47%|####6     |  : 479/1023 [00:12<00:15,   34.76it/s]
 47%|####6     |  : 480/1023 [00:12<00:15,   34.45it/s]
 47%|####7     |  : 481/1023 [00:12<00:15,   34.17it/s]
 47%|####7     |  : 482/1023 [00:12<00:15,   33.91it/s]
 47%|####7     |  : 484/1023 [00:12<00:15,   34.64it/s]
 47%|####7     |  : 485/1023 [00:12<00:15,   34.35it/s]
 48%|####7     |  : 486/1023 [00:12<00:15,   34.07it/s]
 48%|####7     |  : 488/1023 [00:12<00:15,   34.81it/s]
 48%|####7     |  : 489/1023 [00:12<00:15,   34.50it/s]
 48%|####7     |  : 490/1023 [00:12<00:15,   34.22it/s]
 48%|####8     |  : 492/1023 [00:13<00:15,   34.95it/s]
 48%|####8     |  : 493/1023 [00:13<00:15,   34.64it/s]
 48%|####8     |  : 494/1023 [00:13<00:15,   34.34it/s]
 48%|####8     |  : 495/1023 [00:13<00:15,   34.06it/s]
 49%|####8     |  : 497/1023 [00:13<00:15,   34.80it/s]
 49%|####8     |  : 498/1023 [00:13<00:15,   34.50it/s]
 49%|####8     |  : 499/1023 [00:13<00:15,   34.21it/s]
 49%|####8     |  : 501/1023 [00:13<00:14,   34.95it/s]
 49%|####9     |  : 502/1023 [00:13<00:15,   34.64it/s]
 49%|####9     |  : 503/1023 [00:13<00:15,   34.34it/s]
 49%|####9     |  : 504/1023 [00:13<00:15,   34.07it/s]
 49%|####9     |  : 506/1023 [00:13<00:14,   34.81it/s]
 50%|####9     |  : 507/1023 [00:13<00:14,   34.50it/s]
 50%|####9     |  : 508/1023 [00:13<00:15,   34.21it/s]
 50%|####9     |  : 510/1023 [00:13<00:14,   34.95it/s]
 50%|####9     |  : 511/1023 [00:13<00:14,   34.63it/s]
 50%|#####     |  : 512/1023 [00:13<00:14,   34.34it/s]
 50%|#####     |  : 513/1023 [00:13<00:14,   34.07it/s]
 50%|#####     |  : 515/1023 [00:13<00:14,   34.80it/s]
 50%|#####     |  : 516/1023 [00:13<00:14,   34.50it/s]
 51%|#####     |  : 517/1023 [00:13<00:14,   34.21it/s]
 51%|#####     |  : 518/1023 [00:13<00:14,   33.94it/s]
 51%|#####     |  : 520/1023 [00:13<00:14,   34.68it/s]
 51%|#####     |  : 521/1023 [00:13<00:14,   34.38it/s]
 51%|#####1    |  : 522/1023 [00:13<00:14,   34.10it/s]
 51%|#####1    |  : 524/1023 [00:13<00:14,   34.84it/s]
 51%|#####1    |  : 525/1023 [00:13<00:14,   34.52it/s]
 51%|#####1    |  : 526/1023 [00:13<00:14,   34.23it/s]
 52%|#####1    |  : 527/1023 [00:13<00:14,   33.95it/s]
 52%|#####1    |  : 529/1023 [00:14<00:14,   34.69it/s]
 52%|#####1    |  : 530/1023 [00:14<00:14,   34.39it/s]
 52%|#####1    |  : 531/1023 [00:14<00:14,   34.10it/s]
 52%|#####2    |  : 533/1023 [00:14<00:14,   34.84it/s]
 52%|#####2    |  : 534/1023 [00:14<00:14,   34.53it/s]
 52%|#####2    |  : 535/1023 [00:14<00:14,   34.23it/s]
 52%|#####2    |  : 536/1023 [00:14<00:14,   33.96it/s]
 53%|#####2    |  : 538/1023 [00:14<00:13,   34.69it/s]
 53%|#####2    |  : 539/1023 [00:14<00:14,   34.39it/s]
 53%|#####2    |  : 540/1023 [00:14<00:14,   34.11it/s]
 53%|#####2    |  : 542/1023 [00:14<00:13,   34.84it/s]
 53%|#####3    |  : 543/1023 [00:14<00:13,   34.53it/s]
 53%|#####3    |  : 544/1023 [00:14<00:13,   34.25it/s]
 53%|#####3    |  : 546/1023 [00:14<00:13,   34.98it/s]
 53%|#####3    |  : 547/1023 [00:14<00:13,   34.66it/s]
 54%|#####3    |  : 548/1023 [00:14<00:13,   34.36it/s]
 54%|#####3    |  : 549/1023 [00:14<00:13,   34.08it/s]
 54%|#####3    |  : 551/1023 [00:14<00:13,   34.82it/s]
 54%|#####3    |  : 552/1023 [00:14<00:13,   34.51it/s]
 54%|#####4    |  : 553/1023 [00:14<00:13,   34.23it/s]
 54%|#####4    |  : 555/1023 [00:14<00:13,   34.96it/s]
 54%|#####4    |  : 556/1023 [00:14<00:13,   34.64it/s]
 54%|#####4    |  : 557/1023 [00:14<00:13,   34.35it/s]
 55%|#####4    |  : 558/1023 [00:14<00:13,   34.06it/s]
 55%|#####4    |  : 560/1023 [00:14<00:13,   34.80it/s]
 55%|#####4    |  : 561/1023 [00:14<00:13,   34.49it/s]
 55%|#####4    |  : 562/1023 [00:14<00:13,   34.20it/s]
 55%|#####5    |  : 564/1023 [00:14<00:13,   34.93it/s]
 55%|#####5    |  : 565/1023 [00:14<00:13,   34.61it/s]
 55%|#####5    |  : 566/1023 [00:14<00:13,   34.32it/s]
 55%|#####5    |  : 567/1023 [00:15<00:13,   34.04it/s]
 56%|#####5    |  : 569/1023 [00:15<00:13,   34.77it/s]
 56%|#####5    |  : 570/1023 [00:15<00:13,   34.46it/s]
 56%|#####5    |  : 571/1023 [00:15<00:13,   34.17it/s]
 56%|#####5    |  : 572/1023 [00:15<00:13,   33.90it/s]
 56%|#####6    |  : 574/1023 [00:15<00:12,   34.64it/s]
 56%|#####6    |  : 575/1023 [00:15<00:13,   34.35it/s]
 56%|#####6    |  : 576/1023 [00:15<00:13,   34.07it/s]
 57%|#####6    |  : 578/1023 [00:15<00:12,   34.81it/s]
 57%|#####6    |  : 579/1023 [00:15<00:12,   34.51it/s]
 57%|#####6    |  : 580/1023 [00:15<00:12,   34.21it/s]
 57%|#####6    |  : 581/1023 [00:15<00:13,   33.95it/s]
 57%|#####6    |  : 583/1023 [00:15<00:12,   34.69it/s]
 57%|#####7    |  : 584/1023 [00:15<00:12,   34.39it/s]
 57%|#####7    |  : 585/1023 [00:15<00:12,   34.11it/s]
 57%|#####7    |  : 586/1023 [00:15<00:12,   33.85it/s]
 57%|#####7    |  : 588/1023 [00:15<00:12,   34.59it/s]
 58%|#####7    |  : 589/1023 [00:15<00:12,   34.30it/s]
 58%|#####7    |  : 590/1023 [00:15<00:12,   34.02it/s]
 58%|#####7    |  : 592/1023 [00:15<00:12,   34.76it/s]
 58%|#####7    |  : 593/1023 [00:15<00:12,   34.46it/s]
 58%|#####8    |  : 594/1023 [00:15<00:12,   34.18it/s]
 58%|#####8    |  : 595/1023 [00:15<00:12,   33.91it/s]
 58%|#####8    |  : 597/1023 [00:15<00:12,   34.65it/s]
 58%|#####8    |  : 598/1023 [00:15<00:12,   34.35it/s]
 59%|#####8    |  : 599/1023 [00:15<00:12,   34.08it/s]
 59%|#####8    |  : 600/1023 [00:15<00:12,   33.81it/s]
 59%|#####8    |  : 602/1023 [00:15<00:12,   34.55it/s]
 59%|#####8    |  : 603/1023 [00:15<00:12,   34.26it/s]
 59%|#####9    |  : 604/1023 [00:16<00:12,   33.99it/s]
 59%|#####9    |  : 606/1023 [00:16<00:12,   34.72it/s]
 59%|#####9    |  : 607/1023 [00:16<00:12,   34.42it/s]
 59%|#####9    |  : 608/1023 [00:16<00:12,   34.14it/s]
 60%|#####9    |  : 609/1023 [00:16<00:12,   33.87it/s]
 60%|#####9    |  : 611/1023 [00:16<00:11,   34.61it/s]
 60%|#####9    |  : 612/1023 [00:16<00:11,   34.32it/s]
 60%|#####9    |  : 613/1023 [00:16<00:12,   34.05it/s]
 60%|######    |  : 615/1023 [00:16<00:11,   34.78it/s]
 60%|######    |  : 616/1023 [00:16<00:11,   34.48it/s]
 60%|######    |  : 617/1023 [00:16<00:11,   34.20it/s]
 60%|######    |  : 618/1023 [00:16<00:11,   33.93it/s]
 61%|######    |  : 620/1023 [00:16<00:11,   34.67it/s]
 61%|######    |  : 621/1023 [00:16<00:11,   34.37it/s]
 61%|######    |  : 622/1023 [00:16<00:11,   34.10it/s]
 61%|######    |  : 624/1023 [00:16<00:11,   34.83it/s]
 61%|######1   |  : 625/1023 [00:16<00:11,   34.52it/s]
 61%|######1   |  : 626/1023 [00:16<00:11,   34.24it/s]
 61%|######1   |  : 627/1023 [00:16<00:11,   33.97it/s]
 61%|######1   |  : 629/1023 [00:16<00:11,   34.71it/s]
 62%|######1   |  : 630/1023 [00:16<00:11,   34.41it/s]
 62%|######1   |  : 631/1023 [00:16<00:11,   34.13it/s]
 62%|######1   |  : 632/1023 [00:16<00:11,   33.87it/s]
 62%|######1   |  : 634/1023 [00:16<00:11,   34.61it/s]
 62%|######2   |  : 635/1023 [00:16<00:11,   34.21it/s]
 62%|######2   |  : 636/1023 [00:16<00:11,   33.94it/s]
 62%|######2   |  : 638/1023 [00:16<00:11,   34.68it/s]
 62%|######2   |  : 639/1023 [00:16<00:11,   34.38it/s]
 63%|######2   |  : 640/1023 [00:16<00:11,   34.11it/s]
 63%|######2   |  : 641/1023 [00:16<00:11,   33.84it/s]
 63%|######2   |  : 643/1023 [00:17<00:10,   34.58it/s]
 63%|######2   |  : 644/1023 [00:17<00:11,   34.29it/s]
 63%|######3   |  : 645/1023 [00:17<00:11,   34.02it/s]
 63%|######3   |  : 647/1023 [00:17<00:10,   34.76it/s]
 63%|######3   |  : 648/1023 [00:17<00:10,   34.46it/s]
 63%|######3   |  : 649/1023 [00:17<00:10,   34.18it/s]
 64%|######3   |  : 650/1023 [00:17<00:11,   33.91it/s]
 64%|######3   |  : 652/1023 [00:17<00:10,   34.65it/s]
 64%|######3   |  : 653/1023 [00:17<00:10,   34.35it/s]
 64%|######3   |  : 654/1023 [00:17<00:10,   34.08it/s]
 64%|######4   |  : 655/1023 [00:17<00:10,   33.82it/s]
 64%|######4   |  : 657/1023 [00:17<00:10,   34.56it/s]
 64%|######4   |  : 658/1023 [00:17<00:10,   34.27it/s]
 64%|######4   |  : 659/1023 [00:17<00:10,   33.99it/s]
 65%|######4   |  : 660/1023 [00:17<00:10,   33.74it/s]
 65%|######4   |  : 662/1023 [00:17<00:10,   34.48it/s]
 65%|######4   |  : 663/1023 [00:17<00:10,   34.19it/s]
 65%|######4   |  : 664/1023 [00:17<00:10,   33.92it/s]
 65%|######5   |  : 666/1023 [00:17<00:10,   34.66it/s]
 65%|######5   |  : 667/1023 [00:17<00:10,   34.37it/s]
 65%|######5   |  : 668/1023 [00:17<00:10,   34.09it/s]
 65%|######5   |  : 669/1023 [00:17<00:10,   33.83it/s]
 66%|######5   |  : 671/1023 [00:17<00:10,   34.57it/s]
 66%|######5   |  : 672/1023 [00:17<00:10,   34.28it/s]
 66%|######5   |  : 673/1023 [00:17<00:10,   34.01it/s]
 66%|######5   |  : 675/1023 [00:17<00:10,   34.75it/s]
 66%|######6   |  : 676/1023 [00:17<00:10,   34.44it/s]
 66%|######6   |  : 677/1023 [00:17<00:10,   34.16it/s]
 66%|######6   |  : 678/1023 [00:17<00:10,   33.90it/s]
 66%|######6   |  : 680/1023 [00:18<00:09,   34.64it/s]
 67%|######6   |  : 681/1023 [00:18<00:09,   34.34it/s]
 67%|######6   |  : 682/1023 [00:18<00:10,   34.07it/s]
 67%|######6   |  : 683/1023 [00:18<00:10,   33.81it/s]
 67%|######6   |  : 685/1023 [00:18<00:09,   34.55it/s]
 67%|######7   |  : 686/1023 [00:18<00:09,   34.25it/s]
 67%|######7   |  : 687/1023 [00:18<00:09,   33.99it/s]
 67%|######7   |  : 689/1023 [00:18<00:09,   34.72it/s]
 67%|######7   |  : 690/1023 [00:18<00:09,   34.43it/s]
 68%|######7   |  : 691/1023 [00:18<00:09,   34.15it/s]
 68%|######7   |  : 692/1023 [00:18<00:09,   33.89it/s]
 68%|######7   |  : 694/1023 [00:18<00:09,   34.63it/s]
 68%|######7   |  : 695/1023 [00:18<00:09,   34.33it/s]
 68%|######8   |  : 696/1023 [00:18<00:09,   34.06it/s]
 68%|######8   |  : 698/1023 [00:18<00:09,   34.80it/s]
 68%|######8   |  : 699/1023 [00:18<00:09,   34.49it/s]
 68%|######8   |  : 700/1023 [00:18<00:09,   34.21it/s]
 69%|######8   |  : 701/1023 [00:18<00:09,   33.94it/s]
 69%|######8   |  : 703/1023 [00:18<00:09,   34.68it/s]
 69%|######8   |  : 704/1023 [00:18<00:09,   34.38it/s]
 69%|######8   |  : 705/1023 [00:18<00:09,   34.10it/s]
 69%|######9   |  : 707/1023 [00:18<00:09,   34.84it/s]
 69%|######9   |  : 708/1023 [00:18<00:09,   34.53it/s]
 69%|######9   |  : 709/1023 [00:18<00:09,   34.24it/s]
 69%|######9   |  : 710/1023 [00:18<00:09,   33.97it/s]
 70%|######9   |  : 712/1023 [00:18<00:08,   34.70it/s]
 70%|######9   |  : 713/1023 [00:18<00:09,   34.40it/s]
 70%|######9   |  : 714/1023 [00:18<00:09,   34.12it/s]
 70%|######9   |  : 716/1023 [00:18<00:08,   34.86it/s]
 70%|#######   |  : 717/1023 [00:18<00:08,   34.55it/s]
 70%|#######   |  : 718/1023 [00:19<00:08,   34.26it/s]
 70%|#######   |  : 719/1023 [00:19<00:08,   33.99it/s]
 70%|#######   |  : 721/1023 [00:19<00:08,   34.73it/s]
 71%|#######   |  : 722/1023 [00:19<00:08,   34.43it/s]
 71%|#######   |  : 723/1023 [00:19<00:08,   34.15it/s]
 71%|#######   |  : 725/1023 [00:19<00:08,   34.89it/s]
 71%|#######   |  : 726/1023 [00:19<00:08,   34.57it/s]
 71%|#######1  |  : 727/1023 [00:19<00:08,   34.28it/s]
 71%|#######1  |  : 728/1023 [00:19<00:08,   34.01it/s]
 71%|#######1  |  : 730/1023 [00:19<00:08,   34.74it/s]
 71%|#######1  |  : 731/1023 [00:19<00:08,   34.44it/s]
 72%|#######1  |  : 732/1023 [00:19<00:08,   34.16it/s]
 72%|#######1  |  : 733/1023 [00:19<00:08,   33.89it/s]
 72%|#######1  |  : 735/1023 [00:19<00:08,   34.63it/s]
 72%|#######1  |  : 736/1023 [00:19<00:08,   34.34it/s]
 72%|#######2  |  : 737/1023 [00:19<00:08,   34.06it/s]
 72%|#######2  |  : 739/1023 [00:19<00:08,   34.80it/s]
 72%|#######2  |  : 740/1023 [00:19<00:08,   34.49it/s]
 72%|#######2  |  : 741/1023 [00:19<00:08,   34.20it/s]
 73%|#######2  |  : 742/1023 [00:19<00:08,   33.94it/s]
 73%|#######2  |  : 744/1023 [00:19<00:08,   34.68it/s]
 73%|#######2  |  : 745/1023 [00:19<00:08,   34.38it/s]
 73%|#######2  |  : 746/1023 [00:19<00:08,   34.10it/s]
 73%|#######3  |  : 748/1023 [00:19<00:07,   34.83it/s]
 73%|#######3  |  : 749/1023 [00:19<00:07,   34.52it/s]
 73%|#######3  |  : 750/1023 [00:19<00:07,   34.24it/s]
 73%|#######3  |  : 751/1023 [00:19<00:08,   33.97it/s]
 74%|#######3  |  : 753/1023 [00:19<00:07,   34.70it/s]
 74%|#######3  |  : 754/1023 [00:19<00:07,   34.40it/s]
 74%|#######3  |  : 755/1023 [00:20<00:07,   34.12it/s]
 74%|#######3  |  : 757/1023 [00:20<00:07,   34.86it/s]
 74%|#######4  |  : 758/1023 [00:20<00:07,   34.56it/s]
 74%|#######4  |  : 759/1023 [00:20<00:07,   34.27it/s]
 74%|#######4  |  : 760/1023 [00:20<00:07,   34.00it/s]
 74%|#######4  |  : 762/1023 [00:20<00:07,   34.74it/s]
 75%|#######4  |  : 763/1023 [00:20<00:07,   34.44it/s]
 75%|#######4  |  : 764/1023 [00:20<00:07,   34.16it/s]
 75%|#######4  |  : 765/1023 [00:20<00:07,   33.89it/s]
 75%|#######4  |  : 767/1023 [00:20<00:07,   34.63it/s]
 75%|#######5  |  : 768/1023 [00:20<00:07,   34.33it/s]
 75%|#######5  |  : 769/1023 [00:20<00:07,   34.06it/s]
 75%|#######5  |  : 771/1023 [00:20<00:07,   34.80it/s]
 75%|#######5  |  : 772/1023 [00:20<00:07,   34.49it/s]
 76%|#######5  |  : 773/1023 [00:20<00:07,   34.20it/s]
 76%|#######5  |  : 774/1023 [00:20<00:07,   33.94it/s]
 76%|#######5  |  : 776/1023 [00:20<00:07,   34.68it/s]
 76%|#######5  |  : 777/1023 [00:20<00:07,   34.38it/s]
 76%|#######6  |  : 778/1023 [00:20<00:07,   34.10it/s]
 76%|#######6  |  : 780/1023 [00:20<00:06,   34.84it/s]
 76%|#######6  |  : 781/1023 [00:20<00:07,   34.53it/s]
 76%|#######6  |  : 782/1023 [00:20<00:07,   34.25it/s]
 77%|#######6  |  : 783/1023 [00:20<00:07,   33.98it/s]
 77%|#######6  |  : 785/1023 [00:20<00:06,   34.72it/s]
 77%|#######6  |  : 786/1023 [00:20<00:06,   34.41it/s]
 77%|#######6  |  : 787/1023 [00:20<00:06,   34.14it/s]
 77%|#######7  |  : 789/1023 [00:20<00:06,   34.87it/s]
 77%|#######7  |  : 790/1023 [00:20<00:06,   34.56it/s]
 77%|#######7  |  : 791/1023 [00:20<00:06,   34.27it/s]
 77%|#######7  |  : 792/1023 [00:20<00:06,   34.00it/s]
 78%|#######7  |  : 794/1023 [00:21<00:06,   34.74it/s]
 78%|#######7  |  : 795/1023 [00:21<00:06,   34.44it/s]
 78%|#######7  |  : 796/1023 [00:21<00:06,   34.15it/s]
 78%|#######8  |  : 798/1023 [00:21<00:06,   34.89it/s]
 78%|#######8  |  : 799/1023 [00:21<00:06,   34.58it/s]
 78%|#######8  |  : 800/1023 [00:21<00:06,   34.29it/s]
 78%|#######8  |  : 801/1023 [00:21<00:06,   34.02it/s]
 78%|#######8  |  : 803/1023 [00:21<00:06,   34.76it/s]
 79%|#######8  |  : 804/1023 [00:21<00:06,   34.45it/s]
 79%|#######8  |  : 805/1023 [00:21<00:06,   34.17it/s]
 79%|#######8  |  : 807/1023 [00:21<00:06,   34.91it/s]
 79%|#######8  |  : 808/1023 [00:21<00:06,   34.60it/s]
 79%|#######9  |  : 809/1023 [00:21<00:06,   34.31it/s]
 79%|#######9  |  : 810/1023 [00:21<00:06,   34.03it/s]
 79%|#######9  |  : 812/1023 [00:21<00:06,   34.77it/s]
 79%|#######9  |  : 813/1023 [00:21<00:06,   34.47it/s]
 80%|#######9  |  : 814/1023 [00:21<00:06,   34.18it/s]
 80%|#######9  |  : 816/1023 [00:21<00:05,   34.92it/s]
 80%|#######9  |  : 817/1023 [00:21<00:05,   34.60it/s]
 80%|#######9  |  : 818/1023 [00:21<00:05,   34.31it/s]
 80%|########  |  : 819/1023 [00:21<00:05,   34.04it/s]
 80%|########  |  : 821/1023 [00:21<00:05,   34.78it/s]
 80%|########  |  : 822/1023 [00:21<00:05,   34.48it/s]
 80%|########  |  : 823/1023 [00:21<00:05,   34.19it/s]
 81%|########  |  : 824/1023 [00:21<00:05,   33.91it/s]
 81%|########  |  : 826/1023 [00:21<00:05,   34.65it/s]
 81%|########  |  : 827/1023 [00:21<00:05,   34.36it/s]
 81%|########  |  : 828/1023 [00:21<00:05,   34.08it/s]
 81%|########1 |  : 830/1023 [00:21<00:05,   34.82it/s]
 81%|########1 |  : 831/1023 [00:21<00:05,   34.51it/s]
 81%|########1 |  : 832/1023 [00:22<00:05,   34.23it/s]
 81%|########1 |  : 833/1023 [00:22<00:05,   33.96it/s]
 82%|########1 |  : 834/1023 [00:22<00:05,   33.71it/s]
 82%|########1 |  : 835/1023 [00:22<00:05,   33.48it/s]
 82%|########1 |  : 837/1023 [00:22<00:05,   34.22it/s]
 82%|########1 |  : 838/1023 [00:22<00:05,   33.95it/s]
 82%|########2 |  : 839/1023 [00:22<00:05,   33.70it/s]
 82%|########2 |  : 840/1023 [00:22<00:05,   33.46it/s]
 82%|########2 |  : 842/1023 [00:22<00:05,   34.21it/s]
 82%|########2 |  : 843/1023 [00:22<00:05,   33.94it/s]
 83%|########2 |  : 844/1023 [00:22<00:05,   33.69it/s]
 83%|########2 |  : 845/1023 [00:22<00:05,   33.45it/s]
 83%|########2 |  : 847/1023 [00:22<00:05,   34.19it/s]
 83%|########2 |  : 848/1023 [00:22<00:05,   33.93it/s]
 83%|########2 |  : 849/1023 [00:22<00:05,   33.68it/s]
 83%|########3 |  : 850/1023 [00:22<00:05,   33.45it/s]
 83%|########3 |  : 852/1023 [00:22<00:05,   34.19it/s]
 83%|########3 |  : 853/1023 [00:22<00:05,   33.92it/s]
 83%|########3 |  : 854/1023 [00:22<00:05,   33.67it/s]
 84%|########3 |  : 855/1023 [00:22<00:05,   33.44it/s]
 84%|########3 |  : 856/1023 [00:22<00:05,   33.22it/s]
 84%|########3 |  : 858/1023 [00:22<00:04,   33.96it/s]
 84%|########3 |  : 859/1023 [00:22<00:04,   33.71it/s]
 84%|########4 |  : 860/1023 [00:22<00:04,   33.48it/s]
 84%|########4 |  : 861/1023 [00:22<00:04,   33.26it/s]
 84%|########4 |  : 863/1023 [00:22<00:04,   34.01it/s]
 84%|########4 |  : 864/1023 [00:22<00:04,   33.75it/s]
 85%|########4 |  : 865/1023 [00:22<00:04,   33.51it/s]
 85%|########4 |  : 866/1023 [00:22<00:04,   33.28it/s]
 85%|########4 |  : 868/1023 [00:23<00:04,   34.03it/s]
 85%|########4 |  : 869/1023 [00:23<00:04,   33.77it/s]
 85%|########5 |  : 870/1023 [00:23<00:04,   33.54it/s]
 85%|########5 |  : 871/1023 [00:23<00:04,   33.31it/s]
 85%|########5 |  : 872/1023 [00:23<00:04,   33.10it/s]
 85%|########5 |  : 874/1023 [00:23<00:04,   33.85it/s]
 86%|########5 |  : 875/1023 [00:23<00:04,   33.61it/s]
 86%|########5 |  : 876/1023 [00:23<00:04,   33.37it/s]
 86%|########5 |  : 878/1023 [00:23<00:04,   34.12it/s]
 86%|########5 |  : 879/1023 [00:23<00:04,   33.86it/s]
 86%|########6 |  : 880/1023 [00:23<00:04,   33.61it/s]
 86%|########6 |  : 881/1023 [00:23<00:04,   33.39it/s]
 86%|########6 |  : 883/1023 [00:23<00:04,   34.13it/s]
 86%|########6 |  : 884/1023 [00:23<00:04,   33.87it/s]
 87%|########6 |  : 885/1023 [00:23<00:04,   33.62it/s]
 87%|########6 |  : 886/1023 [00:23<00:04,   33.40it/s]
 87%|########6 |  : 888/1023 [00:23<00:03,   34.14it/s]
 87%|########6 |  : 889/1023 [00:23<00:03,   33.86it/s]
 87%|########6 |  : 890/1023 [00:23<00:03,   33.62it/s]
 87%|########7 |  : 891/1023 [00:23<00:03,   33.39it/s]
 87%|########7 |  : 893/1023 [00:23<00:03,   34.13it/s]
 87%|########7 |  : 894/1023 [00:23<00:03,   33.87it/s]
 87%|########7 |  : 895/1023 [00:23<00:03,   33.62it/s]
 88%|########7 |  : 896/1023 [00:23<00:03,   33.39it/s]
 88%|########7 |  : 898/1023 [00:23<00:03,   34.13it/s]
 88%|########7 |  : 899/1023 [00:23<00:03,   33.87it/s]
 88%|########7 |  : 900/1023 [00:23<00:03,   33.63it/s]
 88%|########8 |  : 901/1023 [00:23<00:03,   33.40it/s]
 88%|########8 |  : 903/1023 [00:23<00:03,   34.14it/s]
 88%|########8 |  : 904/1023 [00:23<00:03,   33.88it/s]
 88%|########8 |  : 905/1023 [00:24<00:03,   33.63it/s]
 89%|########8 |  : 907/1023 [00:24<00:03,   34.38it/s]
 89%|########8 |  : 908/1023 [00:24<00:03,   34.10it/s]
 89%|########8 |  : 909/1023 [00:24<00:03,   33.84it/s]
 89%|########8 |  : 910/1023 [00:24<00:03,   33.59it/s]
 89%|########9 |  : 912/1023 [00:24<00:03,   34.34it/s]
 89%|########9 |  : 913/1023 [00:24<00:03,   34.06it/s]
 89%|########9 |  : 914/1023 [00:24<00:03,   33.80it/s]
 89%|########9 |  : 915/1023 [00:24<00:03,   33.56it/s]
 90%|########9 |  : 917/1023 [00:24<00:03,   34.31it/s]
 90%|########9 |  : 918/1023 [00:24<00:03,   34.04it/s]
 90%|########9 |  : 919/1023 [00:24<00:03,   33.78it/s]
 90%|########9 |  : 920/1023 [00:24<00:03,   33.54it/s]
 90%|######### |  : 922/1023 [00:24<00:02,   34.28it/s]
 90%|######### |  : 923/1023 [00:24<00:02,   34.01it/s]
 90%|######### |  : 924/1023 [00:24<00:02,   33.76it/s]
 90%|######### |  : 925/1023 [00:24<00:02,   33.52it/s]
 91%|######### |  : 927/1023 [00:24<00:02,   34.26it/s]
 91%|######### |  : 928/1023 [00:24<00:02,   34.00it/s]
 91%|######### |  : 929/1023 [00:24<00:02,   33.74it/s]
 91%|######### |  : 930/1023 [00:24<00:02,   33.51it/s]
 91%|#########1|  : 932/1023 [00:24<00:02,   34.25it/s]
 91%|#########1|  : 933/1023 [00:24<00:02,   33.98it/s]
 91%|#########1|  : 934/1023 [00:24<00:02,   33.73it/s]
 91%|#########1|  : 936/1023 [00:24<00:02,   34.47it/s]
 92%|#########1|  : 937/1023 [00:24<00:02,   34.18it/s]
 92%|#########1|  : 938/1023 [00:24<00:02,   33.92it/s]
 92%|#########1|  : 939/1023 [00:24<00:02,   33.67it/s]
 92%|#########1|  : 941/1023 [00:24<00:02,   34.41it/s]
 92%|#########2|  : 942/1023 [00:25<00:02,   34.14it/s]
 92%|#########2|  : 943/1023 [00:25<00:02,   33.87it/s]
 92%|#########2|  : 944/1023 [00:25<00:02,   33.63it/s]
 92%|#########2|  : 946/1023 [00:25<00:02,   34.37it/s]
 93%|#########2|  : 947/1023 [00:25<00:02,   34.09it/s]
 93%|#########2|  : 948/1023 [00:25<00:02,   33.83it/s]
 93%|#########2|  : 949/1023 [00:25<00:02,   33.59it/s]
 93%|#########2|  : 951/1023 [00:25<00:02,   34.33it/s]
 93%|#########3|  : 952/1023 [00:25<00:02,   34.05it/s]
 93%|#########3|  : 953/1023 [00:25<00:02,   33.79it/s]
 93%|#########3|  : 954/1023 [00:25<00:02,   33.55it/s]
 93%|#########3|  : 956/1023 [00:25<00:01,   34.30it/s]
 94%|#########3|  : 957/1023 [00:25<00:01,   34.02it/s]
 94%|#########3|  : 958/1023 [00:25<00:01,   33.76it/s]
 94%|#########3|  : 959/1023 [00:25<00:01,   33.52it/s]
 94%|#########3|  : 961/1023 [00:25<00:01,   34.27it/s]
 94%|#########4|  : 962/1023 [00:25<00:01,   33.99it/s]
 94%|#########4|  : 963/1023 [00:25<00:01,   33.74it/s]
 94%|#########4|  : 965/1023 [00:25<00:01,   34.48it/s]
 94%|#########4|  : 966/1023 [00:25<00:01,   34.19it/s]
 95%|#########4|  : 967/1023 [00:25<00:01,   33.92it/s]
 95%|#########4|  : 968/1023 [00:25<00:01,   33.68it/s]
 95%|#########4|  : 970/1023 [00:25<00:01,   34.42it/s]
 95%|#########4|  : 971/1023 [00:25<00:01,   34.14it/s]
 95%|#########5|  : 972/1023 [00:25<00:01,   33.88it/s]
 95%|#########5|  : 973/1023 [00:25<00:01,   33.64it/s]
 95%|#########5|  : 975/1023 [00:25<00:01,   34.38it/s]
 95%|#########5|  : 976/1023 [00:25<00:01,   34.10it/s]
 96%|#########5|  : 977/1023 [00:25<00:01,   33.84it/s]
 96%|#########5|  : 978/1023 [00:25<00:01,   33.60it/s]
 96%|#########5|  : 980/1023 [00:26<00:01,   34.34it/s]
 96%|#########5|  : 981/1023 [00:26<00:01,   34.06it/s]
 96%|#########5|  : 982/1023 [00:26<00:01,   33.80it/s]
 96%|#########6|  : 983/1023 [00:26<00:01,   33.56it/s]
 96%|#########6|  : 985/1023 [00:26<00:01,   34.30it/s]
 96%|#########6|  : 986/1023 [00:26<00:01,   34.03it/s]
 96%|#########6|  : 987/1023 [00:26<00:01,   33.78it/s]
 97%|#########6|  : 988/1023 [00:26<00:01,   33.54it/s]
 97%|#########6|  : 990/1023 [00:26<00:00,   34.28it/s]
 97%|#########6|  : 991/1023 [00:26<00:00,   34.01it/s]
 97%|#########6|  : 992/1023 [00:26<00:00,   33.76it/s]
 97%|#########7|  : 993/1023 [00:26<00:00,   33.52it/s]
 97%|#########7|  : 994/1023 [00:26<00:00,   33.29it/s]
 97%|#########7|  : 996/1023 [00:26<00:00,   34.04it/s]
 97%|#########7|  : 997/1023 [00:26<00:00,   33.78it/s]
 98%|#########7|  : 998/1023 [00:26<00:00,   33.54it/s]
 98%|#########7|  : 999/1023 [00:26<00:00,   33.32it/s]
 98%|#########7|  : 1001/1023 [00:26<00:00,   34.06it/s]
 98%|#########7|  : 1002/1023 [00:26<00:00,   33.81it/s]
 98%|#########8|  : 1003/1023 [00:26<00:00,   33.57it/s]
 98%|#########8|  : 1004/1023 [00:26<00:00,   33.34it/s]
 98%|#########8|  : 1005/1023 [00:26<00:00,   33.13it/s]
 98%|#########8|  : 1006/1023 [00:26<00:00,   32.93it/s]
 99%|#########8|  : 1008/1023 [00:26<00:00,   33.68it/s]
 99%|#########8|  : 1009/1023 [00:26<00:00,   33.44it/s]
 99%|#########8|  : 1010/1023 [00:26<00:00,   33.22it/s]
 99%|#########8|  : 1011/1023 [00:26<00:00,   33.01it/s]
 99%|#########8|  : 1012/1023 [00:26<00:00,   32.82it/s]
 99%|#########9|  : 1014/1023 [00:26<00:00,   33.57it/s]
 99%|#########9|  : 1015/1023 [00:27<00:00,   33.34it/s]
 99%|#########9|  : 1016/1023 [00:27<00:00,   33.13it/s]
 99%|#########9|  : 1017/1023 [00:27<00:00,   32.93it/s]
100%|#########9|  : 1019/1023 [00:27<00:00,   33.68it/s]
100%|#########9|  : 1020/1023 [00:27<00:00,   33.44it/s]
100%|#########9|  : 1021/1023 [00:27<00:00,   33.22it/s]
100%|#########9|  : 1022/1023 [00:27<00:00,   33.02it/s]
100%|##########|  : 1023/1023 [00:27<00:00,   37.59it/s]
Computing cluster p-values
Done.

Visualize the clusters

print('Visualizing clusters.')

#    Now let's build a convenient representation of each cluster, where each
#    cluster becomes a "time point" in the SourceEstimate
fsave_vertices = [np.arange(10242), np.arange(10242)]
stc_all_cluster_vis = summarize_clusters_stc(clu, tstep=tstep,
                                             vertices=fsave_vertices,
                                             subject='fsaverage')

#    Let's actually plot the first "time point" in the SourceEstimate, which
#    shows all the clusters, weighted by duration
subjects_dir = op.join(data_path, 'subjects')
# blue blobs are for condition A != condition B
brain = stc_all_cluster_vis.plot('fsaverage', hemi='both',
                                 views='lateral', subjects_dir=subjects_dir,
                                 time_label='temporal extent (ms)',
                                 clim=dict(kind='value', lims=[0, 1, 40]))
plot stats cluster spatio temporal 2samp

Out:

Visualizing clusters.

Total running time of the script: ( 0 minutes 44.146 seconds)

Estimated memory usage: 62 MB

Gallery generated by Sphinx-Gallery