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.80it/s]
  0%|          |  : 2/1023 [00:00<01:07,   15.18it/s]
  0%|          |  : 4/1023 [00:00<01:04,   15.76it/s]
  0%|          |  : 5/1023 [00:00<01:03,   16.14it/s]
  1%|          |  : 6/1023 [00:00<01:01,   16.51it/s]
  1%|          |  : 8/1023 [00:00<00:59,   17.13it/s]
  1%|          |  : 9/1023 [00:00<00:57,   17.50it/s]
  1%|          |  : 10/1023 [00:00<00:56,   17.87it/s]
  1%|1         |  : 11/1023 [00:00<00:55,   18.23it/s]
  1%|1         |  : 13/1023 [00:00<00:53,   18.88it/s]
  1%|1         |  : 14/1023 [00:00<00:52,   19.23it/s]
  1%|1         |  : 15/1023 [00:00<00:51,   19.57it/s]
  2%|1         |  : 16/1023 [00:00<00:50,   19.90it/s]
  2%|1         |  : 18/1023 [00:00<00:48,   20.59it/s]
  2%|1         |  : 19/1023 [00:00<00:48,   20.91it/s]
  2%|1         |  : 20/1023 [00:00<00:47,   21.22it/s]
  2%|2         |  : 21/1023 [00:00<00:46,   21.52it/s]
  2%|2         |  : 23/1023 [00:00<00:44,   22.23it/s]
  2%|2         |  : 24/1023 [00:00<00:44,   22.51it/s]
  2%|2         |  : 25/1023 [00:00<00:43,   22.79it/s]
  3%|2         |  : 26/1023 [00:00<00:43,   23.05it/s]
  3%|2         |  : 27/1023 [00:00<00:42,   23.31it/s]
  3%|2         |  : 29/1023 [00:00<00:41,   24.04it/s]
  3%|2         |  : 30/1023 [00:00<00:40,   24.26it/s]
  3%|3         |  : 31/1023 [00:00<00:40,   24.48it/s]
  3%|3         |  : 32/1023 [00:00<00:40,   24.69it/s]
  3%|3         |  : 33/1023 [00:00<00:39,   24.90it/s]
  3%|3         |  : 34/1023 [00:00<00:39,   25.10it/s]
  4%|3         |  : 36/1023 [00:01<00:38,   25.84it/s]
  4%|3         |  : 37/1023 [00:01<00:37,   26.00it/s]
  4%|3         |  : 38/1023 [00:01<00:37,   26.16it/s]
  4%|3         |  : 39/1023 [00:01<00:37,   26.31it/s]
  4%|3         |  : 40/1023 [00:01<00:37,   26.45it/s]
  4%|4         |  : 42/1023 [00:01<00:36,   27.20it/s]
  4%|4         |  : 43/1023 [00:01<00:35,   27.31it/s]
  4%|4         |  : 44/1023 [00:01<00:35,   27.42it/s]
  4%|4         |  : 45/1023 [00:01<00:35,   27.51it/s]
  4%|4         |  : 46/1023 [00:01<00:35,   27.61it/s]
  5%|4         |  : 47/1023 [00:01<00:35,   27.70it/s]
  5%|4         |  : 49/1023 [00:01<00:34,   28.45it/s]
  5%|4         |  : 50/1023 [00:01<00:34,   28.51it/s]
  5%|4         |  : 51/1023 [00:01<00:34,   28.56it/s]
  5%|5         |  : 52/1023 [00:01<00:33,   28.61it/s]
  5%|5         |  : 53/1023 [00:01<00:33,   28.66it/s]
  5%|5         |  : 55/1023 [00:01<00:32,   29.42it/s]
  5%|5         |  : 56/1023 [00:01<00:32,   29.43it/s]
  6%|5         |  : 57/1023 [00:01<00:32,   29.44it/s]
  6%|5         |  : 58/1023 [00:01<00:32,   29.44it/s]
  6%|5         |  : 60/1023 [00:01<00:31,   30.20it/s]
  6%|5         |  : 61/1023 [00:01<00:31,   30.17it/s]
  6%|6         |  : 62/1023 [00:01<00:31,   30.14it/s]
  6%|6         |  : 63/1023 [00:01<00:31,   30.12it/s]
  6%|6         |  : 64/1023 [00:01<00:31,   30.09it/s]
  6%|6         |  : 66/1023 [00:01<00:31,   30.85it/s]
  7%|6         |  : 67/1023 [00:01<00:31,   30.78it/s]
  7%|6         |  : 68/1023 [00:01<00:31,   30.72it/s]
  7%|6         |  : 69/1023 [00:01<00:31,   30.66it/s]
  7%|6         |  : 70/1023 [00:01<00:31,   30.61it/s]
  7%|7         |  : 72/1023 [00:02<00:30,   31.36it/s]
  7%|7         |  : 73/1023 [00:02<00:30,   31.27it/s]
  7%|7         |  : 74/1023 [00:02<00:30,   31.18it/s]
  7%|7         |  : 75/1023 [00:02<00:30,   31.09it/s]
  8%|7         |  : 77/1023 [00:02<00:29,   31.85it/s]
  8%|7         |  : 78/1023 [00:02<00:29,   31.72it/s]
  8%|7         |  : 79/1023 [00:02<00:29,   31.61it/s]
  8%|7         |  : 80/1023 [00:02<00:29,   31.49it/s]
  8%|7         |  : 81/1023 [00:02<00:30,   31.39it/s]
  8%|8         |  : 82/1023 [00:02<00:30,   31.30it/s]
  8%|8         |  : 84/1023 [00:02<00:29,   32.05it/s]
  8%|8         |  : 85/1023 [00:02<00:29,   31.92it/s]
  8%|8         |  : 86/1023 [00:02<00:29,   31.79it/s]
  9%|8         |  : 87/1023 [00:02<00:29,   31.67it/s]
  9%|8         |  : 88/1023 [00:02<00:29,   31.56it/s]
  9%|8         |  : 90/1023 [00:02<00:28,   32.32it/s]
  9%|8         |  : 91/1023 [00:02<00:28,   32.17it/s]
  9%|8         |  : 92/1023 [00:02<00:29,   32.02it/s]
  9%|9         |  : 93/1023 [00:02<00:29,   31.89it/s]
  9%|9         |  : 94/1023 [00:02<00:29,   31.77it/s]
  9%|9         |  : 95/1023 [00:02<00:29,   31.65it/s]
  9%|9         |  : 97/1023 [00:02<00:28,   32.41it/s]
 10%|9         |  : 98/1023 [00:02<00:28,   32.26it/s]
 10%|9         |  : 99/1023 [00:02<00:28,   32.11it/s]
 10%|9         |  : 100/1023 [00:02<00:28,   31.98it/s]
 10%|9         |  : 101/1023 [00:02<00:28,   31.84it/s]
 10%|#         |  : 103/1023 [00:02<00:28,   32.59it/s]
 10%|#         |  : 104/1023 [00:02<00:28,   32.43it/s]
 10%|#         |  : 105/1023 [00:02<00:28,   32.27it/s]
 10%|#         |  : 106/1023 [00:03<00:28,   32.12it/s]
 10%|#         |  : 107/1023 [00:03<00:28,   31.98it/s]
 11%|#         |  : 109/1023 [00:03<00:27,   32.74it/s]
 11%|#         |  : 110/1023 [00:03<00:28,   32.56it/s]
 11%|#         |  : 111/1023 [00:03<00:28,   32.40it/s]
 11%|#         |  : 112/1023 [00:03<00:28,   32.24it/s]
 11%|#1        |  : 113/1023 [00:03<00:28,   32.10it/s]
 11%|#1        |  : 115/1023 [00:03<00:27,   32.85it/s]
 11%|#1        |  : 116/1023 [00:03<00:27,   32.67it/s]
 11%|#1        |  : 117/1023 [00:03<00:27,   32.50it/s]
 12%|#1        |  : 118/1023 [00:03<00:27,   32.34it/s]
 12%|#1        |  : 119/1023 [00:03<00:28,   32.19it/s]
 12%|#1        |  : 121/1023 [00:03<00:27,   32.94it/s]
 12%|#1        |  : 122/1023 [00:03<00:27,   32.75it/s]
 12%|#2        |  : 123/1023 [00:03<00:27,   32.58it/s]
 12%|#2        |  : 124/1023 [00:03<00:27,   32.41it/s]
 12%|#2        |  : 125/1023 [00:03<00:27,   32.25it/s]
 12%|#2        |  : 127/1023 [00:03<00:27,   33.00it/s]
 13%|#2        |  : 128/1023 [00:03<00:27,   32.81it/s]
 13%|#2        |  : 129/1023 [00:03<00:27,   32.63it/s]
 13%|#2        |  : 130/1023 [00:03<00:27,   32.46it/s]
 13%|#2        |  : 131/1023 [00:03<00:27,   32.30it/s]
 13%|#3        |  : 133/1023 [00:03<00:26,   33.05it/s]
 13%|#3        |  : 134/1023 [00:03<00:27,   32.86it/s]
 13%|#3        |  : 135/1023 [00:03<00:27,   32.68it/s]
 13%|#3        |  : 136/1023 [00:03<00:27,   32.50it/s]
 13%|#3        |  : 137/1023 [00:03<00:27,   32.34it/s]
 13%|#3        |  : 138/1023 [00:03<00:27,   32.19it/s]
 14%|#3        |  : 140/1023 [00:03<00:26,   32.94it/s]
 14%|#3        |  : 141/1023 [00:03<00:26,   32.76it/s]
 14%|#3        |  : 142/1023 [00:04<00:27,   32.58it/s]
 14%|#3        |  : 143/1023 [00:04<00:27,   32.41it/s]
 14%|#4        |  : 144/1023 [00:04<00:27,   32.26it/s]
 14%|#4        |  : 145/1023 [00:04<00:27,   32.11it/s]
 14%|#4        |  : 147/1023 [00:04<00:26,   32.86it/s]
 14%|#4        |  : 148/1023 [00:04<00:26,   32.68it/s]
 15%|#4        |  : 149/1023 [00:04<00:26,   32.51it/s]
 15%|#4        |  : 150/1023 [00:04<00:26,   32.35it/s]
 15%|#4        |  : 151/1023 [00:04<00:27,   32.19it/s]
 15%|#4        |  : 153/1023 [00:04<00:26,   32.94it/s]
 15%|#5        |  : 154/1023 [00:04<00:26,   32.76it/s]
 15%|#5        |  : 155/1023 [00:04<00:26,   32.58it/s]
 15%|#5        |  : 156/1023 [00:04<00:26,   32.42it/s]
 15%|#5        |  : 157/1023 [00:04<00:26,   32.26it/s]
 15%|#5        |  : 158/1023 [00:04<00:26,   32.12it/s]
 16%|#5        |  : 160/1023 [00:04<00:26,   32.87it/s]
 16%|#5        |  : 161/1023 [00:04<00:26,   32.68it/s]
 16%|#5        |  : 162/1023 [00:04<00:26,   32.51it/s]
 16%|#5        |  : 163/1023 [00:04<00:26,   32.34it/s]
 16%|#6        |  : 164/1023 [00:04<00:26,   32.19it/s]
 16%|#6        |  : 166/1023 [00:04<00:26,   32.94it/s]
 16%|#6        |  : 167/1023 [00:04<00:26,   32.76it/s]
 16%|#6        |  : 168/1023 [00:04<00:26,   32.58it/s]
 17%|#6        |  : 169/1023 [00:04<00:26,   32.42it/s]
 17%|#6        |  : 170/1023 [00:04<00:26,   32.27it/s]
 17%|#6        |  : 171/1023 [00:04<00:26,   32.12it/s]
 17%|#6        |  : 173/1023 [00:04<00:25,   32.87it/s]
 17%|#7        |  : 174/1023 [00:04<00:25,   32.69it/s]
 17%|#7        |  : 175/1023 [00:04<00:26,   32.52it/s]
 17%|#7        |  : 176/1023 [00:05<00:26,   32.35it/s]
 17%|#7        |  : 177/1023 [00:05<00:26,   32.20it/s]
 17%|#7        |  : 178/1023 [00:05<00:26,   32.06it/s]
 18%|#7        |  : 180/1023 [00:05<00:25,   32.81it/s]
 18%|#7        |  : 181/1023 [00:05<00:25,   32.63it/s]
 18%|#7        |  : 182/1023 [00:05<00:25,   32.47it/s]
 18%|#7        |  : 183/1023 [00:05<00:26,   32.30it/s]
 18%|#7        |  : 184/1023 [00:05<00:26,   32.16it/s]
 18%|#8        |  : 185/1023 [00:05<00:26,   32.01it/s]
 18%|#8        |  : 187/1023 [00:05<00:25,   32.76it/s]
 18%|#8        |  : 188/1023 [00:05<00:25,   32.58it/s]
 18%|#8        |  : 189/1023 [00:05<00:25,   32.42it/s]
 19%|#8        |  : 190/1023 [00:05<00:25,   32.27it/s]
 19%|#8        |  : 191/1023 [00:05<00:25,   32.12it/s]
 19%|#8        |  : 193/1023 [00:05<00:25,   32.87it/s]
 19%|#8        |  : 194/1023 [00:05<00:25,   32.68it/s]
 19%|#9        |  : 195/1023 [00:05<00:25,   32.50it/s]
 19%|#9        |  : 196/1023 [00:05<00:25,   32.34it/s]
 19%|#9        |  : 197/1023 [00:05<00:25,   32.18it/s]
 19%|#9        |  : 198/1023 [00:05<00:25,   32.04it/s]
 20%|#9        |  : 200/1023 [00:05<00:25,   32.79it/s]
 20%|#9        |  : 201/1023 [00:05<00:25,   32.61it/s]
 20%|#9        |  : 202/1023 [00:05<00:25,   32.45it/s]
 20%|#9        |  : 203/1023 [00:05<00:25,   32.28it/s]
 20%|#9        |  : 204/1023 [00:05<00:25,   32.13it/s]
 20%|##        |  : 206/1023 [00:05<00:24,   32.88it/s]
 20%|##        |  : 207/1023 [00:05<00:24,   32.70it/s]
 20%|##        |  : 208/1023 [00:05<00:25,   32.52it/s]
 20%|##        |  : 209/1023 [00:05<00:25,   32.37it/s]
 21%|##        |  : 210/1023 [00:05<00:25,   32.21it/s]
 21%|##        |  : 211/1023 [00:06<00:25,   32.07it/s]
 21%|##        |  : 213/1023 [00:06<00:24,   32.82it/s]
 21%|##        |  : 214/1023 [00:06<00:24,   32.64it/s]
 21%|##1       |  : 215/1023 [00:06<00:24,   32.47it/s]
 21%|##1       |  : 216/1023 [00:06<00:24,   32.31it/s]
 21%|##1       |  : 218/1023 [00:06<00:24,   33.06it/s]
 21%|##1       |  : 219/1023 [00:06<00:24,   32.87it/s]
 22%|##1       |  : 220/1023 [00:06<00:24,   32.68it/s]
 22%|##1       |  : 221/1023 [00:06<00:24,   32.51it/s]
 22%|##1       |  : 222/1023 [00:06<00:24,   32.35it/s]
 22%|##1       |  : 224/1023 [00:06<00:24,   33.11it/s]
 22%|##1       |  : 225/1023 [00:06<00:24,   32.91it/s]
 22%|##2       |  : 226/1023 [00:06<00:24,   32.73it/s]
 22%|##2       |  : 227/1023 [00:06<00:24,   32.55it/s]
 22%|##2       |  : 228/1023 [00:06<00:24,   32.39it/s]
 22%|##2       |  : 230/1023 [00:06<00:23,   33.14it/s]
 23%|##2       |  : 231/1023 [00:06<00:24,   32.94it/s]
 23%|##2       |  : 232/1023 [00:06<00:24,   32.76it/s]
 23%|##2       |  : 233/1023 [00:06<00:24,   32.58it/s]
 23%|##2       |  : 234/1023 [00:06<00:24,   32.41it/s]
 23%|##3       |  : 236/1023 [00:06<00:23,   33.16it/s]
 23%|##3       |  : 237/1023 [00:06<00:23,   32.96it/s]
 23%|##3       |  : 238/1023 [00:06<00:23,   32.77it/s]
 23%|##3       |  : 239/1023 [00:06<00:24,   32.60it/s]
 23%|##3       |  : 240/1023 [00:06<00:24,   32.43it/s]
 24%|##3       |  : 242/1023 [00:06<00:23,   33.18it/s]
 24%|##3       |  : 243/1023 [00:06<00:23,   32.98it/s]
 24%|##3       |  : 244/1023 [00:06<00:23,   32.79it/s]
 24%|##3       |  : 245/1023 [00:06<00:23,   32.62it/s]
 24%|##4       |  : 247/1023 [00:07<00:23,   33.37it/s]
 24%|##4       |  : 248/1023 [00:07<00:23,   33.15it/s]
 24%|##4       |  : 249/1023 [00:07<00:23,   32.96it/s]
 24%|##4       |  : 250/1023 [00:07<00:23,   32.77it/s]
 25%|##4       |  : 252/1023 [00:07<00:22,   33.52it/s]
 25%|##4       |  : 253/1023 [00:07<00:23,   33.30it/s]
 25%|##4       |  : 254/1023 [00:07<00:23,   33.10it/s]
 25%|##5       |  : 256/1023 [00:07<00:22,   33.84it/s]
 25%|##5       |  : 257/1023 [00:07<00:22,   33.60it/s]
 25%|##5       |  : 258/1023 [00:07<00:22,   33.38it/s]
 25%|##5       |  : 259/1023 [00:07<00:23,   33.16it/s]
 26%|##5       |  : 261/1023 [00:07<00:22,   33.91it/s]
 26%|##5       |  : 262/1023 [00:07<00:22,   33.66it/s]
 26%|##5       |  : 263/1023 [00:07<00:22,   33.43it/s]
 26%|##5       |  : 264/1023 [00:07<00:22,   33.21it/s]
 26%|##6       |  : 266/1023 [00:07<00:22,   33.96it/s]
 26%|##6       |  : 267/1023 [00:07<00:22,   33.71it/s]
 26%|##6       |  : 268/1023 [00:07<00:22,   33.47it/s]
 26%|##6       |  : 269/1023 [00:07<00:22,   33.25it/s]
 26%|##6       |  : 271/1023 [00:07<00:22,   33.99it/s]
 27%|##6       |  : 272/1023 [00:07<00:22,   33.74it/s]
 27%|##6       |  : 273/1023 [00:07<00:22,   33.51it/s]
 27%|##6       |  : 275/1023 [00:07<00:21,   34.25it/s]
 27%|##6       |  : 276/1023 [00:07<00:21,   33.99it/s]
 27%|##7       |  : 277/1023 [00:07<00:22,   33.74it/s]
 27%|##7       |  : 278/1023 [00:07<00:22,   33.50it/s]
 27%|##7       |  : 280/1023 [00:07<00:21,   34.25it/s]
 27%|##7       |  : 281/1023 [00:07<00:21,   33.98it/s]
 28%|##7       |  : 282/1023 [00:07<00:21,   33.73it/s]
 28%|##7       |  : 283/1023 [00:07<00:22,   33.49it/s]
 28%|##7       |  : 285/1023 [00:08<00:21,   34.24it/s]
 28%|##7       |  : 286/1023 [00:08<00:21,   33.97it/s]
 28%|##8       |  : 287/1023 [00:08<00:21,   33.73it/s]
 28%|##8       |  : 288/1023 [00:08<00:21,   33.49it/s]
 28%|##8       |  : 289/1023 [00:08<00:22,   33.28it/s]
 28%|##8       |  : 291/1023 [00:08<00:21,   34.02it/s]
 29%|##8       |  : 292/1023 [00:08<00:21,   33.77it/s]
 29%|##8       |  : 293/1023 [00:08<00:21,   33.54it/s]
 29%|##8       |  : 294/1023 [00:08<00:21,   33.32it/s]
 29%|##8       |  : 295/1023 [00:08<00:21,   33.11it/s]
 29%|##9       |  : 297/1023 [00:08<00:21,   33.86it/s]
 29%|##9       |  : 298/1023 [00:08<00:21,   33.61it/s]
 29%|##9       |  : 299/1023 [00:08<00:21,   33.39it/s]
 29%|##9       |  : 300/1023 [00:08<00:21,   33.18it/s]
 30%|##9       |  : 302/1023 [00:08<00:21,   33.92it/s]
 30%|##9       |  : 303/1023 [00:08<00:21,   33.68it/s]
 30%|##9       |  : 304/1023 [00:08<00:21,   33.43it/s]
 30%|##9       |  : 305/1023 [00:08<00:21,   33.22it/s]
 30%|##9       |  : 306/1023 [00:08<00:21,   33.01it/s]
 30%|###       |  : 308/1023 [00:08<00:21,   33.76it/s]
 30%|###       |  : 309/1023 [00:08<00:21,   33.52it/s]
 30%|###       |  : 310/1023 [00:08<00:21,   33.31it/s]
 30%|###       |  : 311/1023 [00:08<00:21,   33.10it/s]
 31%|###       |  : 313/1023 [00:08<00:20,   33.85it/s]
 31%|###       |  : 314/1023 [00:08<00:21,   33.58it/s]
 31%|###       |  : 315/1023 [00:08<00:21,   33.34it/s]
 31%|###       |  : 317/1023 [00:08<00:20,   34.08it/s]
 31%|###1      |  : 318/1023 [00:08<00:20,   33.80it/s]
 31%|###1      |  : 319/1023 [00:08<00:20,   33.55it/s]
 31%|###1      |  : 320/1023 [00:08<00:21,   33.32it/s]
 31%|###1      |  : 322/1023 [00:09<00:20,   34.06it/s]
 32%|###1      |  : 323/1023 [00:09<00:20,   33.79it/s]
 32%|###1      |  : 324/1023 [00:09<00:20,   33.54it/s]
 32%|###1      |  : 325/1023 [00:09<00:20,   33.32it/s]
 32%|###1      |  : 327/1023 [00:09<00:20,   34.06it/s]
 32%|###2      |  : 328/1023 [00:09<00:20,   33.78it/s]
 32%|###2      |  : 329/1023 [00:09<00:20,   33.53it/s]
 32%|###2      |  : 330/1023 [00:09<00:20,   33.30it/s]
 32%|###2      |  : 332/1023 [00:09<00:20,   34.04it/s]
 33%|###2      |  : 333/1023 [00:09<00:20,   33.78it/s]
 33%|###2      |  : 334/1023 [00:09<00:20,   33.53it/s]
 33%|###2      |  : 336/1023 [00:09<00:20,   34.27it/s]
 33%|###2      |  : 337/1023 [00:09<00:20,   33.98it/s]
 33%|###3      |  : 338/1023 [00:09<00:20,   33.71it/s]
 33%|###3      |  : 339/1023 [00:09<00:20,   33.47it/s]
 33%|###3      |  : 341/1023 [00:09<00:19,   34.21it/s]
 33%|###3      |  : 342/1023 [00:09<00:20,   33.92it/s]
 34%|###3      |  : 343/1023 [00:09<00:20,   33.66it/s]
 34%|###3      |  : 345/1023 [00:09<00:19,   34.40it/s]
 34%|###3      |  : 346/1023 [00:09<00:19,   34.10it/s]
 34%|###3      |  : 347/1023 [00:09<00:19,   33.84it/s]
 34%|###4      |  : 348/1023 [00:09<00:20,   33.60it/s]
 34%|###4      |  : 350/1023 [00:09<00:19,   34.35it/s]
 34%|###4      |  : 351/1023 [00:09<00:19,   34.07it/s]
 34%|###4      |  : 352/1023 [00:09<00:19,   33.81it/s]
 35%|###4      |  : 353/1023 [00:09<00:19,   33.57it/s]
 35%|###4      |  : 355/1023 [00:09<00:19,   34.31it/s]
 35%|###4      |  : 356/1023 [00:09<00:19,   34.04it/s]
 35%|###4      |  : 357/1023 [00:09<00:19,   33.79it/s]
 35%|###4      |  : 358/1023 [00:10<00:19,   33.55it/s]
 35%|###5      |  : 360/1023 [00:10<00:19,   34.29it/s]
 35%|###5      |  : 361/1023 [00:10<00:19,   34.02it/s]
 35%|###5      |  : 362/1023 [00:10<00:19,   33.77it/s]
 36%|###5      |  : 364/1023 [00:10<00:19,   34.51it/s]
 36%|###5      |  : 365/1023 [00:10<00:19,   34.23it/s]
 36%|###5      |  : 366/1023 [00:10<00:19,   33.96it/s]
 36%|###5      |  : 367/1023 [00:10<00:19,   33.70it/s]
 36%|###6      |  : 369/1023 [00:10<00:18,   34.44it/s]
 36%|###6      |  : 370/1023 [00:10<00:19,   34.17it/s]
 36%|###6      |  : 371/1023 [00:10<00:19,   33.90it/s]
 36%|###6      |  : 372/1023 [00:10<00:19,   33.66it/s]
 37%|###6      |  : 374/1023 [00:10<00:18,   34.40it/s]
 37%|###6      |  : 375/1023 [00:10<00:18,   34.12it/s]
 37%|###6      |  : 376/1023 [00:10<00:19,   33.85it/s]
 37%|###6      |  : 378/1023 [00:10<00:18,   34.59it/s]
 37%|###7      |  : 379/1023 [00:10<00:18,   34.30it/s]
 37%|###7      |  : 380/1023 [00:10<00:18,   34.02it/s]
 37%|###7      |  : 381/1023 [00:10<00:19,   33.77it/s]
 37%|###7      |  : 383/1023 [00:10<00:18,   34.51it/s]
 38%|###7      |  : 384/1023 [00:10<00:18,   34.23it/s]
 38%|###7      |  : 385/1023 [00:10<00:18,   33.96it/s]
 38%|###7      |  : 387/1023 [00:10<00:18,   34.70it/s]
 38%|###7      |  : 388/1023 [00:10<00:18,   34.41it/s]
 38%|###8      |  : 389/1023 [00:10<00:18,   34.13it/s]
 38%|###8      |  : 390/1023 [00:10<00:18,   33.87it/s]
 38%|###8      |  : 392/1023 [00:10<00:18,   34.61it/s]
 38%|###8      |  : 393/1023 [00:10<00:18,   34.32it/s]
 39%|###8      |  : 394/1023 [00:10<00:18,   34.05it/s]
 39%|###8      |  : 396/1023 [00:10<00:18,   34.79it/s]
 39%|###8      |  : 397/1023 [00:11<00:18,   34.49it/s]
 39%|###8      |  : 398/1023 [00:11<00:18,   34.21it/s]
 39%|###9      |  : 399/1023 [00:11<00:18,   33.94it/s]
 39%|###9      |  : 401/1023 [00:11<00:17,   34.68it/s]
 39%|###9      |  : 402/1023 [00:11<00:18,   34.39it/s]
 39%|###9      |  : 403/1023 [00:11<00:18,   34.12it/s]
 39%|###9      |  : 404/1023 [00:11<00:18,   33.86it/s]
 40%|###9      |  : 406/1023 [00:11<00:17,   34.60it/s]
 40%|###9      |  : 407/1023 [00:11<00:17,   34.30it/s]
 40%|###9      |  : 408/1023 [00:11<00:18,   34.03it/s]
 40%|####      |  : 410/1023 [00:11<00:17,   34.77it/s]
 40%|####      |  : 411/1023 [00:11<00:17,   34.47it/s]
 40%|####      |  : 412/1023 [00:11<00:17,   34.19it/s]
 40%|####      |  : 413/1023 [00:11<00:17,   33.93it/s]
 41%|####      |  : 415/1023 [00:11<00:17,   34.67it/s]
 41%|####      |  : 416/1023 [00:11<00:17,   34.38it/s]
 41%|####      |  : 417/1023 [00:11<00:17,   34.10it/s]
 41%|####      |  : 419/1023 [00:11<00:17,   34.84it/s]
 41%|####1     |  : 420/1023 [00:11<00:17,   34.53it/s]
 41%|####1     |  : 421/1023 [00:11<00:17,   34.24it/s]
 41%|####1     |  : 422/1023 [00:11<00:17,   33.98it/s]
 41%|####1     |  : 424/1023 [00:11<00:17,   34.72it/s]
 42%|####1     |  : 425/1023 [00:11<00:17,   34.42it/s]
 42%|####1     |  : 426/1023 [00:11<00:17,   34.14it/s]
 42%|####1     |  : 427/1023 [00:11<00:17,   33.88it/s]
 42%|####1     |  : 429/1023 [00:11<00:17,   34.62it/s]
 42%|####2     |  : 430/1023 [00:11<00:17,   34.32it/s]
 42%|####2     |  : 431/1023 [00:11<00:17,   34.05it/s]
 42%|####2     |  : 433/1023 [00:11<00:16,   34.78it/s]
 42%|####2     |  : 434/1023 [00:12<00:17,   34.48it/s]
 43%|####2     |  : 435/1023 [00:12<00:17,   34.20it/s]
 43%|####2     |  : 436/1023 [00:12<00:17,   33.94it/s]
 43%|####2     |  : 438/1023 [00:12<00:16,   34.67it/s]
 43%|####2     |  : 439/1023 [00:12<00:16,   34.38it/s]
 43%|####3     |  : 440/1023 [00:12<00:17,   34.10it/s]
 43%|####3     |  : 441/1023 [00:12<00:17,   33.84it/s]
 43%|####3     |  : 443/1023 [00:12<00:16,   34.58it/s]
 43%|####3     |  : 444/1023 [00:12<00:16,   34.29it/s]
 43%|####3     |  : 445/1023 [00:12<00:16,   34.02it/s]
 44%|####3     |  : 446/1023 [00:12<00:17,   33.76it/s]
 44%|####3     |  : 448/1023 [00:12<00:16,   34.51it/s]
 44%|####3     |  : 449/1023 [00:12<00:16,   34.22it/s]
 44%|####3     |  : 450/1023 [00:12<00:16,   33.96it/s]
 44%|####4     |  : 452/1023 [00:12<00:16,   34.70it/s]
 44%|####4     |  : 453/1023 [00:12<00:16,   34.40it/s]
 44%|####4     |  : 454/1023 [00:12<00:16,   34.12it/s]
 44%|####4     |  : 455/1023 [00:12<00:16,   33.86it/s]
 45%|####4     |  : 457/1023 [00:12<00:16,   34.61it/s]
 45%|####4     |  : 458/1023 [00:12<00:16,   34.31it/s]
 45%|####4     |  : 459/1023 [00:12<00:16,   34.04it/s]
 45%|####5     |  : 461/1023 [00:12<00:16,   34.78it/s]
 45%|####5     |  : 462/1023 [00:12<00:16,   34.48it/s]
 45%|####5     |  : 463/1023 [00:12<00:16,   34.20it/s]
 45%|####5     |  : 464/1023 [00:12<00:16,   33.94it/s]
 46%|####5     |  : 466/1023 [00:12<00:16,   34.68it/s]
 46%|####5     |  : 467/1023 [00:12<00:16,   34.38it/s]
 46%|####5     |  : 468/1023 [00:12<00:16,   34.11it/s]
 46%|####5     |  : 469/1023 [00:12<00:16,   33.85it/s]
 46%|####6     |  : 471/1023 [00:12<00:15,   34.60it/s]
 46%|####6     |  : 472/1023 [00:13<00:16,   34.31it/s]
 46%|####6     |  : 473/1023 [00:13<00:16,   34.04it/s]
 46%|####6     |  : 474/1023 [00:13<00:16,   33.78it/s]
 47%|####6     |  : 476/1023 [00:13<00:15,   34.52it/s]
 47%|####6     |  : 477/1023 [00:13<00:15,   34.24it/s]
 47%|####6     |  : 478/1023 [00:13<00:16,   33.97it/s]
 47%|####6     |  : 479/1023 [00:13<00:16,   33.72it/s]
 47%|####7     |  : 481/1023 [00:13<00:15,   34.46it/s]
 47%|####7     |  : 482/1023 [00:13<00:15,   34.17it/s]
 47%|####7     |  : 483/1023 [00:13<00:15,   33.91it/s]
 47%|####7     |  : 485/1023 [00:13<00:15,   34.65it/s]
 48%|####7     |  : 486/1023 [00:13<00:15,   34.35it/s]
 48%|####7     |  : 487/1023 [00:13<00:15,   34.08it/s]
 48%|####7     |  : 488/1023 [00:13<00:15,   33.83it/s]
 48%|####7     |  : 490/1023 [00:13<00:15,   34.57it/s]
 48%|####7     |  : 491/1023 [00:13<00:15,   34.28it/s]
 48%|####8     |  : 492/1023 [00:13<00:15,   34.01it/s]
 48%|####8     |  : 494/1023 [00:13<00:15,   34.75it/s]
 48%|####8     |  : 495/1023 [00:13<00:15,   34.45it/s]
 48%|####8     |  : 496/1023 [00:13<00:15,   34.17it/s]
 49%|####8     |  : 497/1023 [00:13<00:15,   33.91it/s]
 49%|####8     |  : 499/1023 [00:13<00:15,   34.65it/s]
 49%|####8     |  : 500/1023 [00:13<00:15,   34.35it/s]
 49%|####8     |  : 501/1023 [00:13<00:15,   34.08it/s]
 49%|####9     |  : 502/1023 [00:13<00:15,   33.82it/s]
 49%|####9     |  : 504/1023 [00:13<00:15,   34.56it/s]
 49%|####9     |  : 505/1023 [00:13<00:15,   34.28it/s]
 49%|####9     |  : 506/1023 [00:13<00:15,   34.01it/s]
 50%|####9     |  : 507/1023 [00:13<00:15,   33.76it/s]
 50%|####9     |  : 509/1023 [00:14<00:14,   34.50it/s]
 50%|####9     |  : 510/1023 [00:14<00:14,   34.22it/s]
 50%|####9     |  : 511/1023 [00:14<00:15,   33.96it/s]
 50%|#####     |  : 512/1023 [00:14<00:15,   33.71it/s]
 50%|#####     |  : 514/1023 [00:14<00:14,   34.45it/s]
 50%|#####     |  : 515/1023 [00:14<00:14,   34.17it/s]
 50%|#####     |  : 516/1023 [00:14<00:14,   33.90it/s]
 51%|#####     |  : 517/1023 [00:14<00:15,   33.66it/s]
 51%|#####     |  : 519/1023 [00:14<00:14,   34.40it/s]
 51%|#####     |  : 520/1023 [00:14<00:14,   34.08it/s]
 51%|#####     |  : 521/1023 [00:14<00:14,   33.82it/s]
 51%|#####1    |  : 522/1023 [00:14<00:14,   33.58it/s]
 51%|#####1    |  : 524/1023 [00:14<00:14,   34.33it/s]
 51%|#####1    |  : 525/1023 [00:14<00:14,   34.06it/s]
 51%|#####1    |  : 526/1023 [00:14<00:14,   33.80it/s]
 52%|#####1    |  : 527/1023 [00:14<00:14,   33.56it/s]
 52%|#####1    |  : 528/1023 [00:14<00:14,   33.34it/s]
 52%|#####1    |  : 530/1023 [00:14<00:14,   34.09it/s]
 52%|#####1    |  : 531/1023 [00:14<00:14,   33.82it/s]
 52%|#####2    |  : 532/1023 [00:14<00:14,   33.58it/s]
 52%|#####2    |  : 534/1023 [00:14<00:14,   34.32it/s]
 52%|#####2    |  : 535/1023 [00:14<00:14,   34.05it/s]
 52%|#####2    |  : 536/1023 [00:14<00:14,   33.79it/s]
 52%|#####2    |  : 537/1023 [00:14<00:14,   33.56it/s]
 53%|#####2    |  : 539/1023 [00:14<00:14,   34.30it/s]
 53%|#####2    |  : 540/1023 [00:14<00:14,   34.03it/s]
 53%|#####2    |  : 541/1023 [00:14<00:14,   33.77it/s]
 53%|#####2    |  : 542/1023 [00:14<00:14,   33.54it/s]
 53%|#####3    |  : 544/1023 [00:14<00:13,   34.28it/s]
 53%|#####3    |  : 545/1023 [00:14<00:14,   34.01it/s]
 53%|#####3    |  : 546/1023 [00:15<00:14,   33.76it/s]
 53%|#####3    |  : 547/1023 [00:15<00:14,   33.52it/s]
 54%|#####3    |  : 549/1023 [00:15<00:13,   34.26it/s]
 54%|#####3    |  : 550/1023 [00:15<00:13,   34.00it/s]
 54%|#####3    |  : 551/1023 [00:15<00:13,   33.75it/s]
 54%|#####3    |  : 552/1023 [00:15<00:14,   33.51it/s]
 54%|#####4    |  : 554/1023 [00:15<00:13,   34.26it/s]
 54%|#####4    |  : 555/1023 [00:15<00:13,   33.99it/s]
 54%|#####4    |  : 556/1023 [00:15<00:13,   33.74it/s]
 54%|#####4    |  : 557/1023 [00:15<00:13,   33.51it/s]
 55%|#####4    |  : 559/1023 [00:15<00:13,   34.25it/s]
 55%|#####4    |  : 560/1023 [00:15<00:13,   33.98it/s]
 55%|#####4    |  : 561/1023 [00:15<00:13,   33.72it/s]
 55%|#####4    |  : 562/1023 [00:15<00:13,   33.49it/s]
 55%|#####5    |  : 564/1023 [00:15<00:13,   34.23it/s]
 55%|#####5    |  : 565/1023 [00:15<00:13,   33.97it/s]
 55%|#####5    |  : 566/1023 [00:15<00:13,   33.72it/s]
 56%|#####5    |  : 568/1023 [00:15<00:13,   34.46it/s]
 56%|#####5    |  : 569/1023 [00:15<00:13,   34.18it/s]
 56%|#####5    |  : 570/1023 [00:15<00:13,   33.91it/s]
 56%|#####5    |  : 571/1023 [00:15<00:13,   33.67it/s]
 56%|#####5    |  : 572/1023 [00:15<00:13,   33.44it/s]
 56%|#####6    |  : 574/1023 [00:15<00:13,   34.18it/s]
 56%|#####6    |  : 575/1023 [00:15<00:13,   33.92it/s]
 56%|#####6    |  : 576/1023 [00:15<00:13,   33.67it/s]
 56%|#####6    |  : 577/1023 [00:15<00:13,   33.44it/s]
 57%|#####6    |  : 579/1023 [00:15<00:12,   34.19it/s]
 57%|#####6    |  : 580/1023 [00:15<00:13,   33.92it/s]
 57%|#####6    |  : 581/1023 [00:15<00:13,   33.68it/s]
 57%|#####6    |  : 583/1023 [00:15<00:12,   34.42it/s]
 57%|#####7    |  : 584/1023 [00:16<00:12,   34.14it/s]
 57%|#####7    |  : 585/1023 [00:16<00:12,   33.88it/s]
 57%|#####7    |  : 586/1023 [00:16<00:12,   33.63it/s]
 57%|#####7    |  : 588/1023 [00:16<00:12,   34.37it/s]
 58%|#####7    |  : 589/1023 [00:16<00:12,   34.09it/s]
 58%|#####7    |  : 590/1023 [00:16<00:12,   33.83it/s]
 58%|#####7    |  : 592/1023 [00:16<00:12,   34.57it/s]
 58%|#####7    |  : 593/1023 [00:16<00:12,   34.29it/s]
 58%|#####8    |  : 594/1023 [00:16<00:12,   34.02it/s]
 58%|#####8    |  : 595/1023 [00:16<00:12,   33.77it/s]
 58%|#####8    |  : 597/1023 [00:16<00:12,   34.51it/s]
 58%|#####8    |  : 598/1023 [00:16<00:12,   34.22it/s]
 59%|#####8    |  : 599/1023 [00:16<00:12,   33.96it/s]
 59%|#####8    |  : 600/1023 [00:16<00:12,   33.70it/s]
 59%|#####8    |  : 602/1023 [00:16<00:12,   34.45it/s]
 59%|#####8    |  : 603/1023 [00:16<00:12,   34.16it/s]
 59%|#####9    |  : 604/1023 [00:16<00:12,   33.90it/s]
 59%|#####9    |  : 605/1023 [00:16<00:12,   33.65it/s]
 59%|#####9    |  : 607/1023 [00:16<00:12,   34.40it/s]
 59%|#####9    |  : 608/1023 [00:16<00:12,   34.12it/s]
 60%|#####9    |  : 609/1023 [00:16<00:12,   33.86it/s]
 60%|#####9    |  : 610/1023 [00:16<00:12,   33.62it/s]
 60%|#####9    |  : 612/1023 [00:16<00:11,   34.36it/s]
 60%|#####9    |  : 613/1023 [00:16<00:12,   34.09it/s]
 60%|######    |  : 614/1023 [00:16<00:12,   33.83it/s]
 60%|######    |  : 615/1023 [00:16<00:12,   33.60it/s]
 60%|######    |  : 617/1023 [00:16<00:11,   34.34it/s]
 60%|######    |  : 618/1023 [00:16<00:11,   34.07it/s]
 61%|######    |  : 619/1023 [00:16<00:11,   33.81it/s]
 61%|######    |  : 620/1023 [00:17<00:12,   33.57it/s]
 61%|######    |  : 622/1023 [00:17<00:11,   34.32it/s]
 61%|######    |  : 623/1023 [00:17<00:11,   34.04it/s]
 61%|######    |  : 624/1023 [00:17<00:11,   33.79it/s]
 61%|######1   |  : 625/1023 [00:17<00:11,   33.55it/s]
 61%|######1   |  : 627/1023 [00:17<00:11,   34.29it/s]
 61%|######1   |  : 628/1023 [00:17<00:11,   34.02it/s]
 61%|######1   |  : 629/1023 [00:17<00:11,   33.77it/s]
 62%|######1   |  : 631/1023 [00:17<00:11,   34.51it/s]
 62%|######1   |  : 632/1023 [00:17<00:11,   34.23it/s]
 62%|######1   |  : 633/1023 [00:17<00:11,   33.96it/s]
 62%|######1   |  : 634/1023 [00:17<00:11,   33.71it/s]
 62%|######2   |  : 636/1023 [00:17<00:11,   34.45it/s]
 62%|######2   |  : 637/1023 [00:17<00:11,   34.17it/s]
 62%|######2   |  : 638/1023 [00:17<00:11,   33.91it/s]
 62%|######2   |  : 639/1023 [00:17<00:11,   33.66it/s]
 63%|######2   |  : 641/1023 [00:17<00:11,   34.41it/s]
 63%|######2   |  : 642/1023 [00:17<00:11,   34.13it/s]
 63%|######2   |  : 643/1023 [00:17<00:11,   33.87it/s]
 63%|######2   |  : 644/1023 [00:17<00:11,   33.63it/s]
 63%|######3   |  : 646/1023 [00:17<00:10,   34.37it/s]
 63%|######3   |  : 647/1023 [00:17<00:11,   34.09it/s]
 63%|######3   |  : 648/1023 [00:17<00:11,   33.83it/s]
 63%|######3   |  : 649/1023 [00:17<00:11,   33.59it/s]
 64%|######3   |  : 651/1023 [00:17<00:10,   34.33it/s]
 64%|######3   |  : 652/1023 [00:17<00:10,   34.06it/s]
 64%|######3   |  : 653/1023 [00:17<00:10,   33.80it/s]
 64%|######3   |  : 654/1023 [00:17<00:10,   33.56it/s]
 64%|######4   |  : 656/1023 [00:17<00:10,   34.30it/s]
 64%|######4   |  : 657/1023 [00:17<00:10,   34.03it/s]
 64%|######4   |  : 658/1023 [00:18<00:10,   33.78it/s]
 64%|######4   |  : 659/1023 [00:18<00:10,   33.54it/s]
 65%|######4   |  : 661/1023 [00:18<00:10,   34.28it/s]
 65%|######4   |  : 662/1023 [00:18<00:10,   34.01it/s]
 65%|######4   |  : 663/1023 [00:18<00:10,   33.76it/s]
 65%|######4   |  : 664/1023 [00:18<00:10,   33.53it/s]
 65%|######5   |  : 666/1023 [00:18<00:10,   34.27it/s]
 65%|######5   |  : 667/1023 [00:18<00:10,   34.00it/s]
 65%|######5   |  : 668/1023 [00:18<00:10,   33.75it/s]
 65%|######5   |  : 669/1023 [00:18<00:10,   33.51it/s]
 66%|######5   |  : 671/1023 [00:18<00:10,   34.25it/s]
 66%|######5   |  : 672/1023 [00:18<00:10,   33.98it/s]
 66%|######5   |  : 673/1023 [00:18<00:10,   33.72it/s]
 66%|######5   |  : 674/1023 [00:18<00:10,   33.48it/s]
 66%|######6   |  : 676/1023 [00:18<00:10,   34.22it/s]
 66%|######6   |  : 677/1023 [00:18<00:10,   33.95it/s]
 66%|######6   |  : 678/1023 [00:18<00:10,   33.69it/s]
 66%|######6   |  : 679/1023 [00:18<00:10,   33.46it/s]
 67%|######6   |  : 681/1023 [00:18<00:10,   34.20it/s]
 67%|######6   |  : 682/1023 [00:18<00:10,   33.93it/s]
 67%|######6   |  : 683/1023 [00:18<00:10,   33.68it/s]
 67%|######6   |  : 684/1023 [00:18<00:10,   33.44it/s]
 67%|######7   |  : 686/1023 [00:18<00:09,   34.19it/s]
 67%|######7   |  : 687/1023 [00:18<00:09,   33.92it/s]
 67%|######7   |  : 688/1023 [00:18<00:09,   33.67it/s]
 67%|######7   |  : 689/1023 [00:18<00:09,   33.43it/s]
 68%|######7   |  : 691/1023 [00:18<00:09,   34.17it/s]
 68%|######7   |  : 692/1023 [00:18<00:09,   33.91it/s]
 68%|######7   |  : 693/1023 [00:18<00:09,   33.67it/s]
 68%|######7   |  : 694/1023 [00:19<00:09,   33.44it/s]
 68%|######8   |  : 696/1023 [00:19<00:09,   34.18it/s]
 68%|######8   |  : 697/1023 [00:19<00:09,   33.92it/s]
 68%|######8   |  : 698/1023 [00:19<00:09,   33.67it/s]
 68%|######8   |  : 699/1023 [00:19<00:09,   33.44it/s]
 69%|######8   |  : 701/1023 [00:19<00:09,   34.19it/s]
 69%|######8   |  : 702/1023 [00:19<00:09,   33.93it/s]
 69%|######8   |  : 703/1023 [00:19<00:09,   33.67it/s]
 69%|######8   |  : 705/1023 [00:19<00:09,   34.42it/s]
 69%|######9   |  : 706/1023 [00:19<00:09,   34.14it/s]
 69%|######9   |  : 707/1023 [00:19<00:09,   33.87it/s]
 69%|######9   |  : 708/1023 [00:19<00:09,   33.63it/s]
 69%|######9   |  : 710/1023 [00:19<00:09,   34.37it/s]
 70%|######9   |  : 711/1023 [00:19<00:09,   34.10it/s]
 70%|######9   |  : 712/1023 [00:19<00:09,   33.84it/s]
 70%|######9   |  : 713/1023 [00:19<00:09,   33.60it/s]
 70%|######9   |  : 715/1023 [00:19<00:08,   34.34it/s]
 70%|######9   |  : 716/1023 [00:19<00:09,   34.07it/s]
 70%|#######   |  : 717/1023 [00:19<00:09,   33.81it/s]
 70%|#######   |  : 719/1023 [00:19<00:08,   34.56it/s]
 70%|#######   |  : 720/1023 [00:19<00:08,   34.27it/s]
 70%|#######   |  : 721/1023 [00:19<00:08,   34.00it/s]
 71%|#######   |  : 722/1023 [00:19<00:08,   33.75it/s]
 71%|#######   |  : 724/1023 [00:19<00:08,   34.49it/s]
 71%|#######   |  : 725/1023 [00:19<00:08,   34.21it/s]
 71%|#######   |  : 726/1023 [00:19<00:08,   33.94it/s]
 71%|#######1  |  : 727/1023 [00:19<00:08,   33.69it/s]
 71%|#######1  |  : 729/1023 [00:19<00:08,   34.43it/s]
 71%|#######1  |  : 730/1023 [00:19<00:08,   34.16it/s]
 71%|#######1  |  : 731/1023 [00:19<00:08,   33.89it/s]
 72%|#######1  |  : 732/1023 [00:20<00:08,   33.65it/s]
 72%|#######1  |  : 734/1023 [00:20<00:08,   34.39it/s]
 72%|#######1  |  : 735/1023 [00:20<00:08,   34.11it/s]
 72%|#######1  |  : 736/1023 [00:20<00:08,   33.86it/s]
 72%|#######2  |  : 737/1023 [00:20<00:08,   33.62it/s]
 72%|#######2  |  : 739/1023 [00:20<00:08,   34.36it/s]
 72%|#######2  |  : 740/1023 [00:20<00:08,   34.09it/s]
 72%|#######2  |  : 741/1023 [00:20<00:08,   33.83it/s]
 73%|#######2  |  : 743/1023 [00:20<00:08,   34.57it/s]
 73%|#######2  |  : 744/1023 [00:20<00:08,   34.28it/s]
 73%|#######2  |  : 745/1023 [00:20<00:08,   34.01it/s]
 73%|#######2  |  : 746/1023 [00:20<00:08,   33.76it/s]
 73%|#######3  |  : 748/1023 [00:20<00:07,   34.50it/s]
 73%|#######3  |  : 749/1023 [00:20<00:08,   34.22it/s]
 73%|#######3  |  : 750/1023 [00:20<00:08,   33.95it/s]
 74%|#######3  |  : 752/1023 [00:20<00:07,   34.69it/s]
 74%|#######3  |  : 753/1023 [00:20<00:07,   34.39it/s]
 74%|#######3  |  : 754/1023 [00:20<00:07,   34.11it/s]
 74%|#######3  |  : 755/1023 [00:20<00:07,   33.85it/s]
 74%|#######3  |  : 757/1023 [00:20<00:07,   34.59it/s]
 74%|#######4  |  : 758/1023 [00:20<00:07,   34.30it/s]
 74%|#######4  |  : 759/1023 [00:20<00:07,   34.03it/s]
 74%|#######4  |  : 760/1023 [00:20<00:07,   33.78it/s]
 74%|#######4  |  : 762/1023 [00:20<00:07,   34.52it/s]
 75%|#######4  |  : 763/1023 [00:20<00:07,   34.24it/s]
 75%|#######4  |  : 764/1023 [00:20<00:07,   33.97it/s]
 75%|#######4  |  : 766/1023 [00:20<00:07,   34.71it/s]
 75%|#######4  |  : 767/1023 [00:20<00:07,   34.42it/s]
 75%|#######5  |  : 768/1023 [00:20<00:07,   34.14it/s]
 75%|#######5  |  : 769/1023 [00:21<00:07,   33.88it/s]
 75%|#######5  |  : 770/1023 [00:21<00:07,   33.64it/s]
 75%|#######5  |  : 772/1023 [00:21<00:07,   34.38it/s]
 76%|#######5  |  : 773/1023 [00:21<00:07,   34.11it/s]
 76%|#######5  |  : 774/1023 [00:21<00:07,   33.85it/s]
 76%|#######5  |  : 775/1023 [00:21<00:07,   33.61it/s]
 76%|#######5  |  : 777/1023 [00:21<00:07,   34.35it/s]
 76%|#######6  |  : 778/1023 [00:21<00:07,   34.08it/s]
 76%|#######6  |  : 779/1023 [00:21<00:07,   33.82it/s]
 76%|#######6  |  : 780/1023 [00:21<00:07,   33.58it/s]
 76%|#######6  |  : 782/1023 [00:21<00:07,   34.33it/s]
 77%|#######6  |  : 783/1023 [00:21<00:07,   34.05it/s]
 77%|#######6  |  : 784/1023 [00:21<00:07,   33.80it/s]
 77%|#######6  |  : 785/1023 [00:21<00:07,   33.57it/s]
 77%|#######6  |  : 787/1023 [00:21<00:06,   34.31it/s]
 77%|#######7  |  : 788/1023 [00:21<00:06,   34.04it/s]
 77%|#######7  |  : 789/1023 [00:21<00:06,   33.78it/s]
 77%|#######7  |  : 790/1023 [00:21<00:06,   33.55it/s]
 77%|#######7  |  : 792/1023 [00:21<00:06,   34.29it/s]
 78%|#######7  |  : 793/1023 [00:21<00:06,   34.02it/s]
 78%|#######7  |  : 794/1023 [00:21<00:06,   33.77it/s]
 78%|#######7  |  : 796/1023 [00:21<00:06,   34.51it/s]
 78%|#######7  |  : 797/1023 [00:21<00:06,   34.23it/s]
 78%|#######8  |  : 798/1023 [00:21<00:06,   33.96it/s]
 78%|#######8  |  : 799/1023 [00:21<00:06,   33.71it/s]
 78%|#######8  |  : 801/1023 [00:21<00:06,   34.45it/s]
 78%|#######8  |  : 802/1023 [00:21<00:06,   34.17it/s]
 78%|#######8  |  : 803/1023 [00:21<00:06,   33.91it/s]
 79%|#######8  |  : 805/1023 [00:21<00:06,   34.65it/s]
 79%|#######8  |  : 806/1023 [00:21<00:06,   34.36it/s]
 79%|#######8  |  : 807/1023 [00:22<00:06,   34.08it/s]
 79%|#######8  |  : 808/1023 [00:22<00:06,   33.82it/s]
 79%|#######9  |  : 810/1023 [00:22<00:06,   34.56it/s]
 79%|#######9  |  : 811/1023 [00:22<00:06,   34.28it/s]
 79%|#######9  |  : 812/1023 [00:22<00:06,   34.01it/s]
 80%|#######9  |  : 814/1023 [00:22<00:06,   34.75it/s]
 80%|#######9  |  : 815/1023 [00:22<00:06,   34.45it/s]
 80%|#######9  |  : 816/1023 [00:22<00:06,   34.07it/s]
 80%|#######9  |  : 818/1023 [00:22<00:05,   34.81it/s]
 80%|########  |  : 819/1023 [00:22<00:05,   34.50it/s]
 80%|########  |  : 820/1023 [00:22<00:05,   34.22it/s]
 80%|########  |  : 821/1023 [00:22<00:05,   33.96it/s]
 80%|########  |  : 823/1023 [00:22<00:05,   34.70it/s]
 81%|########  |  : 824/1023 [00:22<00:05,   34.40it/s]
 81%|########  |  : 825/1023 [00:22<00:05,   34.12it/s]
 81%|########  |  : 827/1023 [00:22<00:05,   34.86it/s]
 81%|########  |  : 828/1023 [00:22<00:05,   34.54it/s]
 81%|########1 |  : 829/1023 [00:22<00:05,   34.25it/s]
 81%|########1 |  : 830/1023 [00:22<00:05,   33.98it/s]
 81%|########1 |  : 832/1023 [00:22<00:05,   34.72it/s]
 81%|########1 |  : 833/1023 [00:22<00:05,   34.41it/s]
 82%|########1 |  : 834/1023 [00:22<00:05,   34.13it/s]
 82%|########1 |  : 836/1023 [00:22<00:05,   34.87it/s]
 82%|########1 |  : 837/1023 [00:22<00:05,   34.56it/s]
 82%|########1 |  : 838/1023 [00:22<00:05,   34.27it/s]
 82%|########2 |  : 839/1023 [00:22<00:05,   34.00it/s]
 82%|########2 |  : 841/1023 [00:22<00:05,   34.73it/s]
 82%|########2 |  : 842/1023 [00:22<00:05,   34.43it/s]
 82%|########2 |  : 843/1023 [00:22<00:05,   34.15it/s]
 83%|########2 |  : 845/1023 [00:22<00:05,   34.88it/s]
 83%|########2 |  : 846/1023 [00:23<00:05,   34.57it/s]
 83%|########2 |  : 847/1023 [00:23<00:05,   34.27it/s]
 83%|########2 |  : 848/1023 [00:23<00:05,   34.00it/s]
 83%|########3 |  : 850/1023 [00:23<00:04,   34.74it/s]
 83%|########3 |  : 851/1023 [00:23<00:04,   34.43it/s]
 83%|########3 |  : 852/1023 [00:23<00:05,   34.15it/s]
 83%|########3 |  : 854/1023 [00:23<00:04,   34.88it/s]
 84%|########3 |  : 855/1023 [00:23<00:04,   34.57it/s]
 84%|########3 |  : 856/1023 [00:23<00:04,   34.28it/s]
 84%|########3 |  : 857/1023 [00:23<00:04,   34.01it/s]
 84%|########3 |  : 859/1023 [00:23<00:04,   34.75it/s]
 84%|########4 |  : 860/1023 [00:23<00:04,   34.44it/s]
 84%|########4 |  : 861/1023 [00:23<00:04,   34.16it/s]
 84%|########4 |  : 863/1023 [00:23<00:04,   34.90it/s]
 84%|########4 |  : 864/1023 [00:23<00:04,   34.58it/s]
 85%|########4 |  : 865/1023 [00:23<00:04,   34.29it/s]
 85%|########4 |  : 866/1023 [00:23<00:04,   34.02it/s]
 85%|########4 |  : 868/1023 [00:23<00:04,   34.76it/s]
 85%|########4 |  : 869/1023 [00:23<00:04,   34.45it/s]
 85%|########5 |  : 870/1023 [00:23<00:04,   34.17it/s]
 85%|########5 |  : 871/1023 [00:23<00:04,   33.90it/s]
 85%|########5 |  : 873/1023 [00:23<00:04,   34.64it/s]
 85%|########5 |  : 874/1023 [00:23<00:04,   34.34it/s]
 86%|########5 |  : 875/1023 [00:23<00:04,   34.07it/s]
 86%|########5 |  : 876/1023 [00:23<00:04,   33.81it/s]
 86%|########5 |  : 878/1023 [00:23<00:04,   34.54it/s]
 86%|########5 |  : 879/1023 [00:23<00:04,   34.26it/s]
 86%|########6 |  : 880/1023 [00:23<00:04,   33.99it/s]
 86%|########6 |  : 882/1023 [00:23<00:04,   34.72it/s]
 86%|########6 |  : 883/1023 [00:24<00:04,   34.42it/s]
 86%|########6 |  : 884/1023 [00:24<00:04,   34.14it/s]
 87%|########6 |  : 885/1023 [00:24<00:04,   33.88it/s]
 87%|########6 |  : 887/1023 [00:24<00:03,   34.62it/s]
 87%|########6 |  : 888/1023 [00:24<00:03,   34.32it/s]
 87%|########6 |  : 889/1023 [00:24<00:03,   34.04it/s]
 87%|########6 |  : 890/1023 [00:24<00:03,   33.78it/s]
 87%|########7 |  : 892/1023 [00:24<00:03,   34.52it/s]
 87%|########7 |  : 893/1023 [00:24<00:03,   34.23it/s]
 87%|########7 |  : 894/1023 [00:24<00:03,   33.97it/s]
 88%|########7 |  : 896/1023 [00:24<00:03,   34.70it/s]
 88%|########7 |  : 897/1023 [00:24<00:03,   34.40it/s]
 88%|########7 |  : 898/1023 [00:24<00:03,   34.12it/s]
 88%|########7 |  : 899/1023 [00:24<00:03,   33.85it/s]
 88%|########8 |  : 901/1023 [00:24<00:03,   34.59it/s]
 88%|########8 |  : 902/1023 [00:24<00:03,   34.29it/s]
 88%|########8 |  : 903/1023 [00:24<00:03,   34.02it/s]
 88%|########8 |  : 904/1023 [00:24<00:03,   33.76it/s]
 89%|########8 |  : 906/1023 [00:24<00:03,   34.50it/s]
 89%|########8 |  : 907/1023 [00:24<00:03,   34.21it/s]
 89%|########8 |  : 908/1023 [00:24<00:03,   33.94it/s]
 89%|########8 |  : 909/1023 [00:24<00:03,   33.69it/s]
 89%|########9 |  : 911/1023 [00:24<00:03,   34.43it/s]
 89%|########9 |  : 912/1023 [00:24<00:03,   34.15it/s]
 89%|########9 |  : 913/1023 [00:24<00:03,   33.88it/s]
 89%|########9 |  : 915/1023 [00:24<00:03,   34.62it/s]
 90%|########9 |  : 916/1023 [00:24<00:03,   34.33it/s]
 90%|########9 |  : 917/1023 [00:24<00:03,   34.06it/s]
 90%|########9 |  : 918/1023 [00:24<00:03,   33.80it/s]
 90%|########9 |  : 920/1023 [00:24<00:02,   34.54it/s]
 90%|######### |  : 921/1023 [00:25<00:02,   34.25it/s]
 90%|######### |  : 922/1023 [00:25<00:02,   33.98it/s]
 90%|######### |  : 923/1023 [00:25<00:02,   33.73it/s]
 90%|######### |  : 925/1023 [00:25<00:02,   34.48it/s]
 91%|######### |  : 926/1023 [00:25<00:02,   34.20it/s]
 91%|######### |  : 927/1023 [00:25<00:02,   33.93it/s]
 91%|######### |  : 929/1023 [00:25<00:02,   34.67it/s]
 91%|######### |  : 930/1023 [00:25<00:02,   34.38it/s]
 91%|#########1|  : 931/1023 [00:25<00:02,   34.10it/s]
 91%|#########1|  : 932/1023 [00:25<00:02,   33.84it/s]
 91%|#########1|  : 934/1023 [00:25<00:02,   34.58it/s]
 91%|#########1|  : 935/1023 [00:25<00:02,   34.30it/s]
 91%|#########1|  : 936/1023 [00:25<00:02,   34.03it/s]
 92%|#########1|  : 937/1023 [00:25<00:02,   33.78it/s]
 92%|#########1|  : 939/1023 [00:25<00:02,   34.51it/s]
 92%|#########1|  : 940/1023 [00:25<00:02,   34.23it/s]
 92%|#########1|  : 941/1023 [00:25<00:02,   33.96it/s]
 92%|#########2|  : 943/1023 [00:25<00:02,   34.70it/s]
 92%|#########2|  : 944/1023 [00:25<00:02,   34.40it/s]
 92%|#########2|  : 945/1023 [00:25<00:02,   34.12it/s]
 92%|#########2|  : 946/1023 [00:25<00:02,   33.86it/s]
 93%|#########2|  : 948/1023 [00:25<00:02,   34.61it/s]
 93%|#########2|  : 949/1023 [00:25<00:02,   34.32it/s]
 93%|#########2|  : 950/1023 [00:25<00:02,   34.05it/s]
 93%|#########2|  : 951/1023 [00:25<00:02,   33.79it/s]
 93%|#########3|  : 953/1023 [00:25<00:02,   34.53it/s]
 93%|#########3|  : 954/1023 [00:25<00:02,   34.24it/s]
 93%|#########3|  : 955/1023 [00:25<00:02,   33.97it/s]
 93%|#########3|  : 956/1023 [00:25<00:01,   33.72it/s]
 94%|#########3|  : 958/1023 [00:26<00:01,   34.46it/s]
 94%|#########3|  : 959/1023 [00:26<00:01,   34.18it/s]
 94%|#########3|  : 960/1023 [00:26<00:01,   33.91it/s]
 94%|#########4|  : 962/1023 [00:26<00:01,   34.65it/s]
 94%|#########4|  : 963/1023 [00:26<00:01,   34.36it/s]
 94%|#########4|  : 964/1023 [00:26<00:01,   34.08it/s]
 94%|#########4|  : 965/1023 [00:26<00:01,   33.83it/s]
 95%|#########4|  : 967/1023 [00:26<00:01,   34.57it/s]
 95%|#########4|  : 968/1023 [00:26<00:01,   34.27it/s]
 95%|#########4|  : 969/1023 [00:26<00:01,   34.01it/s]
 95%|#########4|  : 970/1023 [00:26<00:01,   33.75it/s]
 95%|#########5|  : 972/1023 [00:26<00:01,   34.49it/s]
 95%|#########5|  : 973/1023 [00:26<00:01,   34.21it/s]
 95%|#########5|  : 974/1023 [00:26<00:01,   33.94it/s]
 95%|#########5|  : 975/1023 [00:26<00:01,   33.70it/s]
 95%|#########5|  : 976/1023 [00:26<00:01,   33.47it/s]
 96%|#########5|  : 978/1023 [00:26<00:01,   34.21it/s]
 96%|#########5|  : 979/1023 [00:26<00:01,   33.95it/s]
 96%|#########5|  : 980/1023 [00:26<00:01,   33.70it/s]
 96%|#########5|  : 981/1023 [00:26<00:01,   33.47it/s]
 96%|#########6|  : 983/1023 [00:26<00:01,   34.21it/s]
 96%|#########6|  : 984/1023 [00:26<00:01,   33.95it/s]
 96%|#########6|  : 985/1023 [00:26<00:01,   33.70it/s]
 96%|#########6|  : 987/1023 [00:26<00:01,   34.45it/s]
 97%|#########6|  : 988/1023 [00:26<00:01,   34.17it/s]
 97%|#########6|  : 989/1023 [00:26<00:01,   33.90it/s]
 97%|#########6|  : 990/1023 [00:26<00:00,   33.66it/s]
 97%|#########6|  : 992/1023 [00:26<00:00,   34.40it/s]
 97%|#########7|  : 993/1023 [00:26<00:00,   34.13it/s]
 97%|#########7|  : 994/1023 [00:26<00:00,   33.87it/s]
 97%|#########7|  : 996/1023 [00:27<00:00,   34.61it/s]
 97%|#########7|  : 997/1023 [00:27<00:00,   34.31it/s]
 98%|#########7|  : 998/1023 [00:27<00:00,   34.04it/s]
 98%|#########7|  : 999/1023 [00:27<00:00,   33.78it/s]
 98%|#########7|  : 1001/1023 [00:27<00:00,   34.52it/s]
 98%|#########7|  : 1002/1023 [00:27<00:00,   34.23it/s]
 98%|#########8|  : 1003/1023 [00:27<00:00,   33.97it/s]
 98%|#########8|  : 1004/1023 [00:27<00:00,   33.72it/s]
 98%|#########8|  : 1006/1023 [00:27<00:00,   34.46it/s]
 98%|#########8|  : 1007/1023 [00:27<00:00,   34.18it/s]
 99%|#########8|  : 1008/1023 [00:27<00:00,   33.91it/s]
 99%|#########8|  : 1009/1023 [00:27<00:00,   33.67it/s]
 99%|#########8|  : 1011/1023 [00:27<00:00,   34.41it/s]
 99%|#########8|  : 1012/1023 [00:27<00:00,   34.13it/s]
 99%|#########9|  : 1013/1023 [00:27<00:00,   33.87it/s]
 99%|#########9|  : 1015/1023 [00:27<00:00,   34.61it/s]
 99%|#########9|  : 1016/1023 [00:27<00:00,   34.32it/s]
 99%|#########9|  : 1017/1023 [00:27<00:00,   34.05it/s]
100%|#########9|  : 1018/1023 [00:27<00:00,   33.79it/s]
100%|#########9|  : 1020/1023 [00:27<00:00,   34.53it/s]
100%|#########9|  : 1021/1023 [00:27<00:00,   34.24it/s]
100%|#########9|  : 1022/1023 [00:27<00:00,   33.97it/s]
100%|##########|  : 1023/1023 [00:27<00:00,   36.87it/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 42.351 seconds)

Estimated memory usage: 58 MB

Gallery generated by Sphinx-Gallery