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%|          |  : 1/1023 [00:00<01:09,   14.78it/s]
  0%|          |  : 3/1023 [00:00<00:33,   30.01it/s]
  0%|          |  : 4/1023 [00:00<00:34,   29.90it/s]
  1%|          |  : 6/1023 [00:00<00:28,   36.28it/s]
  1%|          |  : 7/1023 [00:00<00:29,   35.03it/s]
  1%|          |  : 8/1023 [00:00<00:29,   34.13it/s]
  1%|          |  : 10/1023 [00:00<00:26,   37.81it/s]
  1%|1         |  : 11/1023 [00:00<00:27,   36.70it/s]
  1%|1         |  : 13/1023 [00:00<00:25,   39.49it/s]
  1%|1         |  : 14/1023 [00:00<00:26,   38.34it/s]
  1%|1         |  : 15/1023 [00:00<00:26,   37.38it/s]
  2%|1         |  : 17/1023 [00:00<00:25,   39.61it/s]
  2%|1         |  : 18/1023 [00:00<00:26,   38.63it/s]
  2%|1         |  : 20/1023 [00:00<00:24,   40.53it/s]
  2%|2         |  : 21/1023 [00:00<00:25,   39.55it/s]
  2%|2         |  : 23/1023 [00:00<00:24,   41.23it/s]
  2%|2         |  : 24/1023 [00:00<00:24,   40.27it/s]
  2%|2         |  : 25/1023 [00:00<00:25,   39.41it/s]
  3%|2         |  : 27/1023 [00:00<00:24,   40.94it/s]
  3%|2         |  : 28/1023 [00:00<00:24,   40.08it/s]
  3%|2         |  : 30/1023 [00:00<00:23,   41.48it/s]
  3%|3         |  : 31/1023 [00:00<00:24,   40.63it/s]
  3%|3         |  : 32/1023 [00:00<00:24,   39.85it/s]
  3%|3         |  : 34/1023 [00:00<00:24,   41.18it/s]
  3%|3         |  : 35/1023 [00:00<00:24,   40.39it/s]
  4%|3         |  : 37/1023 [00:00<00:23,   41.65it/s]
  4%|3         |  : 38/1023 [00:00<00:24,   40.86it/s]
  4%|3         |  : 39/1023 [00:00<00:24,   40.12it/s]
  4%|4         |  : 41/1023 [00:01<00:23,   41.33it/s]
  4%|4         |  : 42/1023 [00:01<00:24,   40.59it/s]
  4%|4         |  : 44/1023 [00:01<00:23,   41.74it/s]
  4%|4         |  : 45/1023 [00:01<00:23,   40.99it/s]
  5%|4         |  : 47/1023 [00:01<00:23,   42.08it/s]
  5%|4         |  : 48/1023 [00:01<00:23,   41.34it/s]
  5%|4         |  : 49/1023 [00:01<00:23,   40.64it/s]
  5%|4         |  : 51/1023 [00:01<00:23,   41.72it/s]
  5%|5         |  : 52/1023 [00:01<00:23,   41.02it/s]
  5%|5         |  : 54/1023 [00:01<00:23,   42.06it/s]
  5%|5         |  : 55/1023 [00:01<00:23,   41.35it/s]
  5%|5         |  : 56/1023 [00:01<00:23,   40.68it/s]
  6%|5         |  : 58/1023 [00:01<00:23,   41.72it/s]
  6%|5         |  : 59/1023 [00:01<00:23,   41.04it/s]
  6%|5         |  : 61/1023 [00:01<00:22,   42.05it/s]
  6%|6         |  : 62/1023 [00:01<00:23,   41.35it/s]
  6%|6         |  : 64/1023 [00:01<00:22,   42.34it/s]
  6%|6         |  : 65/1023 [00:01<00:23,   41.63it/s]
  6%|6         |  : 66/1023 [00:01<00:23,   40.97it/s]
  7%|6         |  : 68/1023 [00:01<00:22,   41.96it/s]
  7%|6         |  : 69/1023 [00:01<00:23,   41.28it/s]
  7%|6         |  : 71/1023 [00:01<00:22,   42.24it/s]
  7%|7         |  : 72/1023 [00:01<00:22,   41.56it/s]
  7%|7         |  : 73/1023 [00:01<00:23,   40.92it/s]
  7%|7         |  : 75/1023 [00:01<00:22,   41.89it/s]
  7%|7         |  : 76/1023 [00:01<00:22,   41.23it/s]
  8%|7         |  : 78/1023 [00:01<00:22,   42.18it/s]
  8%|7         |  : 79/1023 [00:01<00:22,   41.51it/s]
  8%|7         |  : 80/1023 [00:01<00:23,   40.88it/s]
  8%|8         |  : 82/1023 [00:01<00:22,   41.84it/s]
  8%|8         |  : 83/1023 [00:02<00:22,   41.19it/s]
  8%|8         |  : 85/1023 [00:02<00:22,   42.13it/s]
  8%|8         |  : 86/1023 [00:02<00:22,   41.48it/s]
  9%|8         |  : 88/1023 [00:02<00:22,   42.40it/s]
  9%|8         |  : 89/1023 [00:02<00:22,   41.73it/s]
  9%|8         |  : 90/1023 [00:02<00:22,   41.09it/s]
  9%|8         |  : 92/1023 [00:02<00:22,   42.03it/s]
  9%|9         |  : 93/1023 [00:02<00:22,   41.38it/s]
  9%|9         |  : 95/1023 [00:02<00:21,   42.29it/s]
  9%|9         |  : 96/1023 [00:02<00:22,   41.64it/s]
  9%|9         |  : 97/1023 [00:02<00:22,   41.01it/s]
 10%|9         |  : 99/1023 [00:02<00:22,   41.94it/s]
 10%|9         |  : 100/1023 [00:02<00:22,   41.31it/s]
 10%|9         |  : 102/1023 [00:02<00:21,   42.22it/s]
 10%|#         |  : 103/1023 [00:02<00:22,   41.57it/s]
 10%|#         |  : 104/1023 [00:02<00:22,   40.96it/s]
 10%|#         |  : 106/1023 [00:02<00:21,   41.89it/s]
 10%|#         |  : 107/1023 [00:02<00:22,   41.26it/s]
 11%|#         |  : 109/1023 [00:02<00:21,   42.17it/s]
 11%|#         |  : 110/1023 [00:02<00:21,   41.52it/s]
 11%|#         |  : 111/1023 [00:02<00:22,   40.91it/s]
 11%|#1        |  : 113/1023 [00:02<00:21,   41.83it/s]
 11%|#1        |  : 114/1023 [00:02<00:22,   41.21it/s]
 11%|#1        |  : 116/1023 [00:02<00:21,   42.12it/s]
 11%|#1        |  : 117/1023 [00:02<00:21,   41.48it/s]
 12%|#1        |  : 119/1023 [00:02<00:21,   42.37it/s]
 12%|#1        |  : 120/1023 [00:02<00:21,   41.73it/s]
 12%|#1        |  : 121/1023 [00:02<00:21,   41.12it/s]
 12%|#2        |  : 123/1023 [00:02<00:21,   42.03it/s]
 12%|#2        |  : 124/1023 [00:03<00:21,   41.41it/s]
 12%|#2        |  : 126/1023 [00:03<00:21,   42.31it/s]
 12%|#2        |  : 127/1023 [00:03<00:21,   41.67it/s]
 13%|#2        |  : 128/1023 [00:03<00:21,   41.05it/s]
 13%|#2        |  : 130/1023 [00:03<00:21,   41.96it/s]
 13%|#2        |  : 131/1023 [00:03<00:21,   41.34it/s]
 13%|#3        |  : 133/1023 [00:03<00:21,   42.23it/s]
 13%|#3        |  : 134/1023 [00:03<00:21,   41.60it/s]
 13%|#3        |  : 135/1023 [00:03<00:21,   40.98it/s]
 13%|#3        |  : 137/1023 [00:03<00:21,   41.90it/s]
 13%|#3        |  : 138/1023 [00:03<00:21,   41.27it/s]
 14%|#3        |  : 140/1023 [00:03<00:20,   42.17it/s]
 14%|#3        |  : 141/1023 [00:03<00:21,   41.54it/s]
 14%|#3        |  : 143/1023 [00:03<00:20,   42.42it/s]
 14%|#4        |  : 144/1023 [00:03<00:21,   41.77it/s]
 14%|#4        |  : 145/1023 [00:03<00:21,   41.16it/s]
 14%|#4        |  : 147/1023 [00:03<00:20,   42.06it/s]
 14%|#4        |  : 148/1023 [00:03<00:21,   41.43it/s]
 15%|#4        |  : 150/1023 [00:03<00:20,   42.32it/s]
 15%|#4        |  : 151/1023 [00:03<00:20,   41.68it/s]
 15%|#4        |  : 152/1023 [00:03<00:21,   41.07it/s]
 15%|#5        |  : 154/1023 [00:03<00:20,   41.97it/s]
 15%|#5        |  : 155/1023 [00:03<00:20,   41.35it/s]
 15%|#5        |  : 157/1023 [00:03<00:20,   42.24it/s]
 15%|#5        |  : 158/1023 [00:03<00:20,   41.60it/s]
 16%|#5        |  : 159/1023 [00:03<00:21,   41.00it/s]
 16%|#5        |  : 161/1023 [00:03<00:20,   41.90it/s]
 16%|#5        |  : 162/1023 [00:03<00:20,   41.28it/s]
 16%|#6        |  : 164/1023 [00:03<00:20,   42.17it/s]
 16%|#6        |  : 165/1023 [00:03<00:20,   41.54it/s]
 16%|#6        |  : 166/1023 [00:04<00:20,   40.94it/s]
 16%|#6        |  : 168/1023 [00:04<00:20,   41.85it/s]
 17%|#6        |  : 169/1023 [00:04<00:20,   41.23it/s]
 17%|#6        |  : 171/1023 [00:04<00:20,   42.13it/s]
 17%|#6        |  : 172/1023 [00:04<00:20,   41.50it/s]
 17%|#7        |  : 174/1023 [00:04<00:20,   42.38it/s]
 17%|#7        |  : 175/1023 [00:04<00:20,   41.74it/s]
 17%|#7        |  : 176/1023 [00:04<00:20,   41.14it/s]
 17%|#7        |  : 178/1023 [00:04<00:20,   42.04it/s]
 17%|#7        |  : 179/1023 [00:04<00:20,   41.41it/s]
 18%|#7        |  : 181/1023 [00:04<00:19,   42.30it/s]
 18%|#7        |  : 182/1023 [00:04<00:20,   41.66it/s]
 18%|#7        |  : 183/1023 [00:04<00:20,   41.06it/s]
 18%|#8        |  : 185/1023 [00:04<00:19,   41.96it/s]
 18%|#8        |  : 186/1023 [00:04<00:20,   41.34it/s]
 18%|#8        |  : 188/1023 [00:04<00:19,   42.23it/s]
 18%|#8        |  : 189/1023 [00:04<00:20,   41.60it/s]
 19%|#8        |  : 190/1023 [00:04<00:20,   40.99it/s]
 19%|#8        |  : 192/1023 [00:04<00:19,   41.90it/s]
 19%|#8        |  : 193/1023 [00:04<00:20,   41.28it/s]
 19%|#9        |  : 195/1023 [00:04<00:19,   42.17it/s]
 19%|#9        |  : 196/1023 [00:04<00:19,   41.54it/s]
 19%|#9        |  : 198/1023 [00:04<00:19,   42.42it/s]
 19%|#9        |  : 199/1023 [00:04<00:19,   41.78it/s]
 20%|#9        |  : 200/1023 [00:04<00:19,   41.16it/s]
 20%|#9        |  : 202/1023 [00:04<00:19,   42.06it/s]
 20%|#9        |  : 203/1023 [00:04<00:19,   41.43it/s]
 20%|##        |  : 205/1023 [00:04<00:19,   42.32it/s]
 20%|##        |  : 206/1023 [00:04<00:19,   41.68it/s]
 20%|##        |  : 207/1023 [00:05<00:19,   41.07it/s]
 20%|##        |  : 209/1023 [00:05<00:19,   41.98it/s]
 21%|##        |  : 210/1023 [00:05<00:19,   41.36it/s]
 21%|##        |  : 212/1023 [00:05<00:19,   42.25it/s]
 21%|##        |  : 213/1023 [00:05<00:19,   41.61it/s]
 21%|##        |  : 214/1023 [00:05<00:19,   41.01it/s]
 21%|##1       |  : 216/1023 [00:05<00:19,   41.91it/s]
 21%|##1       |  : 217/1023 [00:05<00:19,   41.29it/s]
 21%|##1       |  : 219/1023 [00:05<00:19,   42.18it/s]
 22%|##1       |  : 220/1023 [00:05<00:19,   41.55it/s]
 22%|##1       |  : 222/1023 [00:05<00:18,   42.43it/s]
 22%|##1       |  : 223/1023 [00:05<00:19,   41.79it/s]
 22%|##1       |  : 224/1023 [00:05<00:19,   41.18it/s]
 22%|##2       |  : 226/1023 [00:05<00:18,   42.08it/s]
 22%|##2       |  : 227/1023 [00:05<00:19,   41.45it/s]
 22%|##2       |  : 229/1023 [00:05<00:18,   42.33it/s]
 22%|##2       |  : 230/1023 [00:05<00:19,   41.69it/s]
 23%|##2       |  : 231/1023 [00:05<00:19,   41.08it/s]
 23%|##2       |  : 233/1023 [00:05<00:18,   41.98it/s]
 23%|##2       |  : 234/1023 [00:05<00:19,   41.36it/s]
 23%|##3       |  : 236/1023 [00:05<00:18,   42.25it/s]
 23%|##3       |  : 237/1023 [00:05<00:18,   41.61it/s]
 23%|##3       |  : 238/1023 [00:05<00:19,   41.01it/s]
 23%|##3       |  : 240/1023 [00:05<00:18,   41.91it/s]
 24%|##3       |  : 241/1023 [00:05<00:18,   41.29it/s]
 24%|##3       |  : 243/1023 [00:05<00:18,   42.19it/s]
 24%|##3       |  : 244/1023 [00:05<00:18,   41.56it/s]
 24%|##4       |  : 246/1023 [00:05<00:18,   42.43it/s]
 24%|##4       |  : 247/1023 [00:05<00:18,   41.79it/s]
 24%|##4       |  : 248/1023 [00:05<00:18,   41.17it/s]
 24%|##4       |  : 250/1023 [00:06<00:18,   42.06it/s]
 25%|##4       |  : 251/1023 [00:06<00:18,   41.44it/s]
 25%|##4       |  : 253/1023 [00:06<00:18,   42.32it/s]
 25%|##4       |  : 254/1023 [00:06<00:18,   41.68it/s]
 25%|##4       |  : 255/1023 [00:06<00:18,   41.07it/s]
 25%|##5       |  : 257/1023 [00:06<00:18,   41.97it/s]
 25%|##5       |  : 258/1023 [00:06<00:18,   41.35it/s]
 25%|##5       |  : 260/1023 [00:06<00:18,   42.24it/s]
 26%|##5       |  : 261/1023 [00:06<00:18,   41.60it/s]
 26%|##5       |  : 262/1023 [00:06<00:18,   41.00it/s]
 26%|##5       |  : 264/1023 [00:06<00:18,   41.90it/s]
 26%|##5       |  : 265/1023 [00:06<00:18,   41.28it/s]
 26%|##6       |  : 267/1023 [00:06<00:17,   42.17it/s]
 26%|##6       |  : 268/1023 [00:06<00:18,   41.54it/s]
 26%|##6       |  : 270/1023 [00:06<00:17,   42.42it/s]
 26%|##6       |  : 271/1023 [00:06<00:18,   41.78it/s]
 27%|##6       |  : 272/1023 [00:06<00:18,   41.17it/s]
 27%|##6       |  : 274/1023 [00:06<00:17,   42.06it/s]
 27%|##6       |  : 275/1023 [00:06<00:18,   41.44it/s]
 27%|##7       |  : 277/1023 [00:06<00:17,   42.32it/s]
 27%|##7       |  : 278/1023 [00:06<00:17,   41.68it/s]
 27%|##7       |  : 279/1023 [00:06<00:18,   41.07it/s]
 27%|##7       |  : 281/1023 [00:06<00:17,   41.98it/s]
 28%|##7       |  : 282/1023 [00:06<00:17,   41.36it/s]
 28%|##7       |  : 284/1023 [00:06<00:17,   42.24it/s]
 28%|##7       |  : 285/1023 [00:06<00:17,   41.61it/s]
 28%|##8       |  : 287/1023 [00:06<00:17,   42.48it/s]
 28%|##8       |  : 288/1023 [00:06<00:17,   41.84it/s]
 28%|##8       |  : 289/1023 [00:06<00:17,   41.22it/s]
 28%|##8       |  : 291/1023 [00:07<00:17,   42.12it/s]
 29%|##8       |  : 292/1023 [00:07<00:17,   41.49it/s]
 29%|##8       |  : 294/1023 [00:07<00:17,   42.37it/s]
 29%|##8       |  : 295/1023 [00:07<00:17,   41.73it/s]
 29%|##8       |  : 296/1023 [00:07<00:17,   41.12it/s]
 29%|##9       |  : 298/1023 [00:07<00:17,   42.01it/s]
 29%|##9       |  : 299/1023 [00:07<00:17,   41.39it/s]
 29%|##9       |  : 301/1023 [00:07<00:17,   42.28it/s]
 30%|##9       |  : 302/1023 [00:07<00:17,   41.64it/s]
 30%|##9       |  : 303/1023 [00:07<00:17,   41.04it/s]
 30%|##9       |  : 305/1023 [00:07<00:17,   41.94it/s]
 30%|##9       |  : 306/1023 [00:07<00:17,   41.32it/s]
 30%|###       |  : 308/1023 [00:07<00:16,   42.21it/s]
 30%|###       |  : 309/1023 [00:07<00:17,   41.58it/s]
 30%|###       |  : 311/1023 [00:07<00:16,   42.45it/s]
 30%|###       |  : 312/1023 [00:07<00:17,   41.81it/s]
 31%|###       |  : 313/1023 [00:07<00:17,   41.20it/s]
 31%|###       |  : 315/1023 [00:07<00:16,   42.09it/s]
 31%|###       |  : 316/1023 [00:07<00:17,   41.47it/s]
 31%|###1      |  : 318/1023 [00:07<00:16,   42.35it/s]
 31%|###1      |  : 319/1023 [00:07<00:16,   41.71it/s]
 31%|###1      |  : 320/1023 [00:07<00:17,   41.10it/s]
 31%|###1      |  : 322/1023 [00:07<00:16,   42.00it/s]
 32%|###1      |  : 323/1023 [00:07<00:16,   41.38it/s]
 32%|###1      |  : 325/1023 [00:07<00:16,   42.27it/s]
 32%|###1      |  : 326/1023 [00:07<00:16,   41.63it/s]
 32%|###1      |  : 327/1023 [00:07<00:16,   41.03it/s]
 32%|###2      |  : 329/1023 [00:07<00:16,   41.93it/s]
 32%|###2      |  : 330/1023 [00:07<00:16,   41.31it/s]
 32%|###2      |  : 332/1023 [00:07<00:16,   42.20it/s]
 33%|###2      |  : 333/1023 [00:08<00:16,   41.57it/s]
 33%|###2      |  : 335/1023 [00:08<00:16,   42.44it/s]
 33%|###2      |  : 336/1023 [00:08<00:16,   41.80it/s]
 33%|###2      |  : 337/1023 [00:08<00:16,   41.19it/s]
 33%|###3      |  : 339/1023 [00:08<00:16,   42.08it/s]
 33%|###3      |  : 340/1023 [00:08<00:16,   41.45it/s]
 33%|###3      |  : 342/1023 [00:08<00:16,   42.33it/s]
 34%|###3      |  : 343/1023 [00:08<00:16,   41.69it/s]
 34%|###3      |  : 344/1023 [00:08<00:16,   41.08it/s]
 34%|###3      |  : 346/1023 [00:08<00:16,   41.98it/s]
 34%|###3      |  : 347/1023 [00:08<00:16,   41.36it/s]
 34%|###4      |  : 349/1023 [00:08<00:15,   42.25it/s]
 34%|###4      |  : 350/1023 [00:08<00:16,   41.61it/s]
 34%|###4      |  : 351/1023 [00:08<00:16,   41.01it/s]
 35%|###4      |  : 353/1023 [00:08<00:15,   41.91it/s]
 35%|###4      |  : 354/1023 [00:08<00:16,   41.30it/s]
 35%|###4      |  : 356/1023 [00:08<00:15,   42.19it/s]
 35%|###4      |  : 357/1023 [00:08<00:16,   41.56it/s]
 35%|###4      |  : 358/1023 [00:08<00:16,   40.95it/s]
 35%|###5      |  : 360/1023 [00:08<00:15,   41.86it/s]
 35%|###5      |  : 361/1023 [00:08<00:16,   41.25it/s]
 35%|###5      |  : 363/1023 [00:08<00:15,   42.14it/s]
 36%|###5      |  : 364/1023 [00:08<00:15,   41.52it/s]
 36%|###5      |  : 366/1023 [00:08<00:15,   42.40it/s]
 36%|###5      |  : 367/1023 [00:08<00:15,   41.76it/s]
 36%|###5      |  : 368/1023 [00:08<00:15,   41.15it/s]
 36%|###6      |  : 370/1023 [00:08<00:15,   42.04it/s]
 36%|###6      |  : 371/1023 [00:08<00:15,   41.42it/s]
 36%|###6      |  : 373/1023 [00:08<00:15,   42.31it/s]
 37%|###6      |  : 374/1023 [00:09<00:15,   41.67it/s]
 37%|###6      |  : 375/1023 [00:09<00:15,   41.07it/s]
 37%|###6      |  : 377/1023 [00:09<00:15,   41.97it/s]
 37%|###6      |  : 378/1023 [00:09<00:15,   41.35it/s]
 37%|###7      |  : 380/1023 [00:09<00:15,   42.23it/s]
 37%|###7      |  : 381/1023 [00:09<00:15,   41.60it/s]
 37%|###7      |  : 382/1023 [00:09<00:15,   40.99it/s]
 38%|###7      |  : 384/1023 [00:09<00:15,   41.90it/s]
 38%|###7      |  : 385/1023 [00:09<00:15,   41.28it/s]
 38%|###7      |  : 387/1023 [00:09<00:15,   42.17it/s]
 38%|###7      |  : 388/1023 [00:09<00:15,   41.54it/s]
 38%|###8      |  : 390/1023 [00:09<00:14,   42.42it/s]
 38%|###8      |  : 391/1023 [00:09<00:15,   41.78it/s]
 38%|###8      |  : 392/1023 [00:09<00:15,   41.17it/s]
 39%|###8      |  : 394/1023 [00:09<00:14,   42.06it/s]
 39%|###8      |  : 395/1023 [00:09<00:15,   41.44it/s]
 39%|###8      |  : 397/1023 [00:09<00:14,   42.32it/s]
 39%|###8      |  : 398/1023 [00:09<00:14,   41.68it/s]
 39%|###9      |  : 399/1023 [00:09<00:15,   41.07it/s]
 39%|###9      |  : 401/1023 [00:09<00:14,   41.97it/s]
 39%|###9      |  : 402/1023 [00:09<00:15,   41.35it/s]
 39%|###9      |  : 404/1023 [00:09<00:14,   42.24it/s]
 40%|###9      |  : 405/1023 [00:09<00:14,   41.60it/s]
 40%|###9      |  : 406/1023 [00:09<00:15,   41.00it/s]
 40%|###9      |  : 408/1023 [00:09<00:14,   41.91it/s]
 40%|###9      |  : 409/1023 [00:09<00:14,   41.29it/s]
 40%|####      |  : 411/1023 [00:09<00:14,   42.18it/s]
 40%|####      |  : 412/1023 [00:09<00:14,   41.55it/s]
 40%|####      |  : 414/1023 [00:09<00:14,   42.43it/s]
 41%|####      |  : 415/1023 [00:09<00:14,   41.79it/s]
 41%|####      |  : 416/1023 [00:10<00:14,   41.17it/s]
 41%|####      |  : 418/1023 [00:10<00:14,   42.07it/s]
 41%|####      |  : 419/1023 [00:10<00:14,   41.44it/s]
 41%|####1     |  : 421/1023 [00:10<00:14,   42.33it/s]
 41%|####1     |  : 422/1023 [00:10<00:14,   41.69it/s]
 41%|####1     |  : 423/1023 [00:10<00:14,   41.08it/s]
 42%|####1     |  : 425/1023 [00:10<00:14,   41.98it/s]
 42%|####1     |  : 426/1023 [00:10<00:14,   41.35it/s]
 42%|####1     |  : 428/1023 [00:10<00:14,   42.25it/s]
 42%|####1     |  : 429/1023 [00:10<00:14,   41.61it/s]
 42%|####2     |  : 430/1023 [00:10<00:14,   41.01it/s]
 42%|####2     |  : 432/1023 [00:10<00:14,   41.90it/s]
 42%|####2     |  : 433/1023 [00:10<00:14,   41.28it/s]
 43%|####2     |  : 435/1023 [00:10<00:13,   42.18it/s]
 43%|####2     |  : 436/1023 [00:10<00:14,   41.54it/s]
 43%|####2     |  : 438/1023 [00:10<00:13,   42.42it/s]
 43%|####2     |  : 439/1023 [00:10<00:13,   41.78it/s]
 43%|####3     |  : 440/1023 [00:10<00:14,   41.17it/s]
 43%|####3     |  : 442/1023 [00:10<00:13,   42.07it/s]
 43%|####3     |  : 443/1023 [00:10<00:13,   41.45it/s]
 43%|####3     |  : 444/1023 [00:10<00:14,   40.85it/s]
 44%|####3     |  : 446/1023 [00:10<00:13,   41.77it/s]
 44%|####3     |  : 447/1023 [00:10<00:13,   41.16it/s]
 44%|####3     |  : 449/1023 [00:10<00:13,   42.07it/s]
 44%|####3     |  : 450/1023 [00:10<00:13,   41.44it/s]
 44%|####4     |  : 452/1023 [00:10<00:13,   42.33it/s]
 44%|####4     |  : 453/1023 [00:10<00:13,   41.69it/s]
 44%|####4     |  : 454/1023 [00:10<00:13,   41.09it/s]
 45%|####4     |  : 456/1023 [00:10<00:13,   41.99it/s]
 45%|####4     |  : 457/1023 [00:10<00:13,   41.37it/s]
 45%|####4     |  : 459/1023 [00:11<00:13,   42.25it/s]
 45%|####4     |  : 460/1023 [00:11<00:13,   41.62it/s]
 45%|####5     |  : 461/1023 [00:11<00:13,   41.01it/s]
 45%|####5     |  : 463/1023 [00:11<00:13,   41.92it/s]
 45%|####5     |  : 464/1023 [00:11<00:13,   41.30it/s]
 46%|####5     |  : 466/1023 [00:11<00:13,   42.19it/s]
 46%|####5     |  : 467/1023 [00:11<00:13,   41.56it/s]
 46%|####5     |  : 468/1023 [00:11<00:13,   40.96it/s]
 46%|####5     |  : 470/1023 [00:11<00:13,   41.86it/s]
 46%|####6     |  : 471/1023 [00:11<00:13,   41.25it/s]
 46%|####6     |  : 473/1023 [00:11<00:13,   42.14it/s]
 46%|####6     |  : 474/1023 [00:11<00:13,   41.51it/s]
 47%|####6     |  : 476/1023 [00:11<00:12,   42.39it/s]
 47%|####6     |  : 477/1023 [00:11<00:13,   41.75it/s]
 47%|####6     |  : 478/1023 [00:11<00:13,   41.14it/s]
 47%|####6     |  : 480/1023 [00:11<00:12,   42.04it/s]
 47%|####7     |  : 481/1023 [00:11<00:13,   41.42it/s]
 47%|####7     |  : 483/1023 [00:11<00:12,   42.31it/s]
 47%|####7     |  : 484/1023 [00:11<00:12,   41.67it/s]
 47%|####7     |  : 485/1023 [00:11<00:13,   41.07it/s]
 48%|####7     |  : 487/1023 [00:11<00:12,   41.97it/s]
 48%|####7     |  : 488/1023 [00:11<00:12,   41.35it/s]
 48%|####7     |  : 490/1023 [00:11<00:12,   42.23it/s]
 48%|####7     |  : 491/1023 [00:11<00:12,   41.59it/s]
 48%|####8     |  : 492/1023 [00:11<00:12,   40.99it/s]
 48%|####8     |  : 494/1023 [00:11<00:12,   41.90it/s]
 48%|####8     |  : 495/1023 [00:11<00:12,   41.28it/s]
 49%|####8     |  : 497/1023 [00:11<00:12,   42.17it/s]
 49%|####8     |  : 498/1023 [00:11<00:12,   41.54it/s]
 49%|####8     |  : 499/1023 [00:12<00:12,   40.94it/s]
 49%|####8     |  : 501/1023 [00:12<00:12,   41.85it/s]
 49%|####9     |  : 502/1023 [00:12<00:12,   41.23it/s]
 49%|####9     |  : 504/1023 [00:12<00:12,   42.13it/s]
 49%|####9     |  : 505/1023 [00:12<00:12,   41.50it/s]
 49%|####9     |  : 506/1023 [00:12<00:12,   40.90it/s]
 50%|####9     |  : 508/1023 [00:12<00:12,   41.81it/s]
 50%|####9     |  : 509/1023 [00:12<00:12,   41.19it/s]
 50%|####9     |  : 511/1023 [00:12<00:12,   42.09it/s]
 50%|#####     |  : 512/1023 [00:12<00:12,   41.46it/s]
 50%|#####     |  : 514/1023 [00:12<00:12,   42.35it/s]
 50%|#####     |  : 515/1023 [00:12<00:12,   41.71it/s]
 50%|#####     |  : 516/1023 [00:12<00:12,   41.10it/s]
 51%|#####     |  : 518/1023 [00:12<00:12,   42.00it/s]
 51%|#####     |  : 519/1023 [00:12<00:12,   41.38it/s]
 51%|#####     |  : 521/1023 [00:12<00:11,   42.26it/s]
 51%|#####1    |  : 522/1023 [00:12<00:12,   41.63it/s]
 51%|#####1    |  : 523/1023 [00:12<00:12,   41.02it/s]
 51%|#####1    |  : 525/1023 [00:12<00:11,   41.93it/s]
 51%|#####1    |  : 526/1023 [00:12<00:12,   41.31it/s]
 52%|#####1    |  : 528/1023 [00:12<00:11,   42.20it/s]
 52%|#####1    |  : 529/1023 [00:12<00:11,   41.56it/s]
 52%|#####1    |  : 530/1023 [00:12<00:12,   40.96it/s]
 52%|#####2    |  : 532/1023 [00:12<00:11,   41.87it/s]
 52%|#####2    |  : 533/1023 [00:12<00:11,   41.25it/s]
 52%|#####2    |  : 535/1023 [00:12<00:11,   42.14it/s]
 52%|#####2    |  : 536/1023 [00:12<00:11,   41.52it/s]
 53%|#####2    |  : 538/1023 [00:12<00:11,   42.40it/s]
 53%|#####2    |  : 539/1023 [00:12<00:11,   41.76it/s]
 53%|#####2    |  : 540/1023 [00:12<00:11,   41.14it/s]
 53%|#####2    |  : 542/1023 [00:13<00:11,   42.04it/s]
 53%|#####3    |  : 543/1023 [00:13<00:11,   41.42it/s]
 53%|#####3    |  : 545/1023 [00:13<00:11,   42.30it/s]
 53%|#####3    |  : 546/1023 [00:13<00:11,   41.66it/s]
 53%|#####3    |  : 547/1023 [00:13<00:11,   41.06it/s]
 54%|#####3    |  : 549/1023 [00:13<00:11,   41.96it/s]
 54%|#####3    |  : 550/1023 [00:13<00:11,   41.34it/s]
 54%|#####3    |  : 552/1023 [00:13<00:11,   42.23it/s]
 54%|#####4    |  : 553/1023 [00:13<00:11,   41.60it/s]
 54%|#####4    |  : 554/1023 [00:13<00:11,   40.99it/s]
 54%|#####4    |  : 556/1023 [00:13<00:11,   41.90it/s]
 54%|#####4    |  : 557/1023 [00:13<00:11,   41.28it/s]
 55%|#####4    |  : 559/1023 [00:13<00:11,   42.17it/s]
 55%|#####4    |  : 560/1023 [00:13<00:11,   41.54it/s]
 55%|#####4    |  : 562/1023 [00:13<00:10,   42.42it/s]
 55%|#####5    |  : 563/1023 [00:13<00:11,   41.78it/s]
 55%|#####5    |  : 564/1023 [00:13<00:11,   41.17it/s]
 55%|#####5    |  : 566/1023 [00:13<00:10,   42.06it/s]
 55%|#####5    |  : 567/1023 [00:13<00:11,   41.44it/s]
 56%|#####5    |  : 569/1023 [00:13<00:10,   42.32it/s]
 56%|#####5    |  : 570/1023 [00:13<00:10,   41.68it/s]
 56%|#####5    |  : 571/1023 [00:13<00:11,   41.08it/s]
 56%|#####6    |  : 573/1023 [00:13<00:10,   41.98it/s]
 56%|#####6    |  : 574/1023 [00:13<00:10,   41.35it/s]
 56%|#####6    |  : 576/1023 [00:13<00:10,   42.24it/s]
 56%|#####6    |  : 577/1023 [00:13<00:10,   41.61it/s]
 57%|#####6    |  : 578/1023 [00:13<00:10,   41.00it/s]
 57%|#####6    |  : 580/1023 [00:13<00:10,   41.90it/s]
 57%|#####6    |  : 581/1023 [00:13<00:10,   41.29it/s]
 57%|#####6    |  : 583/1023 [00:14<00:10,   42.18it/s]
 57%|#####7    |  : 584/1023 [00:14<00:10,   41.54it/s]
 57%|#####7    |  : 586/1023 [00:14<00:10,   42.42it/s]
 57%|#####7    |  : 587/1023 [00:14<00:10,   41.78it/s]
 57%|#####7    |  : 588/1023 [00:14<00:10,   41.17it/s]
 58%|#####7    |  : 590/1023 [00:14<00:10,   42.06it/s]
 58%|#####7    |  : 591/1023 [00:14<00:10,   41.43it/s]
 58%|#####7    |  : 593/1023 [00:14<00:10,   42.32it/s]
 58%|#####8    |  : 594/1023 [00:14<00:10,   41.68it/s]
 58%|#####8    |  : 595/1023 [00:14<00:10,   41.08it/s]
 58%|#####8    |  : 597/1023 [00:14<00:10,   41.98it/s]
 58%|#####8    |  : 598/1023 [00:14<00:10,   41.36it/s]
 59%|#####8    |  : 600/1023 [00:14<00:10,   42.24it/s]
 59%|#####8    |  : 601/1023 [00:14<00:10,   41.61it/s]
 59%|#####8    |  : 602/1023 [00:14<00:10,   41.01it/s]
 59%|#####9    |  : 604/1023 [00:14<00:09,   41.92it/s]
 59%|#####9    |  : 605/1023 [00:14<00:10,   41.30it/s]
 59%|#####9    |  : 607/1023 [00:14<00:09,   42.19it/s]
 59%|#####9    |  : 608/1023 [00:14<00:09,   41.55it/s]
 60%|#####9    |  : 609/1023 [00:14<00:10,   40.95it/s]
 60%|#####9    |  : 611/1023 [00:14<00:09,   41.86it/s]
 60%|#####9    |  : 612/1023 [00:14<00:09,   41.24it/s]
 60%|######    |  : 614/1023 [00:14<00:09,   42.14it/s]
 60%|######    |  : 615/1023 [00:14<00:09,   41.51it/s]
 60%|######    |  : 616/1023 [00:14<00:09,   40.91it/s]
 60%|######    |  : 618/1023 [00:14<00:09,   41.82it/s]
 61%|######    |  : 619/1023 [00:14<00:09,   41.20it/s]
 61%|######    |  : 621/1023 [00:14<00:09,   42.09it/s]
 61%|######    |  : 622/1023 [00:14<00:09,   41.47it/s]
 61%|######    |  : 624/1023 [00:14<00:09,   42.34it/s]
 61%|######1   |  : 625/1023 [00:15<00:09,   41.70it/s]
 61%|######1   |  : 626/1023 [00:15<00:09,   41.10it/s]
 61%|######1   |  : 628/1023 [00:15<00:09,   42.00it/s]
 61%|######1   |  : 629/1023 [00:15<00:09,   41.38it/s]
 62%|######1   |  : 631/1023 [00:15<00:09,   42.26it/s]
 62%|######1   |  : 632/1023 [00:15<00:09,   41.62it/s]
 62%|######1   |  : 633/1023 [00:15<00:09,   41.02it/s]
 62%|######2   |  : 635/1023 [00:15<00:09,   41.93it/s]
 62%|######2   |  : 636/1023 [00:15<00:09,   41.30it/s]
 62%|######2   |  : 638/1023 [00:15<00:09,   42.19it/s]
 62%|######2   |  : 639/1023 [00:15<00:09,   41.56it/s]
 63%|######2   |  : 640/1023 [00:15<00:09,   40.96it/s]
 63%|######2   |  : 642/1023 [00:15<00:09,   41.87it/s]
 63%|######2   |  : 643/1023 [00:15<00:09,   41.25it/s]
 63%|######3   |  : 645/1023 [00:15<00:08,   42.14it/s]
 63%|######3   |  : 646/1023 [00:15<00:09,   41.51it/s]
 63%|######3   |  : 647/1023 [00:15<00:09,   40.92it/s]
 63%|######3   |  : 649/1023 [00:15<00:08,   41.83it/s]
 64%|######3   |  : 650/1023 [00:15<00:09,   41.21it/s]
 64%|######3   |  : 652/1023 [00:15<00:08,   42.11it/s]
 64%|######3   |  : 653/1023 [00:15<00:08,   41.48it/s]
 64%|######4   |  : 655/1023 [00:15<00:08,   42.37it/s]
 64%|######4   |  : 656/1023 [00:15<00:08,   41.73it/s]
 64%|######4   |  : 657/1023 [00:15<00:08,   41.12it/s]
 64%|######4   |  : 659/1023 [00:15<00:08,   42.02it/s]
 65%|######4   |  : 660/1023 [00:15<00:08,   41.39it/s]
 65%|######4   |  : 662/1023 [00:15<00:08,   42.28it/s]
 65%|######4   |  : 663/1023 [00:15<00:08,   41.64it/s]
 65%|######4   |  : 664/1023 [00:15<00:08,   41.03it/s]
 65%|######5   |  : 666/1023 [00:16<00:08,   41.94it/s]
 65%|######5   |  : 667/1023 [00:16<00:08,   41.32it/s]
 65%|######5   |  : 669/1023 [00:16<00:08,   42.21it/s]
 65%|######5   |  : 670/1023 [00:16<00:08,   41.58it/s]
 66%|######5   |  : 671/1023 [00:16<00:08,   40.98it/s]
 66%|######5   |  : 673/1023 [00:16<00:08,   41.88it/s]
 66%|######5   |  : 674/1023 [00:16<00:08,   41.27it/s]
 66%|######6   |  : 676/1023 [00:16<00:08,   42.16it/s]
 66%|######6   |  : 677/1023 [00:16<00:08,   41.53it/s]
 66%|######6   |  : 678/1023 [00:16<00:08,   40.93it/s]
 66%|######6   |  : 680/1023 [00:16<00:08,   41.84it/s]
 67%|######6   |  : 681/1023 [00:16<00:08,   41.22it/s]
 67%|######6   |  : 683/1023 [00:16<00:08,   42.12it/s]
 67%|######6   |  : 684/1023 [00:16<00:08,   41.49it/s]
 67%|######7   |  : 686/1023 [00:16<00:07,   42.37it/s]
 67%|######7   |  : 687/1023 [00:16<00:08,   41.73it/s]
 67%|######7   |  : 688/1023 [00:16<00:08,   41.12it/s]
 67%|######7   |  : 690/1023 [00:16<00:07,   42.02it/s]
 68%|######7   |  : 691/1023 [00:16<00:08,   41.40it/s]
 68%|######7   |  : 693/1023 [00:16<00:07,   42.28it/s]
 68%|######7   |  : 694/1023 [00:16<00:07,   41.65it/s]
 68%|######7   |  : 695/1023 [00:16<00:07,   41.05it/s]
 68%|######8   |  : 697/1023 [00:16<00:07,   41.95it/s]
 68%|######8   |  : 698/1023 [00:16<00:07,   41.33it/s]
 68%|######8   |  : 700/1023 [00:16<00:07,   42.22it/s]
 69%|######8   |  : 701/1023 [00:16<00:07,   41.58it/s]
 69%|######8   |  : 702/1023 [00:16<00:07,   40.98it/s]
 69%|######8   |  : 704/1023 [00:16<00:07,   41.88it/s]
 69%|######8   |  : 705/1023 [00:16<00:07,   41.27it/s]
 69%|######9   |  : 707/1023 [00:16<00:07,   42.16it/s]
 69%|######9   |  : 708/1023 [00:17<00:07,   41.53it/s]
 69%|######9   |  : 710/1023 [00:17<00:07,   42.41it/s]
 70%|######9   |  : 711/1023 [00:17<00:07,   41.76it/s]
 70%|######9   |  : 712/1023 [00:17<00:07,   41.15it/s]
 70%|######9   |  : 714/1023 [00:17<00:07,   42.05it/s]
 70%|######9   |  : 715/1023 [00:17<00:07,   41.42it/s]
 70%|#######   |  : 717/1023 [00:17<00:07,   42.31it/s]
 70%|#######   |  : 718/1023 [00:17<00:07,   41.67it/s]
 70%|#######   |  : 719/1023 [00:17<00:07,   41.06it/s]
 70%|#######   |  : 721/1023 [00:17<00:07,   41.96it/s]
 71%|#######   |  : 722/1023 [00:17<00:07,   41.34it/s]
 71%|#######   |  : 724/1023 [00:17<00:07,   42.22it/s]
 71%|#######   |  : 725/1023 [00:17<00:07,   41.59it/s]
 71%|#######   |  : 726/1023 [00:17<00:07,   40.99it/s]
 71%|#######1  |  : 728/1023 [00:17<00:07,   41.89it/s]
 71%|#######1  |  : 729/1023 [00:17<00:07,   41.28it/s]
 71%|#######1  |  : 731/1023 [00:17<00:06,   42.17it/s]
 72%|#######1  |  : 732/1023 [00:17<00:07,   41.54it/s]
 72%|#######1  |  : 733/1023 [00:17<00:07,   40.94it/s]
 72%|#######1  |  : 735/1023 [00:17<00:06,   41.85it/s]
 72%|#######1  |  : 736/1023 [00:17<00:06,   41.24it/s]
 72%|#######2  |  : 738/1023 [00:17<00:06,   42.13it/s]
 72%|#######2  |  : 739/1023 [00:17<00:06,   41.50it/s]
 72%|#######2  |  : 741/1023 [00:17<00:06,   42.37it/s]
 73%|#######2  |  : 742/1023 [00:17<00:06,   41.73it/s]
 73%|#######2  |  : 743/1023 [00:17<00:06,   41.12it/s]
 73%|#######2  |  : 745/1023 [00:17<00:06,   42.02it/s]
 73%|#######2  |  : 746/1023 [00:17<00:06,   41.40it/s]
 73%|#######3  |  : 747/1023 [00:17<00:06,   40.81it/s]
 73%|#######3  |  : 749/1023 [00:18<00:06,   41.72it/s]
 73%|#######3  |  : 750/1023 [00:18<00:06,   41.12it/s]
 74%|#######3  |  : 752/1023 [00:18<00:06,   42.02it/s]
 74%|#######3  |  : 753/1023 [00:18<00:06,   41.40it/s]
 74%|#######3  |  : 755/1023 [00:18<00:06,   42.28it/s]
 74%|#######3  |  : 756/1023 [00:18<00:06,   41.64it/s]
 74%|#######3  |  : 757/1023 [00:18<00:06,   41.04it/s]
 74%|#######4  |  : 759/1023 [00:18<00:06,   41.94it/s]
 74%|#######4  |  : 760/1023 [00:18<00:06,   41.32it/s]
 74%|#######4  |  : 761/1023 [00:18<00:06,   40.74it/s]
 75%|#######4  |  : 763/1023 [00:18<00:06,   41.66it/s]
 75%|#######4  |  : 764/1023 [00:18<00:06,   41.05it/s]
 75%|#######4  |  : 765/1023 [00:18<00:06,   40.48it/s]
 75%|#######4  |  : 767/1023 [00:18<00:06,   41.42it/s]
 75%|#######5  |  : 768/1023 [00:18<00:06,   40.83it/s]
 75%|#######5  |  : 770/1023 [00:18<00:06,   41.74it/s]
 75%|#######5  |  : 771/1023 [00:18<00:06,   41.13it/s]
 75%|#######5  |  : 772/1023 [00:18<00:06,   40.55it/s]
 76%|#######5  |  : 774/1023 [00:18<00:06,   41.47it/s]
 76%|#######5  |  : 775/1023 [00:18<00:06,   40.88it/s]
 76%|#######5  |  : 777/1023 [00:18<00:05,   41.79it/s]
 76%|#######6  |  : 778/1023 [00:18<00:05,   41.18it/s]
 76%|#######6  |  : 779/1023 [00:18<00:06,   40.60it/s]
 76%|#######6  |  : 781/1023 [00:18<00:05,   41.53it/s]
 76%|#######6  |  : 782/1023 [00:18<00:05,   40.93it/s]
 77%|#######6  |  : 784/1023 [00:18<00:05,   41.84it/s]
 77%|#######6  |  : 785/1023 [00:18<00:05,   41.23it/s]
 77%|#######6  |  : 786/1023 [00:18<00:05,   40.65it/s]
 77%|#######7  |  : 788/1023 [00:18<00:05,   41.57it/s]
 77%|#######7  |  : 789/1023 [00:18<00:05,   40.97it/s]
 77%|#######7  |  : 790/1023 [00:19<00:05,   40.40it/s]
 77%|#######7  |  : 792/1023 [00:19<00:05,   41.33it/s]
 78%|#######7  |  : 793/1023 [00:19<00:05,   40.75it/s]
 78%|#######7  |  : 794/1023 [00:19<00:05,   40.19it/s]
 78%|#######7  |  : 796/1023 [00:19<00:05,   41.13it/s]
 78%|#######7  |  : 797/1023 [00:19<00:05,   40.56it/s]
 78%|#######8  |  : 799/1023 [00:19<00:05,   41.48it/s]
 78%|#######8  |  : 800/1023 [00:19<00:05,   40.88it/s]
 78%|#######8  |  : 801/1023 [00:19<00:05,   40.31it/s]
 78%|#######8  |  : 803/1023 [00:19<00:05,   41.25it/s]
 79%|#######8  |  : 804/1023 [00:19<00:05,   40.67it/s]
 79%|#######8  |  : 805/1023 [00:19<00:05,   40.10it/s]
 79%|#######8  |  : 807/1023 [00:19<00:05,   41.05it/s]
 79%|#######8  |  : 808/1023 [00:19<00:05,   40.48it/s]
 79%|#######9  |  : 810/1023 [00:19<00:05,   41.40it/s]
 79%|#######9  |  : 811/1023 [00:19<00:05,   40.81it/s]
 79%|#######9  |  : 812/1023 [00:19<00:05,   40.25it/s]
 80%|#######9  |  : 814/1023 [00:19<00:05,   41.19it/s]
 80%|#######9  |  : 815/1023 [00:19<00:05,   40.61it/s]
 80%|#######9  |  : 817/1023 [00:19<00:04,   41.54it/s]
 80%|#######9  |  : 818/1023 [00:19<00:05,   40.94it/s]
 80%|########  |  : 820/1023 [00:19<00:04,   41.85it/s]
 80%|########  |  : 821/1023 [00:19<00:04,   41.23it/s]
 80%|########  |  : 822/1023 [00:19<00:04,   40.65it/s]
 81%|########  |  : 824/1023 [00:19<00:04,   41.57it/s]
 81%|########  |  : 825/1023 [00:19<00:04,   40.97it/s]
 81%|########  |  : 827/1023 [00:19<00:04,   41.88it/s]
 81%|########  |  : 828/1023 [00:19<00:04,   41.26it/s]
 81%|########1 |  : 829/1023 [00:19<00:04,   40.68it/s]
 81%|########1 |  : 831/1023 [00:20<00:04,   41.61it/s]
 81%|########1 |  : 832/1023 [00:20<00:04,   41.00it/s]
 82%|########1 |  : 834/1023 [00:20<00:04,   41.91it/s]
 82%|########1 |  : 835/1023 [00:20<00:04,   41.29it/s]
 82%|########1 |  : 836/1023 [00:20<00:04,   40.71it/s]
 82%|########1 |  : 838/1023 [00:20<00:04,   41.63it/s]
 82%|########2 |  : 839/1023 [00:20<00:04,   41.02it/s]
 82%|########2 |  : 841/1023 [00:20<00:04,   41.93it/s]
 82%|########2 |  : 842/1023 [00:20<00:04,   41.31it/s]
 82%|########2 |  : 843/1023 [00:20<00:04,   40.72it/s]
 83%|########2 |  : 845/1023 [00:20<00:04,   41.64it/s]
 83%|########2 |  : 846/1023 [00:20<00:04,   41.04it/s]
 83%|########2 |  : 848/1023 [00:20<00:04,   41.94it/s]
 83%|########2 |  : 849/1023 [00:20<00:04,   41.32it/s]
 83%|########3 |  : 851/1023 [00:20<00:04,   42.21it/s]
 83%|########3 |  : 852/1023 [00:20<00:04,   41.58it/s]
 83%|########3 |  : 853/1023 [00:20<00:04,   40.98it/s]
 84%|########3 |  : 855/1023 [00:20<00:04,   41.88it/s]
 84%|########3 |  : 856/1023 [00:20<00:04,   41.26it/s]
 84%|########3 |  : 858/1023 [00:20<00:03,   42.16it/s]
 84%|########3 |  : 859/1023 [00:20<00:03,   41.52it/s]
 84%|########4 |  : 860/1023 [00:20<00:03,   40.92it/s]
 84%|########4 |  : 862/1023 [00:20<00:03,   41.83it/s]
 84%|########4 |  : 863/1023 [00:20<00:03,   41.22it/s]
 85%|########4 |  : 865/1023 [00:20<00:03,   42.12it/s]
 85%|########4 |  : 866/1023 [00:20<00:03,   41.49it/s]
 85%|########4 |  : 867/1023 [00:20<00:03,   40.89it/s]
 85%|########4 |  : 869/1023 [00:20<00:03,   41.80it/s]
 85%|########5 |  : 870/1023 [00:20<00:03,   41.19it/s]
 85%|########5 |  : 872/1023 [00:20<00:03,   42.09it/s]
 85%|########5 |  : 873/1023 [00:21<00:03,   41.46it/s]
 85%|########5 |  : 874/1023 [00:21<00:03,   40.87it/s]
 86%|########5 |  : 876/1023 [00:21<00:03,   41.78it/s]
 86%|########5 |  : 877/1023 [00:21<00:03,   41.16it/s]
 86%|########5 |  : 879/1023 [00:21<00:03,   42.06it/s]
 86%|########6 |  : 880/1023 [00:21<00:03,   41.44it/s]
 86%|########6 |  : 881/1023 [00:21<00:03,   40.84it/s]
 86%|########6 |  : 883/1023 [00:21<00:03,   41.76it/s]
 86%|########6 |  : 884/1023 [00:21<00:03,   41.14it/s]
 87%|########6 |  : 886/1023 [00:21<00:03,   42.05it/s]
 87%|########6 |  : 887/1023 [00:21<00:03,   41.42it/s]
 87%|########6 |  : 888/1023 [00:21<00:03,   40.83it/s]
 87%|########6 |  : 890/1023 [00:21<00:03,   41.74it/s]
 87%|########7 |  : 891/1023 [00:21<00:03,   41.13it/s]
 87%|########7 |  : 893/1023 [00:21<00:03,   42.02it/s]
 87%|########7 |  : 894/1023 [00:21<00:03,   41.40it/s]
 88%|########7 |  : 896/1023 [00:21<00:03,   42.28it/s]
 88%|########7 |  : 897/1023 [00:21<00:03,   41.64it/s]
 88%|########7 |  : 898/1023 [00:21<00:03,   41.04it/s]
 88%|########7 |  : 900/1023 [00:21<00:02,   41.94it/s]
 88%|########8 |  : 901/1023 [00:21<00:02,   41.32it/s]
 88%|########8 |  : 903/1023 [00:21<00:02,   42.21it/s]
 88%|########8 |  : 904/1023 [00:21<00:02,   41.58it/s]
 88%|########8 |  : 905/1023 [00:21<00:02,   40.97it/s]
 89%|########8 |  : 907/1023 [00:21<00:02,   41.88it/s]
 89%|########8 |  : 908/1023 [00:21<00:02,   41.27it/s]
 89%|########8 |  : 910/1023 [00:21<00:02,   42.16it/s]
 89%|########9 |  : 911/1023 [00:21<00:02,   41.53it/s]
 89%|########9 |  : 912/1023 [00:21<00:02,   40.93it/s]
 89%|########9 |  : 914/1023 [00:21<00:02,   41.84it/s]
 89%|########9 |  : 915/1023 [00:22<00:02,   41.22it/s]
 90%|########9 |  : 917/1023 [00:22<00:02,   42.12it/s]
 90%|########9 |  : 918/1023 [00:22<00:02,   41.49it/s]
 90%|########9 |  : 920/1023 [00:22<00:02,   42.37it/s]
 90%|######### |  : 921/1023 [00:22<00:02,   41.73it/s]
 90%|######### |  : 922/1023 [00:22<00:02,   41.12it/s]
 90%|######### |  : 924/1023 [00:22<00:02,   42.02it/s]
 90%|######### |  : 925/1023 [00:22<00:02,   41.40it/s]
 91%|######### |  : 927/1023 [00:22<00:02,   42.29it/s]
 91%|######### |  : 928/1023 [00:22<00:02,   41.65it/s]
 91%|######### |  : 929/1023 [00:22<00:02,   41.04it/s]
 91%|#########1|  : 931/1023 [00:22<00:02,   41.95it/s]
 91%|#########1|  : 932/1023 [00:22<00:02,   41.33it/s]
 91%|#########1|  : 934/1023 [00:22<00:02,   42.22it/s]
 91%|#########1|  : 935/1023 [00:22<00:02,   41.58it/s]
 91%|#########1|  : 936/1023 [00:22<00:02,   40.99it/s]
 92%|#########1|  : 938/1023 [00:22<00:02,   41.89it/s]
 92%|#########1|  : 939/1023 [00:22<00:02,   41.27it/s]
 92%|#########1|  : 941/1023 [00:22<00:01,   42.17it/s]
 92%|#########2|  : 942/1023 [00:22<00:01,   41.53it/s]
 92%|#########2|  : 943/1023 [00:22<00:01,   40.94it/s]
 92%|#########2|  : 945/1023 [00:22<00:01,   41.85it/s]
 92%|#########2|  : 946/1023 [00:22<00:01,   41.23it/s]
 93%|#########2|  : 948/1023 [00:22<00:01,   42.12it/s]
 93%|#########2|  : 949/1023 [00:22<00:01,   41.50it/s]
 93%|#########2|  : 951/1023 [00:22<00:01,   42.38it/s]
 93%|#########3|  : 952/1023 [00:22<00:01,   41.74it/s]
 93%|#########3|  : 953/1023 [00:22<00:01,   41.13it/s]
 93%|#########3|  : 955/1023 [00:22<00:01,   42.03it/s]
 93%|#########3|  : 956/1023 [00:23<00:01,   41.40it/s]
 94%|#########3|  : 958/1023 [00:23<00:01,   42.29it/s]
 94%|#########3|  : 959/1023 [00:23<00:01,   41.66it/s]
 94%|#########3|  : 960/1023 [00:23<00:01,   41.05it/s]
 94%|#########4|  : 962/1023 [00:23<00:01,   41.95it/s]
 94%|#########4|  : 963/1023 [00:23<00:01,   41.34it/s]
 94%|#########4|  : 965/1023 [00:23<00:01,   42.22it/s]
 94%|#########4|  : 966/1023 [00:23<00:01,   41.59it/s]
 95%|#########4|  : 967/1023 [00:23<00:01,   40.99it/s]
 95%|#########4|  : 969/1023 [00:23<00:01,   41.90it/s]
 95%|#########4|  : 970/1023 [00:23<00:01,   41.28it/s]
 95%|#########5|  : 972/1023 [00:23<00:01,   42.17it/s]
 95%|#########5|  : 973/1023 [00:23<00:01,   41.54it/s]
 95%|#########5|  : 975/1023 [00:23<00:01,   42.43it/s]
 95%|#########5|  : 976/1023 [00:23<00:01,   41.78it/s]
 96%|#########5|  : 977/1023 [00:23<00:01,   41.17it/s]
 96%|#########5|  : 979/1023 [00:23<00:01,   42.07it/s]
 96%|#########5|  : 980/1023 [00:23<00:01,   41.44it/s]
 96%|#########5|  : 982/1023 [00:23<00:00,   42.33it/s]
 96%|#########6|  : 983/1023 [00:23<00:00,   41.69it/s]
 96%|#########6|  : 984/1023 [00:23<00:00,   41.08it/s]
 96%|#########6|  : 986/1023 [00:23<00:00,   41.99it/s]
 96%|#########6|  : 987/1023 [00:23<00:00,   41.37it/s]
 97%|#########6|  : 989/1023 [00:23<00:00,   42.25it/s]
 97%|#########6|  : 990/1023 [00:23<00:00,   41.62it/s]
 97%|#########6|  : 992/1023 [00:23<00:00,   42.49it/s]
 97%|#########7|  : 993/1023 [00:23<00:00,   41.84it/s]
 97%|#########7|  : 994/1023 [00:23<00:00,   41.22it/s]
 97%|#########7|  : 996/1023 [00:23<00:00,   42.11it/s]
 97%|#########7|  : 997/1023 [00:23<00:00,   41.48it/s]
 98%|#########7|  : 999/1023 [00:24<00:00,   42.36it/s]
 98%|#########7|  : 1000/1023 [00:24<00:00,   41.72it/s]
 98%|#########7|  : 1001/1023 [00:24<00:00,   41.12it/s]
 98%|#########8|  : 1003/1023 [00:24<00:00,   42.03it/s]
 98%|#########8|  : 1004/1023 [00:24<00:00,   41.40it/s]
 98%|#########8|  : 1006/1023 [00:24<00:00,   42.29it/s]
 98%|#########8|  : 1007/1023 [00:24<00:00,   41.66it/s]
 99%|#########8|  : 1008/1023 [00:24<00:00,   41.05it/s]
 99%|#########8|  : 1010/1023 [00:24<00:00,   41.96it/s]
 99%|#########8|  : 1011/1023 [00:24<00:00,   41.34it/s]
 99%|#########9|  : 1013/1023 [00:24<00:00,   42.22it/s]
 99%|#########9|  : 1014/1023 [00:24<00:00,   41.59it/s]
 99%|#########9|  : 1015/1023 [00:24<00:00,   40.99it/s]
 99%|#########9|  : 1017/1023 [00:24<00:00,   41.90it/s]
100%|#########9|  : 1018/1023 [00:24<00:00,   41.28it/s]
100%|#########9|  : 1020/1023 [00:24<00:00,   42.17it/s]
100%|#########9|  : 1021/1023 [00:24<00:00,   41.54it/s]
100%|#########9|  : 1022/1023 [00:24<00:00,   40.94it/s]
100%|##########|  : 1023/1023 [00:24<00:00,   41.58it/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]))
30 cluster ftest spatiotemporal

Out:

Visualizing clusters.

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

Estimated memory usage: 16 MB

Gallery generated by Sphinx-Gallery