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<00:34,   29.20it/s]
  0%|          |  : 2/1023 [00:00<00:34,   29.35it/s]
  0%|          |  : 3/1023 [00:00<00:34,   29.40it/s]
  0%|          |  : 5/1023 [00:00<00:27,   37.37it/s]
  1%|          |  : 6/1023 [00:00<00:28,   35.66it/s]
  1%|          |  : 7/1023 [00:00<00:29,   34.51it/s]
  1%|          |  : 9/1023 [00:00<00:26,   38.57it/s]
  1%|          |  : 10/1023 [00:00<00:27,   37.23it/s]
  1%|1         |  : 11/1023 [00:00<00:27,   36.19it/s]
  1%|1         |  : 13/1023 [00:00<00:25,   39.04it/s]
  1%|1         |  : 14/1023 [00:00<00:26,   37.94it/s]
  1%|1         |  : 15/1023 [00:00<00:27,   37.02it/s]
  2%|1         |  : 17/1023 [00:00<00:25,   39.29it/s]
  2%|1         |  : 18/1023 [00:00<00:26,   38.34it/s]
  2%|1         |  : 19/1023 [00:00<00:26,   37.52it/s]
  2%|2         |  : 21/1023 [00:00<00:25,   39.44it/s]
  2%|2         |  : 22/1023 [00:00<00:25,   38.59it/s]
  2%|2         |  : 23/1023 [00:00<00:26,   37.84it/s]
  2%|2         |  : 25/1023 [00:00<00:25,   39.54it/s]
  3%|2         |  : 26/1023 [00:00<00:25,   38.76it/s]
  3%|2         |  : 27/1023 [00:00<00:26,   38.07it/s]
  3%|2         |  : 29/1023 [00:00<00:25,   39.61it/s]
  3%|2         |  : 30/1023 [00:00<00:25,   38.88it/s]
  3%|3         |  : 31/1023 [00:00<00:25,   38.22it/s]
  3%|3         |  : 33/1023 [00:00<00:24,   39.66it/s]
  3%|3         |  : 34/1023 [00:00<00:25,   38.97it/s]
  3%|3         |  : 35/1023 [00:00<00:25,   38.35it/s]
  4%|3         |  : 37/1023 [00:00<00:24,   39.71it/s]
  4%|3         |  : 38/1023 [00:00<00:25,   39.05it/s]
  4%|3         |  : 39/1023 [00:01<00:25,   38.44it/s]
  4%|4         |  : 41/1023 [00:01<00:24,   39.74it/s]
  4%|4         |  : 42/1023 [00:01<00:25,   39.11it/s]
  4%|4         |  : 43/1023 [00:01<00:25,   38.52it/s]
  4%|4         |  : 45/1023 [00:01<00:24,   39.77it/s]
  4%|4         |  : 46/1023 [00:01<00:24,   39.15it/s]
  5%|4         |  : 47/1023 [00:01<00:25,   38.58it/s]
  5%|4         |  : 49/1023 [00:01<00:24,   39.79it/s]
  5%|4         |  : 50/1023 [00:01<00:24,   39.20it/s]
  5%|4         |  : 51/1023 [00:01<00:25,   38.64it/s]
  5%|5         |  : 53/1023 [00:01<00:24,   39.81it/s]
  5%|5         |  : 54/1023 [00:01<00:24,   39.22it/s]
  5%|5         |  : 55/1023 [00:01<00:25,   38.68it/s]
  6%|5         |  : 57/1023 [00:01<00:24,   39.82it/s]
  6%|5         |  : 58/1023 [00:01<00:24,   39.25it/s]
  6%|5         |  : 59/1023 [00:01<00:24,   38.70it/s]
  6%|5         |  : 61/1023 [00:01<00:24,   39.83it/s]
  6%|6         |  : 62/1023 [00:01<00:24,   39.26it/s]
  6%|6         |  : 63/1023 [00:01<00:24,   38.73it/s]
  6%|6         |  : 65/1023 [00:01<00:24,   39.84it/s]
  6%|6         |  : 66/1023 [00:01<00:24,   39.28it/s]
  7%|6         |  : 67/1023 [00:01<00:24,   38.75it/s]
  7%|6         |  : 69/1023 [00:01<00:23,   39.83it/s]
  7%|6         |  : 70/1023 [00:01<00:24,   39.28it/s]
  7%|6         |  : 71/1023 [00:01<00:24,   38.75it/s]
  7%|7         |  : 73/1023 [00:01<00:23,   39.83it/s]
  7%|7         |  : 74/1023 [00:01<00:24,   39.29it/s]
  7%|7         |  : 75/1023 [00:01<00:24,   38.78it/s]
  8%|7         |  : 77/1023 [00:01<00:23,   39.85it/s]
  8%|7         |  : 78/1023 [00:01<00:24,   39.31it/s]
  8%|7         |  : 79/1023 [00:02<00:24,   38.79it/s]
  8%|7         |  : 81/1023 [00:02<00:23,   39.85it/s]
  8%|8         |  : 82/1023 [00:02<00:23,   39.31it/s]
  8%|8         |  : 84/1023 [00:02<00:23,   40.34it/s]
  8%|8         |  : 85/1023 [00:02<00:23,   39.78it/s]
  8%|8         |  : 86/1023 [00:02<00:23,   39.25it/s]
  9%|8         |  : 88/1023 [00:02<00:23,   40.27it/s]
  9%|8         |  : 89/1023 [00:02<00:23,   39.72it/s]
  9%|8         |  : 90/1023 [00:02<00:23,   39.19it/s]
  9%|8         |  : 92/1023 [00:02<00:23,   40.22it/s]
  9%|9         |  : 93/1023 [00:02<00:23,   39.67it/s]
  9%|9         |  : 95/1023 [00:02<00:22,   40.66it/s]
  9%|9         |  : 96/1023 [00:02<00:23,   40.09it/s]
  9%|9         |  : 97/1023 [00:02<00:23,   39.55it/s]
 10%|9         |  : 99/1023 [00:02<00:22,   40.55it/s]
 10%|9         |  : 100/1023 [00:02<00:23,   39.99it/s]
 10%|9         |  : 101/1023 [00:02<00:23,   39.45it/s]
 10%|#         |  : 103/1023 [00:02<00:22,   40.45it/s]
 10%|#         |  : 104/1023 [00:02<00:23,   39.90it/s]
 10%|#         |  : 105/1023 [00:02<00:23,   39.37it/s]
 10%|#         |  : 107/1023 [00:02<00:22,   40.38it/s]
 11%|#         |  : 108/1023 [00:02<00:22,   39.83it/s]
 11%|#         |  : 110/1023 [00:02<00:22,   40.81it/s]
 11%|#         |  : 111/1023 [00:02<00:22,   40.24it/s]
 11%|#         |  : 112/1023 [00:02<00:22,   39.69it/s]
 11%|#1        |  : 114/1023 [00:02<00:22,   40.68it/s]
 11%|#1        |  : 115/1023 [00:02<00:22,   40.12it/s]
 11%|#1        |  : 116/1023 [00:02<00:22,   39.58it/s]
 12%|#1        |  : 118/1023 [00:02<00:22,   40.57it/s]
 12%|#1        |  : 119/1023 [00:03<00:22,   40.01it/s]
 12%|#1        |  : 121/1023 [00:03<00:22,   40.97it/s]
 12%|#1        |  : 122/1023 [00:03<00:22,   40.40it/s]
 12%|#2        |  : 123/1023 [00:03<00:22,   39.85it/s]
 12%|#2        |  : 125/1023 [00:03<00:21,   40.82it/s]
 12%|#2        |  : 126/1023 [00:03<00:22,   40.25it/s]
 12%|#2        |  : 127/1023 [00:03<00:22,   39.71it/s]
 13%|#2        |  : 129/1023 [00:03<00:21,   40.69it/s]
 13%|#2        |  : 130/1023 [00:03<00:22,   40.12it/s]
 13%|#2        |  : 131/1023 [00:03<00:22,   39.59it/s]
 13%|#3        |  : 133/1023 [00:03<00:21,   40.57it/s]
 13%|#3        |  : 134/1023 [00:03<00:22,   40.02it/s]
 13%|#3        |  : 135/1023 [00:03<00:22,   39.49it/s]
 13%|#3        |  : 137/1023 [00:03<00:21,   40.48it/s]
 13%|#3        |  : 138/1023 [00:03<00:22,   39.92it/s]
 14%|#3        |  : 140/1023 [00:03<00:21,   40.89it/s]
 14%|#3        |  : 141/1023 [00:03<00:21,   40.32it/s]
 14%|#3        |  : 142/1023 [00:03<00:22,   39.78it/s]
 14%|#4        |  : 144/1023 [00:03<00:21,   40.75it/s]
 14%|#4        |  : 145/1023 [00:03<00:21,   40.18it/s]
 14%|#4        |  : 146/1023 [00:03<00:22,   39.65it/s]
 14%|#4        |  : 148/1023 [00:03<00:21,   40.63it/s]
 15%|#4        |  : 149/1023 [00:03<00:21,   40.07it/s]
 15%|#4        |  : 150/1023 [00:03<00:22,   39.54it/s]
 15%|#4        |  : 152/1023 [00:03<00:21,   40.52it/s]
 15%|#4        |  : 153/1023 [00:03<00:21,   39.97it/s]
 15%|#5        |  : 154/1023 [00:03<00:22,   39.45it/s]
 15%|#5        |  : 156/1023 [00:03<00:21,   40.43it/s]
 15%|#5        |  : 157/1023 [00:03<00:21,   39.88it/s]
 16%|#5        |  : 159/1023 [00:03<00:21,   40.84it/s]
 16%|#5        |  : 160/1023 [00:04<00:21,   40.28it/s]
 16%|#5        |  : 161/1023 [00:04<00:21,   39.74it/s]
 16%|#5        |  : 163/1023 [00:04<00:21,   40.71it/s]
 16%|#6        |  : 164/1023 [00:04<00:21,   40.15it/s]
 16%|#6        |  : 165/1023 [00:04<00:21,   39.62it/s]
 16%|#6        |  : 167/1023 [00:04<00:21,   40.59it/s]
 16%|#6        |  : 168/1023 [00:04<00:21,   40.04it/s]
 17%|#6        |  : 169/1023 [00:04<00:21,   39.51it/s]
 17%|#6        |  : 171/1023 [00:04<00:21,   40.49it/s]
 17%|#6        |  : 172/1023 [00:04<00:21,   39.95it/s]
 17%|#6        |  : 173/1023 [00:04<00:21,   39.43it/s]
 17%|#7        |  : 175/1023 [00:04<00:20,   40.42it/s]
 17%|#7        |  : 176/1023 [00:04<00:21,   39.87it/s]
 17%|#7        |  : 178/1023 [00:04<00:20,   40.83it/s]
 17%|#7        |  : 179/1023 [00:04<00:20,   40.27it/s]
 18%|#7        |  : 180/1023 [00:04<00:21,   39.73it/s]
 18%|#7        |  : 182/1023 [00:04<00:20,   40.70it/s]
 18%|#7        |  : 183/1023 [00:04<00:20,   40.14it/s]
 18%|#7        |  : 184/1023 [00:04<00:21,   39.61it/s]
 18%|#8        |  : 186/1023 [00:04<00:20,   40.58it/s]
 18%|#8        |  : 187/1023 [00:04<00:20,   40.03it/s]
 18%|#8        |  : 188/1023 [00:04<00:21,   39.51it/s]
 19%|#8        |  : 190/1023 [00:04<00:20,   40.49it/s]
 19%|#8        |  : 191/1023 [00:04<00:20,   39.94it/s]
 19%|#8        |  : 193/1023 [00:04<00:20,   40.91it/s]
 19%|#8        |  : 194/1023 [00:04<00:20,   40.34it/s]
 19%|#9        |  : 195/1023 [00:04<00:20,   39.80it/s]
 19%|#9        |  : 197/1023 [00:04<00:20,   40.76it/s]
 19%|#9        |  : 198/1023 [00:04<00:20,   40.20it/s]
 19%|#9        |  : 199/1023 [00:05<00:20,   39.67it/s]
 20%|#9        |  : 201/1023 [00:05<00:20,   40.64it/s]
 20%|#9        |  : 202/1023 [00:05<00:20,   40.09it/s]
 20%|#9        |  : 203/1023 [00:05<00:20,   39.56it/s]
 20%|##        |  : 205/1023 [00:05<00:20,   40.54it/s]
 20%|##        |  : 206/1023 [00:05<00:20,   39.99it/s]
 20%|##        |  : 207/1023 [00:05<00:20,   39.47it/s]
 20%|##        |  : 209/1023 [00:05<00:20,   40.44it/s]
 21%|##        |  : 210/1023 [00:05<00:20,   39.90it/s]
 21%|##        |  : 211/1023 [00:05<00:20,   39.38it/s]
 21%|##        |  : 213/1023 [00:05<00:20,   40.37it/s]
 21%|##        |  : 214/1023 [00:05<00:20,   39.83it/s]
 21%|##1       |  : 215/1023 [00:05<00:20,   39.31it/s]
 21%|##1       |  : 217/1023 [00:05<00:19,   40.30it/s]
 21%|##1       |  : 218/1023 [00:05<00:20,   39.76it/s]
 22%|##1       |  : 220/1023 [00:05<00:19,   40.73it/s]
 22%|##1       |  : 221/1023 [00:05<00:19,   40.17it/s]
 22%|##1       |  : 222/1023 [00:05<00:20,   39.64it/s]
 22%|##1       |  : 224/1023 [00:05<00:19,   40.61it/s]
 22%|##1       |  : 225/1023 [00:05<00:19,   40.06it/s]
 22%|##2       |  : 226/1023 [00:05<00:20,   39.53it/s]
 22%|##2       |  : 228/1023 [00:05<00:19,   40.51it/s]
 22%|##2       |  : 229/1023 [00:05<00:19,   39.96it/s]
 22%|##2       |  : 230/1023 [00:05<00:20,   39.44it/s]
 23%|##2       |  : 232/1023 [00:05<00:19,   40.42it/s]
 23%|##2       |  : 233/1023 [00:05<00:19,   39.87it/s]
 23%|##2       |  : 234/1023 [00:05<00:20,   39.35it/s]
 23%|##3       |  : 236/1023 [00:05<00:19,   40.34it/s]
 23%|##3       |  : 237/1023 [00:05<00:19,   39.80it/s]
 23%|##3       |  : 239/1023 [00:05<00:19,   40.76it/s]
 23%|##3       |  : 240/1023 [00:06<00:19,   40.21it/s]
 24%|##3       |  : 241/1023 [00:06<00:19,   39.68it/s]
 24%|##3       |  : 243/1023 [00:06<00:19,   40.64it/s]
 24%|##3       |  : 244/1023 [00:06<00:19,   40.09it/s]
 24%|##3       |  : 245/1023 [00:06<00:19,   39.56it/s]
 24%|##4       |  : 247/1023 [00:06<00:19,   40.53it/s]
 24%|##4       |  : 248/1023 [00:06<00:19,   39.98it/s]
 24%|##4       |  : 249/1023 [00:06<00:19,   39.46it/s]
 25%|##4       |  : 251/1023 [00:06<00:19,   40.45it/s]
 25%|##4       |  : 252/1023 [00:06<00:19,   39.90it/s]
 25%|##4       |  : 254/1023 [00:06<00:18,   40.86it/s]
 25%|##4       |  : 255/1023 [00:06<00:19,   40.29it/s]
 25%|##5       |  : 256/1023 [00:06<00:19,   39.75it/s]
 25%|##5       |  : 258/1023 [00:06<00:18,   40.72it/s]
 25%|##5       |  : 259/1023 [00:06<00:19,   40.16it/s]
 25%|##5       |  : 260/1023 [00:06<00:19,   39.63it/s]
 26%|##5       |  : 262/1023 [00:06<00:18,   40.60it/s]
 26%|##5       |  : 263/1023 [00:06<00:18,   40.05it/s]
 26%|##5       |  : 264/1023 [00:06<00:19,   39.53it/s]
 26%|##6       |  : 266/1023 [00:06<00:18,   40.51it/s]
 26%|##6       |  : 267/1023 [00:06<00:18,   39.96it/s]
 26%|##6       |  : 269/1023 [00:06<00:18,   40.92it/s]
 26%|##6       |  : 270/1023 [00:06<00:18,   40.35it/s]
 26%|##6       |  : 271/1023 [00:06<00:18,   39.81it/s]
 27%|##6       |  : 273/1023 [00:06<00:18,   40.77it/s]
 27%|##6       |  : 274/1023 [00:06<00:18,   40.21it/s]
 27%|##6       |  : 275/1023 [00:06<00:18,   39.68it/s]
 27%|##7       |  : 277/1023 [00:06<00:18,   40.65it/s]
 27%|##7       |  : 278/1023 [00:06<00:18,   40.09it/s]
 27%|##7       |  : 279/1023 [00:07<00:18,   39.56it/s]
 27%|##7       |  : 281/1023 [00:07<00:18,   40.54it/s]
 28%|##7       |  : 282/1023 [00:07<00:18,   39.99it/s]
 28%|##7       |  : 284/1023 [00:07<00:18,   40.95it/s]
 28%|##7       |  : 285/1023 [00:07<00:18,   40.38it/s]
 28%|##7       |  : 286/1023 [00:07<00:18,   39.84it/s]
 28%|##8       |  : 288/1023 [00:07<00:18,   40.80it/s]
 28%|##8       |  : 289/1023 [00:07<00:18,   40.24it/s]
 28%|##8       |  : 290/1023 [00:07<00:18,   39.62it/s]
 29%|##8       |  : 292/1023 [00:07<00:18,   40.59it/s]
 29%|##8       |  : 293/1023 [00:07<00:18,   40.04it/s]
 29%|##8       |  : 294/1023 [00:07<00:18,   39.51it/s]
 29%|##8       |  : 296/1023 [00:07<00:17,   40.49it/s]
 29%|##9       |  : 297/1023 [00:07<00:18,   39.94it/s]
 29%|##9       |  : 299/1023 [00:07<00:17,   40.90it/s]
 29%|##9       |  : 300/1023 [00:07<00:17,   40.34it/s]
 29%|##9       |  : 301/1023 [00:07<00:18,   39.80it/s]
 30%|##9       |  : 303/1023 [00:07<00:17,   40.77it/s]
 30%|##9       |  : 304/1023 [00:07<00:17,   40.21it/s]
 30%|##9       |  : 305/1023 [00:07<00:18,   39.68it/s]
 30%|###       |  : 307/1023 [00:07<00:17,   40.65it/s]
 30%|###       |  : 308/1023 [00:07<00:17,   40.10it/s]
 30%|###       |  : 309/1023 [00:07<00:18,   39.57it/s]
 30%|###       |  : 311/1023 [00:07<00:17,   40.54it/s]
 30%|###       |  : 312/1023 [00:07<00:17,   39.99it/s]
 31%|###       |  : 313/1023 [00:07<00:17,   39.47it/s]
 31%|###       |  : 315/1023 [00:07<00:17,   40.45it/s]
 31%|###       |  : 316/1023 [00:07<00:17,   39.91it/s]
 31%|###1      |  : 318/1023 [00:07<00:17,   40.87it/s]
 31%|###1      |  : 319/1023 [00:07<00:17,   40.31it/s]
 31%|###1      |  : 320/1023 [00:08<00:17,   39.78it/s]
 31%|###1      |  : 322/1023 [00:08<00:17,   40.75it/s]
 32%|###1      |  : 323/1023 [00:08<00:17,   40.19it/s]
 32%|###1      |  : 324/1023 [00:08<00:17,   39.65it/s]
 32%|###1      |  : 326/1023 [00:08<00:17,   40.63it/s]
 32%|###1      |  : 327/1023 [00:08<00:17,   40.08it/s]
 32%|###2      |  : 328/1023 [00:08<00:17,   39.54it/s]
 32%|###2      |  : 330/1023 [00:08<00:17,   40.52it/s]
 32%|###2      |  : 331/1023 [00:08<00:17,   39.97it/s]
 33%|###2      |  : 333/1023 [00:08<00:16,   40.93it/s]
 33%|###2      |  : 334/1023 [00:08<00:17,   40.37it/s]
 33%|###2      |  : 335/1023 [00:08<00:17,   39.82it/s]
 33%|###2      |  : 337/1023 [00:08<00:16,   40.79it/s]
 33%|###3      |  : 338/1023 [00:08<00:17,   40.22it/s]
 33%|###3      |  : 339/1023 [00:08<00:17,   39.69it/s]
 33%|###3      |  : 341/1023 [00:08<00:16,   40.66it/s]
 33%|###3      |  : 342/1023 [00:08<00:16,   40.10it/s]
 34%|###3      |  : 344/1023 [00:08<00:16,   41.06it/s]
 34%|###3      |  : 345/1023 [00:08<00:16,   40.48it/s]
 34%|###3      |  : 346/1023 [00:08<00:16,   39.93it/s]
 34%|###4      |  : 348/1023 [00:08<00:16,   40.89it/s]
 34%|###4      |  : 349/1023 [00:08<00:16,   40.32it/s]
 34%|###4      |  : 350/1023 [00:08<00:16,   39.78it/s]
 34%|###4      |  : 352/1023 [00:08<00:16,   40.75it/s]
 35%|###4      |  : 353/1023 [00:08<00:16,   40.19it/s]
 35%|###4      |  : 355/1023 [00:08<00:16,   41.14it/s]
 35%|###4      |  : 356/1023 [00:08<00:16,   40.55it/s]
 35%|###4      |  : 357/1023 [00:08<00:16,   40.01it/s]
 35%|###5      |  : 359/1023 [00:08<00:16,   40.96it/s]
 35%|###5      |  : 360/1023 [00:09<00:16,   40.39it/s]
 35%|###5      |  : 362/1023 [00:09<00:15,   41.32it/s]
 35%|###5      |  : 363/1023 [00:09<00:16,   40.73it/s]
 36%|###5      |  : 364/1023 [00:09<00:16,   40.17it/s]
 36%|###5      |  : 366/1023 [00:09<00:15,   41.12it/s]
 36%|###5      |  : 367/1023 [00:09<00:16,   40.54it/s]
 36%|###5      |  : 368/1023 [00:09<00:16,   40.00it/s]
 36%|###6      |  : 370/1023 [00:09<00:15,   40.95it/s]
 36%|###6      |  : 371/1023 [00:09<00:16,   40.38it/s]
 36%|###6      |  : 373/1023 [00:09<00:15,   41.32it/s]
 37%|###6      |  : 374/1023 [00:09<00:15,   40.73it/s]
 37%|###6      |  : 375/1023 [00:09<00:16,   40.17it/s]
 37%|###6      |  : 377/1023 [00:09<00:15,   41.12it/s]
 37%|###6      |  : 378/1023 [00:09<00:15,   40.54it/s]
 37%|###7      |  : 379/1023 [00:09<00:16,   39.99it/s]
 37%|###7      |  : 381/1023 [00:09<00:15,   40.95it/s]
 37%|###7      |  : 382/1023 [00:09<00:15,   40.37it/s]
 38%|###7      |  : 384/1023 [00:09<00:15,   41.31it/s]
 38%|###7      |  : 385/1023 [00:09<00:15,   40.72it/s]
 38%|###7      |  : 386/1023 [00:09<00:15,   40.16it/s]
 38%|###7      |  : 388/1023 [00:09<00:15,   41.11it/s]
 38%|###8      |  : 389/1023 [00:09<00:15,   40.53it/s]
 38%|###8      |  : 390/1023 [00:09<00:15,   39.98it/s]
 38%|###8      |  : 392/1023 [00:09<00:15,   40.94it/s]
 38%|###8      |  : 393/1023 [00:09<00:15,   40.37it/s]
 39%|###8      |  : 395/1023 [00:09<00:15,   41.31it/s]
 39%|###8      |  : 396/1023 [00:09<00:15,   40.72it/s]
 39%|###8      |  : 397/1023 [00:09<00:15,   40.16it/s]
 39%|###9      |  : 399/1023 [00:09<00:15,   41.11it/s]
 39%|###9      |  : 400/1023 [00:09<00:15,   40.53it/s]
 39%|###9      |  : 401/1023 [00:10<00:15,   39.98it/s]
 39%|###9      |  : 403/1023 [00:10<00:15,   40.93it/s]
 39%|###9      |  : 404/1023 [00:10<00:15,   40.36it/s]
 40%|###9      |  : 406/1023 [00:10<00:14,   41.30it/s]
 40%|###9      |  : 407/1023 [00:10<00:15,   40.71it/s]
 40%|###9      |  : 408/1023 [00:10<00:15,   40.16it/s]
 40%|####      |  : 410/1023 [00:10<00:14,   41.10it/s]
 40%|####      |  : 411/1023 [00:10<00:15,   40.52it/s]
 40%|####      |  : 413/1023 [00:10<00:14,   41.45it/s]
 40%|####      |  : 414/1023 [00:10<00:14,   40.86it/s]
 41%|####      |  : 415/1023 [00:10<00:15,   40.29it/s]
 41%|####      |  : 417/1023 [00:10<00:14,   41.23it/s]
 41%|####      |  : 418/1023 [00:10<00:14,   40.64it/s]
 41%|####      |  : 419/1023 [00:10<00:15,   40.09it/s]
 41%|####1     |  : 421/1023 [00:10<00:14,   41.04it/s]
 41%|####1     |  : 422/1023 [00:10<00:14,   40.47it/s]
 41%|####1     |  : 424/1023 [00:10<00:14,   41.40it/s]
 42%|####1     |  : 425/1023 [00:10<00:14,   40.80it/s]
 42%|####1     |  : 426/1023 [00:10<00:14,   40.24it/s]
 42%|####1     |  : 428/1023 [00:10<00:14,   41.18it/s]
 42%|####1     |  : 429/1023 [00:10<00:14,   40.60it/s]
 42%|####2     |  : 431/1023 [00:10<00:14,   41.52it/s]
 42%|####2     |  : 432/1023 [00:10<00:14,   40.93it/s]
 42%|####2     |  : 433/1023 [00:10<00:14,   40.36it/s]
 43%|####2     |  : 435/1023 [00:10<00:14,   41.30it/s]
 43%|####2     |  : 436/1023 [00:10<00:14,   40.71it/s]
 43%|####2     |  : 437/1023 [00:10<00:14,   40.15it/s]
 43%|####2     |  : 439/1023 [00:10<00:14,   41.10it/s]
 43%|####3     |  : 440/1023 [00:10<00:14,   40.52it/s]
 43%|####3     |  : 442/1023 [00:11<00:14,   41.45it/s]
 43%|####3     |  : 443/1023 [00:11<00:14,   40.85it/s]
 43%|####3     |  : 444/1023 [00:11<00:14,   40.29it/s]
 44%|####3     |  : 446/1023 [00:11<00:13,   41.23it/s]
 44%|####3     |  : 447/1023 [00:11<00:14,   40.64it/s]
 44%|####3     |  : 448/1023 [00:11<00:14,   40.09it/s]
 44%|####3     |  : 450/1023 [00:11<00:13,   41.04it/s]
 44%|####4     |  : 451/1023 [00:11<00:14,   40.47it/s]
 44%|####4     |  : 453/1023 [00:11<00:13,   41.40it/s]
 44%|####4     |  : 454/1023 [00:11<00:13,   40.80it/s]
 44%|####4     |  : 455/1023 [00:11<00:14,   40.24it/s]
 45%|####4     |  : 457/1023 [00:11<00:13,   41.18it/s]
 45%|####4     |  : 458/1023 [00:11<00:13,   40.60it/s]
 45%|####4     |  : 460/1023 [00:11<00:13,   41.53it/s]
 45%|####5     |  : 461/1023 [00:11<00:13,   40.93it/s]
 45%|####5     |  : 462/1023 [00:11<00:13,   40.36it/s]
 45%|####5     |  : 464/1023 [00:11<00:13,   41.30it/s]
 45%|####5     |  : 465/1023 [00:11<00:13,   40.71it/s]
 46%|####5     |  : 466/1023 [00:11<00:13,   40.15it/s]
 46%|####5     |  : 468/1023 [00:11<00:13,   41.10it/s]
 46%|####5     |  : 469/1023 [00:11<00:13,   40.52it/s]
 46%|####6     |  : 471/1023 [00:11<00:13,   41.46it/s]
 46%|####6     |  : 472/1023 [00:11<00:13,   40.86it/s]
 46%|####6     |  : 473/1023 [00:11<00:13,   40.29it/s]
 46%|####6     |  : 475/1023 [00:11<00:13,   41.23it/s]
 47%|####6     |  : 476/1023 [00:11<00:13,   40.65it/s]
 47%|####6     |  : 477/1023 [00:11<00:13,   40.10it/s]
 47%|####6     |  : 479/1023 [00:11<00:13,   41.04it/s]
 47%|####6     |  : 480/1023 [00:11<00:13,   40.47it/s]
 47%|####7     |  : 481/1023 [00:11<00:13,   39.92it/s]
 47%|####7     |  : 483/1023 [00:12<00:13,   40.87it/s]
 47%|####7     |  : 484/1023 [00:12<00:13,   40.31it/s]
 48%|####7     |  : 486/1023 [00:12<00:13,   41.25it/s]
 48%|####7     |  : 487/1023 [00:12<00:13,   40.66it/s]
 48%|####7     |  : 488/1023 [00:12<00:13,   40.11it/s]
 48%|####7     |  : 490/1023 [00:12<00:12,   41.05it/s]
 48%|####7     |  : 491/1023 [00:12<00:13,   40.47it/s]
 48%|####8     |  : 492/1023 [00:12<00:13,   39.93it/s]
 48%|####8     |  : 494/1023 [00:12<00:12,   40.89it/s]
 48%|####8     |  : 495/1023 [00:12<00:13,   40.32it/s]
 49%|####8     |  : 497/1023 [00:12<00:12,   41.26it/s]
 49%|####8     |  : 498/1023 [00:12<00:12,   40.67it/s]
 49%|####8     |  : 499/1023 [00:12<00:13,   40.12it/s]
 49%|####8     |  : 501/1023 [00:12<00:12,   41.06it/s]
 49%|####9     |  : 502/1023 [00:12<00:12,   40.49it/s]
 49%|####9     |  : 504/1023 [00:12<00:12,   41.42it/s]
 49%|####9     |  : 505/1023 [00:12<00:12,   40.82it/s]
 49%|####9     |  : 506/1023 [00:12<00:12,   40.26it/s]
 50%|####9     |  : 508/1023 [00:12<00:12,   41.20it/s]
 50%|####9     |  : 509/1023 [00:12<00:12,   40.62it/s]
 50%|####9     |  : 510/1023 [00:12<00:12,   40.06it/s]
 50%|#####     |  : 512/1023 [00:12<00:12,   41.01it/s]
 50%|#####     |  : 513/1023 [00:12<00:12,   40.44it/s]
 50%|#####     |  : 514/1023 [00:12<00:12,   39.89it/s]
 50%|#####     |  : 516/1023 [00:12<00:12,   40.85it/s]
 51%|#####     |  : 517/1023 [00:12<00:12,   40.28it/s]
 51%|#####     |  : 519/1023 [00:12<00:12,   41.22it/s]
 51%|#####     |  : 520/1023 [00:12<00:12,   40.64it/s]
 51%|#####     |  : 521/1023 [00:12<00:12,   40.08it/s]
 51%|#####1    |  : 523/1023 [00:13<00:12,   41.03it/s]
 51%|#####1    |  : 524/1023 [00:13<00:12,   40.45it/s]
 51%|#####1    |  : 525/1023 [00:13<00:12,   39.91it/s]
 52%|#####1    |  : 527/1023 [00:13<00:12,   40.87it/s]
 52%|#####1    |  : 528/1023 [00:13<00:12,   40.30it/s]
 52%|#####1    |  : 530/1023 [00:13<00:11,   41.24it/s]
 52%|#####1    |  : 531/1023 [00:13<00:12,   40.66it/s]
 52%|#####2    |  : 532/1023 [00:13<00:12,   40.10it/s]
 52%|#####2    |  : 534/1023 [00:13<00:11,   41.05it/s]
 52%|#####2    |  : 535/1023 [00:13<00:12,   40.47it/s]
 52%|#####2    |  : 537/1023 [00:13<00:11,   41.40it/s]
 53%|#####2    |  : 538/1023 [00:13<00:11,   40.81it/s]
 53%|#####2    |  : 539/1023 [00:13<00:12,   40.25it/s]
 53%|#####2    |  : 541/1023 [00:13<00:11,   41.19it/s]
 53%|#####2    |  : 542/1023 [00:13<00:11,   40.61it/s]
 53%|#####3    |  : 543/1023 [00:13<00:11,   40.05it/s]
 53%|#####3    |  : 545/1023 [00:13<00:11,   41.00it/s]
 53%|#####3    |  : 546/1023 [00:13<00:11,   40.43it/s]
 54%|#####3    |  : 548/1023 [00:13<00:11,   41.36it/s]
 54%|#####3    |  : 549/1023 [00:13<00:11,   40.77it/s]
 54%|#####3    |  : 550/1023 [00:13<00:11,   40.21it/s]
 54%|#####3    |  : 552/1023 [00:13<00:11,   41.15it/s]
 54%|#####4    |  : 553/1023 [00:13<00:11,   40.57it/s]
 54%|#####4    |  : 554/1023 [00:13<00:11,   40.02it/s]
 54%|#####4    |  : 556/1023 [00:13<00:11,   40.97it/s]
 54%|#####4    |  : 557/1023 [00:13<00:11,   40.40it/s]
 55%|#####4    |  : 558/1023 [00:13<00:11,   39.85it/s]
 55%|#####4    |  : 560/1023 [00:13<00:11,   40.82it/s]
 55%|#####4    |  : 561/1023 [00:13<00:11,   40.25it/s]
 55%|#####5    |  : 563/1023 [00:13<00:11,   41.20it/s]
 55%|#####5    |  : 564/1023 [00:14<00:11,   40.61it/s]
 55%|#####5    |  : 565/1023 [00:14<00:11,   40.06it/s]
 55%|#####5    |  : 567/1023 [00:14<00:11,   41.01it/s]
 56%|#####5    |  : 568/1023 [00:14<00:11,   40.44it/s]
 56%|#####5    |  : 569/1023 [00:14<00:11,   39.89it/s]
 56%|#####5    |  : 571/1023 [00:14<00:11,   40.85it/s]
 56%|#####5    |  : 572/1023 [00:14<00:11,   40.28it/s]
 56%|#####6    |  : 573/1023 [00:14<00:11,   39.75it/s]
 56%|#####6    |  : 575/1023 [00:14<00:11,   40.71it/s]
 56%|#####6    |  : 576/1023 [00:14<00:11,   40.15it/s]
 56%|#####6    |  : 577/1023 [00:14<00:11,   39.62it/s]
 57%|#####6    |  : 579/1023 [00:14<00:10,   40.60it/s]
 57%|#####6    |  : 580/1023 [00:14<00:11,   40.04it/s]
 57%|#####6    |  : 582/1023 [00:14<00:10,   40.99it/s]
 57%|#####6    |  : 583/1023 [00:14<00:10,   40.42it/s]
 57%|#####7    |  : 584/1023 [00:14<00:11,   39.88it/s]
 57%|#####7    |  : 586/1023 [00:14<00:10,   40.84it/s]
 57%|#####7    |  : 587/1023 [00:14<00:10,   40.27it/s]
 57%|#####7    |  : 588/1023 [00:14<00:10,   39.74it/s]
 58%|#####7    |  : 590/1023 [00:14<00:10,   40.70it/s]
 58%|#####7    |  : 591/1023 [00:14<00:10,   40.15it/s]
 58%|#####7    |  : 592/1023 [00:14<00:10,   39.61it/s]
 58%|#####8    |  : 594/1023 [00:14<00:10,   40.59it/s]
 58%|#####8    |  : 595/1023 [00:14<00:10,   40.03it/s]
 58%|#####8    |  : 596/1023 [00:14<00:10,   39.50it/s]
 58%|#####8    |  : 598/1023 [00:14<00:10,   40.48it/s]
 59%|#####8    |  : 599/1023 [00:14<00:10,   39.93it/s]
 59%|#####8    |  : 601/1023 [00:14<00:10,   40.89it/s]
 59%|#####8    |  : 602/1023 [00:14<00:10,   40.33it/s]
 59%|#####8    |  : 603/1023 [00:14<00:10,   39.79it/s]
 59%|#####9    |  : 605/1023 [00:15<00:10,   40.75it/s]
 59%|#####9    |  : 606/1023 [00:15<00:10,   40.19it/s]
 59%|#####9    |  : 607/1023 [00:15<00:10,   39.66it/s]
 60%|#####9    |  : 609/1023 [00:15<00:10,   40.63it/s]
 60%|#####9    |  : 610/1023 [00:15<00:10,   40.07it/s]
 60%|#####9    |  : 611/1023 [00:15<00:10,   39.54it/s]
 60%|#####9    |  : 613/1023 [00:15<00:10,   40.52it/s]
 60%|######    |  : 614/1023 [00:15<00:10,   39.97it/s]
 60%|######    |  : 615/1023 [00:15<00:10,   39.45it/s]
 60%|######    |  : 617/1023 [00:15<00:10,   40.43it/s]
 60%|######    |  : 618/1023 [00:15<00:10,   39.88it/s]
 61%|######    |  : 620/1023 [00:15<00:09,   40.85it/s]
 61%|######    |  : 621/1023 [00:15<00:09,   40.28it/s]
 61%|######    |  : 622/1023 [00:15<00:10,   39.75it/s]
 61%|######    |  : 624/1023 [00:15<00:09,   40.72it/s]
 61%|######1   |  : 625/1023 [00:15<00:09,   40.16it/s]
 61%|######1   |  : 626/1023 [00:15<00:10,   39.63it/s]
 61%|######1   |  : 628/1023 [00:15<00:09,   40.60it/s]
 61%|######1   |  : 629/1023 [00:15<00:09,   40.05it/s]
 62%|######1   |  : 630/1023 [00:15<00:09,   39.52it/s]
 62%|######1   |  : 632/1023 [00:15<00:09,   40.50it/s]
 62%|######1   |  : 633/1023 [00:15<00:09,   39.95it/s]
 62%|######1   |  : 634/1023 [00:15<00:09,   39.43it/s]
 62%|######2   |  : 636/1023 [00:15<00:09,   40.42it/s]
 62%|######2   |  : 637/1023 [00:15<00:09,   39.88it/s]
 62%|######2   |  : 638/1023 [00:15<00:09,   39.36it/s]
 63%|######2   |  : 640/1023 [00:15<00:09,   40.35it/s]
 63%|######2   |  : 641/1023 [00:15<00:09,   39.81it/s]
 63%|######2   |  : 642/1023 [00:15<00:09,   39.30it/s]
 63%|######2   |  : 644/1023 [00:16<00:09,   40.29it/s]
 63%|######3   |  : 645/1023 [00:16<00:09,   39.75it/s]
 63%|######3   |  : 646/1023 [00:16<00:09,   39.24it/s]
 63%|######3   |  : 647/1023 [00:16<00:09,   38.76it/s]
 63%|######3   |  : 649/1023 [00:16<00:09,   39.78it/s]
 64%|######3   |  : 650/1023 [00:16<00:09,   39.27it/s]
 64%|######3   |  : 651/1023 [00:16<00:09,   38.78it/s]
 64%|######3   |  : 653/1023 [00:16<00:09,   39.80it/s]
 64%|######3   |  : 654/1023 [00:16<00:09,   39.29it/s]
 64%|######4   |  : 656/1023 [00:16<00:09,   40.29it/s]
 64%|######4   |  : 657/1023 [00:16<00:09,   39.75it/s]
 64%|######4   |  : 658/1023 [00:16<00:09,   39.24it/s]
 65%|######4   |  : 660/1023 [00:16<00:09,   40.23it/s]
 65%|######4   |  : 661/1023 [00:16<00:09,   39.70it/s]
 65%|######4   |  : 662/1023 [00:16<00:09,   39.19it/s]
 65%|######4   |  : 664/1023 [00:16<00:08,   40.18it/s]
 65%|######5   |  : 665/1023 [00:16<00:09,   39.65it/s]
 65%|######5   |  : 666/1023 [00:16<00:09,   39.14it/s]
 65%|######5   |  : 668/1023 [00:16<00:08,   40.14it/s]
 65%|######5   |  : 669/1023 [00:16<00:08,   39.61it/s]
 66%|######5   |  : 671/1023 [00:16<00:08,   40.59it/s]
 66%|######5   |  : 672/1023 [00:16<00:08,   40.03it/s]
 66%|######5   |  : 673/1023 [00:16<00:08,   39.51it/s]
 66%|######5   |  : 675/1023 [00:16<00:08,   40.49it/s]
 66%|######6   |  : 676/1023 [00:16<00:08,   39.93it/s]
 66%|######6   |  : 677/1023 [00:16<00:08,   39.42it/s]
 66%|######6   |  : 679/1023 [00:16<00:08,   40.40it/s]
 66%|######6   |  : 680/1023 [00:16<00:08,   39.85it/s]
 67%|######6   |  : 681/1023 [00:16<00:08,   39.34it/s]
 67%|######6   |  : 683/1023 [00:16<00:08,   40.32it/s]
 67%|######6   |  : 684/1023 [00:17<00:08,   39.78it/s]
 67%|######7   |  : 686/1023 [00:17<00:08,   40.75it/s]
 67%|######7   |  : 687/1023 [00:17<00:08,   40.19it/s]
 67%|######7   |  : 688/1023 [00:17<00:08,   39.66it/s]
 67%|######7   |  : 690/1023 [00:17<00:08,   40.63it/s]
 68%|######7   |  : 691/1023 [00:17<00:08,   40.08it/s]
 68%|######7   |  : 692/1023 [00:17<00:08,   39.55it/s]
 68%|######7   |  : 694/1023 [00:17<00:08,   40.53it/s]
 68%|######7   |  : 695/1023 [00:17<00:08,   39.98it/s]
 68%|######8   |  : 696/1023 [00:17<00:08,   39.46it/s]
 68%|######8   |  : 698/1023 [00:17<00:08,   40.44it/s]
 68%|######8   |  : 699/1023 [00:17<00:08,   39.89it/s]
 69%|######8   |  : 701/1023 [00:17<00:07,   40.85it/s]
 69%|######8   |  : 702/1023 [00:17<00:07,   40.29it/s]
 69%|######8   |  : 703/1023 [00:17<00:08,   39.76it/s]
 69%|######8   |  : 705/1023 [00:17<00:07,   40.72it/s]
 69%|######9   |  : 706/1023 [00:17<00:07,   40.17it/s]
 69%|######9   |  : 707/1023 [00:17<00:07,   39.64it/s]
 69%|######9   |  : 709/1023 [00:17<00:07,   40.61it/s]
 69%|######9   |  : 710/1023 [00:17<00:07,   40.07it/s]
 70%|######9   |  : 711/1023 [00:17<00:07,   39.54it/s]
 70%|######9   |  : 713/1023 [00:17<00:07,   40.52it/s]
 70%|######9   |  : 714/1023 [00:17<00:07,   39.97it/s]
 70%|######9   |  : 715/1023 [00:17<00:07,   39.46it/s]
 70%|#######   |  : 717/1023 [00:17<00:07,   40.44it/s]
 70%|#######   |  : 718/1023 [00:17<00:07,   39.90it/s]
 70%|#######   |  : 720/1023 [00:17<00:07,   40.86it/s]
 70%|#######   |  : 721/1023 [00:17<00:07,   40.29it/s]
 71%|#######   |  : 722/1023 [00:17<00:07,   39.76it/s]
 71%|#######   |  : 724/1023 [00:18<00:07,   40.73it/s]
 71%|#######   |  : 725/1023 [00:18<00:07,   40.17it/s]
 71%|#######   |  : 726/1023 [00:18<00:07,   39.64it/s]
 71%|#######1  |  : 728/1023 [00:18<00:07,   40.61it/s]
 71%|#######1  |  : 729/1023 [00:18<00:07,   40.05it/s]
 71%|#######1  |  : 730/1023 [00:18<00:07,   39.53it/s]
 72%|#######1  |  : 732/1023 [00:18<00:07,   40.51it/s]
 72%|#######1  |  : 733/1023 [00:18<00:07,   39.97it/s]
 72%|#######1  |  : 734/1023 [00:18<00:07,   39.45it/s]
 72%|#######1  |  : 736/1023 [00:18<00:07,   40.43it/s]
 72%|#######2  |  : 737/1023 [00:18<00:07,   39.89it/s]
 72%|#######2  |  : 738/1023 [00:18<00:07,   39.37it/s]
 72%|#######2  |  : 740/1023 [00:18<00:07,   40.35it/s]
 72%|#######2  |  : 741/1023 [00:18<00:07,   39.81it/s]
 73%|#######2  |  : 742/1023 [00:18<00:07,   39.29it/s]
 73%|#######2  |  : 744/1023 [00:18<00:06,   40.28it/s]
 73%|#######2  |  : 745/1023 [00:18<00:06,   39.74it/s]
 73%|#######3  |  : 747/1023 [00:18<00:06,   40.71it/s]
 73%|#######3  |  : 748/1023 [00:18<00:06,   40.15it/s]
 73%|#######3  |  : 749/1023 [00:18<00:06,   39.62it/s]
 73%|#######3  |  : 751/1023 [00:18<00:06,   40.59it/s]
 74%|#######3  |  : 752/1023 [00:18<00:06,   40.04it/s]
 74%|#######3  |  : 753/1023 [00:18<00:06,   39.52it/s]
 74%|#######3  |  : 755/1023 [00:18<00:06,   40.50it/s]
 74%|#######3  |  : 756/1023 [00:18<00:06,   39.95it/s]
 74%|#######4  |  : 758/1023 [00:18<00:06,   40.91it/s]
 74%|#######4  |  : 759/1023 [00:18<00:06,   40.34it/s]
 74%|#######4  |  : 760/1023 [00:18<00:06,   39.80it/s]
 74%|#######4  |  : 762/1023 [00:18<00:06,   40.77it/s]
 75%|#######4  |  : 763/1023 [00:18<00:06,   40.20it/s]
 75%|#######4  |  : 764/1023 [00:19<00:06,   39.66it/s]
 75%|#######4  |  : 766/1023 [00:19<00:06,   40.64it/s]
 75%|#######4  |  : 767/1023 [00:19<00:06,   40.08it/s]
 75%|#######5  |  : 769/1023 [00:19<00:06,   41.03it/s]
 75%|#######5  |  : 770/1023 [00:19<00:06,   40.45it/s]
 75%|#######5  |  : 771/1023 [00:19<00:06,   39.91it/s]
 76%|#######5  |  : 773/1023 [00:19<00:06,   40.87it/s]
 76%|#######5  |  : 774/1023 [00:19<00:06,   40.30it/s]
 76%|#######5  |  : 775/1023 [00:19<00:06,   39.76it/s]
 76%|#######5  |  : 777/1023 [00:19<00:06,   40.73it/s]
 76%|#######6  |  : 778/1023 [00:19<00:06,   40.17it/s]
 76%|#######6  |  : 780/1023 [00:19<00:05,   41.12it/s]
 76%|#######6  |  : 781/1023 [00:19<00:05,   40.54it/s]
 76%|#######6  |  : 782/1023 [00:19<00:06,   39.99it/s]
 77%|#######6  |  : 784/1023 [00:19<00:05,   40.95it/s]
 77%|#######6  |  : 785/1023 [00:19<00:05,   40.38it/s]
 77%|#######6  |  : 786/1023 [00:19<00:05,   39.83it/s]
 77%|#######7  |  : 788/1023 [00:19<00:05,   40.80it/s]
 77%|#######7  |  : 789/1023 [00:19<00:05,   40.24it/s]
 77%|#######7  |  : 791/1023 [00:19<00:05,   41.18it/s]
 77%|#######7  |  : 792/1023 [00:19<00:05,   40.60it/s]
 78%|#######7  |  : 793/1023 [00:19<00:05,   40.04it/s]
 78%|#######7  |  : 795/1023 [00:19<00:05,   40.99it/s]
 78%|#######7  |  : 796/1023 [00:19<00:05,   40.42it/s]
 78%|#######8  |  : 798/1023 [00:19<00:05,   41.35it/s]
 78%|#######8  |  : 799/1023 [00:19<00:05,   40.76it/s]
 78%|#######8  |  : 800/1023 [00:19<00:05,   40.20it/s]
 78%|#######8  |  : 802/1023 [00:19<00:05,   41.15it/s]
 78%|#######8  |  : 803/1023 [00:19<00:05,   40.57it/s]
 79%|#######8  |  : 804/1023 [00:20<00:05,   40.02it/s]
 79%|#######8  |  : 806/1023 [00:20<00:05,   40.97it/s]
 79%|#######8  |  : 807/1023 [00:20<00:05,   40.39it/s]
 79%|#######9  |  : 809/1023 [00:20<00:05,   41.33it/s]
 79%|#######9  |  : 810/1023 [00:20<00:05,   40.74it/s]
 79%|#######9  |  : 811/1023 [00:20<00:05,   40.18it/s]
 79%|#######9  |  : 813/1023 [00:20<00:05,   41.13it/s]
 80%|#######9  |  : 814/1023 [00:20<00:05,   40.55it/s]
 80%|#######9  |  : 815/1023 [00:20<00:05,   40.00it/s]
 80%|#######9  |  : 817/1023 [00:20<00:05,   40.96it/s]
 80%|#######9  |  : 818/1023 [00:20<00:05,   40.38it/s]
 80%|########  |  : 820/1023 [00:20<00:04,   41.32it/s]
 80%|########  |  : 821/1023 [00:20<00:04,   40.73it/s]
 80%|########  |  : 822/1023 [00:20<00:05,   40.17it/s]
 81%|########  |  : 824/1023 [00:20<00:04,   41.12it/s]
 81%|########  |  : 825/1023 [00:20<00:04,   40.54it/s]
 81%|########  |  : 826/1023 [00:20<00:04,   40.00it/s]
 81%|########  |  : 828/1023 [00:20<00:04,   40.95it/s]
 81%|########1 |  : 829/1023 [00:20<00:04,   40.38it/s]
 81%|########1 |  : 831/1023 [00:20<00:04,   41.32it/s]
 81%|########1 |  : 832/1023 [00:20<00:04,   40.73it/s]
 81%|########1 |  : 833/1023 [00:20<00:04,   40.17it/s]
 82%|########1 |  : 835/1023 [00:20<00:04,   41.12it/s]
 82%|########1 |  : 836/1023 [00:20<00:04,   40.54it/s]
 82%|########1 |  : 837/1023 [00:20<00:04,   39.99it/s]
 82%|########2 |  : 839/1023 [00:20<00:04,   40.95it/s]
 82%|########2 |  : 840/1023 [00:20<00:04,   40.37it/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 |  : 844/1023 [00:20<00:04,   40.16it/s]
 83%|########2 |  : 846/1023 [00:21<00:04,   41.11it/s]
 83%|########2 |  : 847/1023 [00:21<00:04,   40.53it/s]
 83%|########2 |  : 848/1023 [00:21<00:04,   39.98it/s]
 83%|########3 |  : 850/1023 [00:21<00:04,   40.93it/s]
 83%|########3 |  : 851/1023 [00:21<00:04,   40.36it/s]
 83%|########3 |  : 852/1023 [00:21<00:04,   39.82it/s]
 83%|########3 |  : 854/1023 [00:21<00:04,   40.78it/s]
 84%|########3 |  : 855/1023 [00:21<00:04,   40.22it/s]
 84%|########3 |  : 856/1023 [00:21<00:04,   39.69it/s]
 84%|########3 |  : 858/1023 [00:21<00:04,   40.66it/s]
 84%|########3 |  : 859/1023 [00:21<00:04,   40.10it/s]
 84%|########4 |  : 861/1023 [00:21<00:03,   41.05it/s]
 84%|########4 |  : 862/1023 [00:21<00:03,   40.47it/s]
 84%|########4 |  : 863/1023 [00:21<00:04,   39.92it/s]
 85%|########4 |  : 865/1023 [00:21<00:03,   40.88it/s]
 85%|########4 |  : 866/1023 [00:21<00:03,   40.31it/s]
 85%|########4 |  : 867/1023 [00:21<00:03,   39.77it/s]
 85%|########4 |  : 869/1023 [00:21<00:03,   40.74it/s]
 85%|########5 |  : 870/1023 [00:21<00:03,   40.18it/s]
 85%|########5 |  : 871/1023 [00:21<00:03,   39.64it/s]
 85%|########5 |  : 873/1023 [00:21<00:03,   40.62it/s]
 85%|########5 |  : 874/1023 [00:21<00:03,   40.07it/s]
 86%|########5 |  : 875/1023 [00:21<00:03,   39.54it/s]
 86%|########5 |  : 877/1023 [00:21<00:03,   40.52it/s]
 86%|########5 |  : 878/1023 [00:21<00:03,   39.97it/s]
 86%|########6 |  : 880/1023 [00:21<00:03,   40.93it/s]
 86%|########6 |  : 881/1023 [00:21<00:03,   40.36it/s]
 86%|########6 |  : 882/1023 [00:21<00:03,   39.82it/s]
 86%|########6 |  : 884/1023 [00:21<00:03,   40.78it/s]
 87%|########6 |  : 885/1023 [00:22<00:03,   40.22it/s]
 87%|########6 |  : 886/1023 [00:22<00:03,   39.69it/s]
 87%|########6 |  : 888/1023 [00:22<00:03,   40.66it/s]
 87%|########6 |  : 889/1023 [00:22<00:03,   40.10it/s]
 87%|########6 |  : 890/1023 [00:22<00:03,   39.57it/s]
 87%|########7 |  : 892/1023 [00:22<00:03,   40.55it/s]
 87%|########7 |  : 893/1023 [00:22<00:03,   40.00it/s]
 87%|########7 |  : 894/1023 [00:22<00:03,   39.47it/s]
 88%|########7 |  : 896/1023 [00:22<00:03,   40.46it/s]
 88%|########7 |  : 897/1023 [00:22<00:03,   39.91it/s]
 88%|########7 |  : 898/1023 [00:22<00:03,   39.40it/s]
 88%|########7 |  : 900/1023 [00:22<00:03,   40.38it/s]
 88%|########8 |  : 901/1023 [00:22<00:03,   39.84it/s]
 88%|########8 |  : 902/1023 [00:22<00:03,   39.33it/s]
 88%|########8 |  : 904/1023 [00:22<00:02,   40.31it/s]
 88%|########8 |  : 905/1023 [00:22<00:02,   39.77it/s]
 89%|########8 |  : 906/1023 [00:22<00:02,   39.26it/s]
 89%|########8 |  : 908/1023 [00:22<00:02,   40.25it/s]
 89%|########8 |  : 909/1023 [00:22<00:02,   39.72it/s]
 89%|########9 |  : 911/1023 [00:22<00:02,   40.68it/s]
 89%|########9 |  : 912/1023 [00:22<00:02,   40.13it/s]
 89%|########9 |  : 913/1023 [00:22<00:02,   39.59it/s]
 89%|########9 |  : 914/1023 [00:22<00:02,   39.09it/s]
 89%|########9 |  : 915/1023 [00:22<00:02,   38.61it/s]
 90%|########9 |  : 916/1023 [00:22<00:02,   38.16it/s]
 90%|########9 |  : 917/1023 [00:22<00:02,   37.73it/s]
 90%|########9 |  : 919/1023 [00:22<00:02,   38.80it/s]
 90%|########9 |  : 920/1023 [00:22<00:02,   38.34it/s]
 90%|######### |  : 921/1023 [00:22<00:02,   37.90it/s]
 90%|######### |  : 922/1023 [00:22<00:02,   37.48it/s]
 90%|######### |  : 924/1023 [00:23<00:02,   38.57it/s]
 90%|######### |  : 925/1023 [00:23<00:02,   38.12it/s]
 91%|######### |  : 926/1023 [00:23<00:02,   35.91it/s]
 91%|######### |  : 927/1023 [00:23<00:02,   35.60it/s]
 91%|######### |  : 928/1023 [00:23<00:02,   35.31it/s]
 91%|######### |  : 930/1023 [00:23<00:02,   36.45it/s]
 91%|#########1|  : 931/1023 [00:23<00:02,   36.12it/s]
 91%|#########1|  : 932/1023 [00:23<00:02,   35.80it/s]
 91%|#########1|  : 934/1023 [00:23<00:02,   36.93it/s]
 91%|#########1|  : 935/1023 [00:23<00:02,   36.57it/s]
 91%|#########1|  : 936/1023 [00:23<00:02,   36.23it/s]
 92%|#########1|  : 938/1023 [00:23<00:02,   37.34it/s]
 92%|#########1|  : 939/1023 [00:23<00:02,   36.96it/s]
 92%|#########1|  : 941/1023 [00:23<00:02,   38.04it/s]
 92%|#########2|  : 942/1023 [00:23<00:02,   37.63it/s]
 92%|#########2|  : 943/1023 [00:23<00:02,   37.23it/s]
 92%|#########2|  : 945/1023 [00:23<00:02,   38.30it/s]
 92%|#########2|  : 946/1023 [00:23<00:02,   37.87it/s]
 93%|#########2|  : 947/1023 [00:23<00:02,   37.46it/s]
 93%|#########2|  : 949/1023 [00:23<00:01,   38.52it/s]
 93%|#########2|  : 950/1023 [00:23<00:01,   38.08it/s]
 93%|#########2|  : 951/1023 [00:23<00:01,   37.66it/s]
 93%|#########3|  : 953/1023 [00:23<00:01,   38.71it/s]
 93%|#########3|  : 954/1023 [00:23<00:01,   38.26it/s]
 93%|#########3|  : 956/1023 [00:23<00:01,   39.29it/s]
 94%|#########3|  : 957/1023 [00:23<00:01,   38.81it/s]
 94%|#########3|  : 958/1023 [00:23<00:01,   38.36it/s]
 94%|#########3|  : 960/1023 [00:23<00:01,   39.38it/s]
 94%|#########3|  : 961/1023 [00:24<00:01,   38.90it/s]
 94%|#########4|  : 962/1023 [00:24<00:01,   38.44it/s]
 94%|#########4|  : 964/1023 [00:24<00:01,   39.46it/s]
 94%|#########4|  : 965/1023 [00:24<00:01,   38.97it/s]
 95%|#########4|  : 967/1023 [00:24<00:01,   39.97it/s]
 95%|#########4|  : 968/1023 [00:24<00:01,   39.46it/s]
 95%|#########4|  : 969/1023 [00:24<00:01,   38.97it/s]
 95%|#########4|  : 971/1023 [00:24<00:01,   39.97it/s]
 95%|#########5|  : 972/1023 [00:24<00:01,   39.45it/s]
 95%|#########5|  : 974/1023 [00:24<00:01,   40.43it/s]
 95%|#########5|  : 975/1023 [00:24<00:01,   39.89it/s]
 95%|#########5|  : 976/1023 [00:24<00:01,   39.38it/s]
 96%|#########5|  : 978/1023 [00:24<00:01,   40.36it/s]
 96%|#########5|  : 979/1023 [00:24<00:01,   39.83it/s]
 96%|#########5|  : 980/1023 [00:24<00:01,   39.31it/s]
 96%|#########5|  : 982/1023 [00:24<00:01,   40.30it/s]
 96%|#########6|  : 983/1023 [00:24<00:01,   39.76it/s]
 96%|#########6|  : 985/1023 [00:24<00:00,   40.73it/s]
 96%|#########6|  : 986/1023 [00:24<00:00,   40.17it/s]
 96%|#########6|  : 987/1023 [00:24<00:00,   39.65it/s]
 97%|#########6|  : 989/1023 [00:24<00:00,   40.62it/s]
 97%|#########6|  : 990/1023 [00:24<00:00,   40.07it/s]
 97%|#########6|  : 992/1023 [00:24<00:00,   41.01it/s]
 97%|#########7|  : 993/1023 [00:24<00:00,   40.44it/s]
 97%|#########7|  : 994/1023 [00:24<00:00,   39.90it/s]
 97%|#########7|  : 996/1023 [00:24<00:00,   40.86it/s]
 97%|#########7|  : 997/1023 [00:24<00:00,   40.30it/s]
 98%|#########7|  : 998/1023 [00:24<00:00,   39.76it/s]
 98%|#########7|  : 1000/1023 [00:24<00:00,   40.73it/s]
 98%|#########7|  : 1001/1023 [00:24<00:00,   40.17it/s]
 98%|#########7|  : 1002/1023 [00:25<00:00,   39.64it/s]
 98%|#########8|  : 1004/1023 [00:25<00:00,   40.62it/s]
 98%|#########8|  : 1005/1023 [00:25<00:00,   40.07it/s]
 98%|#########8|  : 1006/1023 [00:25<00:00,   39.54it/s]
 98%|#########8|  : 1007/1023 [00:25<00:00,   39.05it/s]
 99%|#########8|  : 1008/1023 [00:25<00:00,   38.57it/s]
 99%|#########8|  : 1010/1023 [00:25<00:00,   39.60it/s]
 99%|#########8|  : 1011/1023 [00:25<00:00,   39.09it/s]
 99%|#########9|  : 1013/1023 [00:25<00:00,   40.09it/s]
 99%|#########9|  : 1014/1023 [00:25<00:00,   39.57it/s]
 99%|#########9|  : 1015/1023 [00:25<00:00,   39.07it/s]
 99%|#########9|  : 1017/1023 [00:25<00:00,   40.07it/s]
100%|#########9|  : 1018/1023 [00:25<00:00,   39.54it/s]
100%|#########9|  : 1020/1023 [00:25<00:00,   40.52it/s]
100%|#########9|  : 1021/1023 [00:25<00:00,   39.97it/s]
100%|#########9|  : 1022/1023 [00:25<00:00,   39.45it/s]
100%|##########|  : 1023/1023 [00:25<00:00,   40.07it/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 39.632 seconds)

Estimated memory usage: 170 MB

Gallery generated by Sphinx-Gallery