Extracting and visualizing subject head movement#

Continuous head movement can be encoded during MEG recordings by use of HPI coils that continuously emit sinusoidal signals. These signals can then be extracted from the recording and used to estimate head position as a function of time. Here we show an example of how to do this, and how to visualize the result.

HPI frequencies#

First let’s load a short bit of raw data where the subject intentionally moved their head during the recording. Its power spectral density shows five peaks (most clearly visible in the gradiometers) corresponding to the HPI coil frequencies, plus other peaks related to power line interference (60 Hz and harmonics).

# Authors: Eric Larson <larson.eric.d@gmail.com>
#          Richard Höchenberger <richard.hoechenberger@gmail.com>
#          Daniel McCloy <dan@mccloy.info>
#
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.
from os import path as op

import mne

data_path = op.join(mne.datasets.testing.data_path(verbose=True), "SSS")
fname_raw = op.join(data_path, "test_move_anon_raw.fif")
raw = mne.io.read_raw_fif(fname_raw, allow_maxshield="yes").load_data()
raw.compute_psd().plot(picks="data", exclude="bads", amplitude=False)
EEG, Gradiometers, Magnetometers
Opening raw data file /home/circleci/mne_data/MNE-testing-data/SSS/test_move_anon_raw.fif...
    Read a total of 12 projection items:
        mag.fif : PCA-v1 (1 x 306)  idle
        mag.fif : PCA-v2 (1 x 306)  idle
        mag.fif : PCA-v3 (1 x 306)  idle
        mag.fif : PCA-v4 (1 x 306)  idle
        mag.fif : PCA-v5 (1 x 306)  idle
        mag.fif : PCA-v6 (1 x 306)  idle
        mag.fif : PCA-v7 (1 x 306)  idle
        grad.fif : PCA-v1 (1 x 306)  idle
        grad.fif : PCA-v2 (1 x 306)  idle
        grad.fif : PCA-v3 (1 x 306)  idle
        grad.fif : PCA-v4 (1 x 306)  idle
        Average EEG reference (1 x 60)  idle
    Range : 10800 ... 31199 =      9.000 ...    25.999 secs
Ready.
Reading 0 ... 20399  =      0.000 ...    16.999 secs...
Effective window size : 1.707 (s)
Plotting power spectral density (dB=True).

We can use mne.chpi.get_chpi_info to retrieve the coil frequencies, the index of the channel indicating when which coil was switched on, and the respective “event codes” associated with each coil’s activity.

chpi_freqs, ch_idx, chpi_codes = mne.chpi.get_chpi_info(info=raw.info)
print(f"cHPI coil frequencies extracted from raw: {chpi_freqs} Hz")
Using 5 HPI coils: 83 143 203 263 323 Hz
cHPI coil frequencies extracted from raw: [ 83. 143. 203. 263. 323.] Hz

Estimating continuous head position#

First, let’s extract the HPI coil amplitudes as a function of time:

Using 5 HPI coils: 83 143 203 263 323 Hz
Line interference frequencies: 60.0 120.0 180.0 240.0 300.0 360.0 Hz
Using time window: 83.3 ms
Fitting 5 HPI coil locations at up to 1696 time points (17.0 s duration)

  0%|          | cHPI amplitudes : 0/1696 [00:00<?,       ?it/s]
  0%|          | cHPI amplitudes : 1/1696 [00:05<2:23:06,    5.07s/it]
  1%|          | cHPI amplitudes : 12/1696 [00:05<11:20,    2.47it/s]
  1%|▏         | cHPI amplitudes : 22/1696 [00:05<06:00,    4.64it/s]
  2%|▏         | cHPI amplitudes : 34/1696 [00:05<03:45,    7.35it/s]
  3%|▎         | cHPI amplitudes : 47/1696 [00:05<02:38,   10.43it/s]
  4%|▎         | cHPI amplitudes : 60/1696 [00:05<01:59,   13.64it/s]
  4%|▍         | cHPI amplitudes : 74/1696 [00:05<01:34,   17.26it/s]
  5%|▌         | cHPI amplitudes : 88/1696 [00:05<01:16,   21.02it/s]
  6%|▌         | cHPI amplitudes : 100/1696 [00:05<01:05,   24.38it/s]
  7%|▋         | cHPI amplitudes : 112/1696 [00:05<00:56,   27.88it/s]
  7%|▋         | cHPI amplitudes : 125/1696 [00:05<00:49,   31.83it/s]
  8%|▊         | cHPI amplitudes : 137/1696 [00:05<00:43,   35.63it/s]
  9%|▉         | cHPI amplitudes : 149/1696 [00:05<00:39,   39.58it/s]
 10%|▉         | cHPI amplitudes : 162/1696 [00:05<00:34,   44.05it/s]
 10%|█         | cHPI amplitudes : 176/1696 [00:05<00:30,   49.07it/s]
 11%|█         | cHPI amplitudes : 187/1696 [00:05<00:28,   53.11it/s]
 12%|█▏        | cHPI amplitudes : 197/1696 [00:05<00:26,   56.88it/s]
 12%|█▏        | cHPI amplitudes : 210/1696 [00:05<00:23,   62.09it/s]
 13%|█▎        | cHPI amplitudes : 224/1696 [00:05<00:21,   67.94it/s]
 14%|█▍        | cHPI amplitudes : 238/1696 [00:05<00:19,   74.01it/s]
 15%|█▍        | cHPI amplitudes : 251/1696 [00:05<00:18,   79.80it/s]
 16%|█▌        | cHPI amplitudes : 264/1696 [00:05<00:16,   85.77it/s]
 16%|█▋        | cHPI amplitudes : 276/1696 [00:05<00:15,   91.43it/s]
 17%|█▋        | cHPI amplitudes : 288/1696 [00:05<00:14,   97.30it/s]
 18%|█▊        | cHPI amplitudes : 301/1696 [00:05<00:13,  103.91it/s]
 19%|█▊        | cHPI amplitudes : 314/1696 [00:05<00:12,  110.74it/s]
 19%|█▉        | cHPI amplitudes : 328/1696 [00:05<00:11,  118.45it/s]
 20%|█▉        | cHPI amplitudes : 339/1696 [00:05<00:10,  124.43it/s]
 21%|██        | cHPI amplitudes : 349/1696 [00:05<00:10,  129.85it/s]
 21%|██▏       | cHPI amplitudes : 362/1696 [00:05<00:09,  137.53it/s]
 22%|██▏       | cHPI amplitudes : 375/1696 [00:05<00:09,  145.53it/s]
 23%|██▎       | cHPI amplitudes : 388/1696 [00:05<00:08,  153.63it/s]
 24%|██▎       | cHPI amplitudes : 402/1696 [00:05<00:07,  162.78it/s]
 25%|██▍       | cHPI amplitudes : 416/1696 [00:05<00:07,  172.14it/s]
 25%|██▌       | cHPI amplitudes : 429/1696 [00:05<00:07,  180.81it/s]
 26%|██▌       | cHPI amplitudes : 442/1696 [00:05<00:06,  189.64it/s]
 27%|██▋       | cHPI amplitudes : 454/1696 [00:05<00:06,  197.91it/s]
 27%|██▋       | cHPI amplitudes : 466/1696 [00:05<00:05,  206.37it/s]
 28%|██▊       | cHPI amplitudes : 479/1696 [00:05<00:05,  215.74it/s]
 29%|██▉       | cHPI amplitudes : 492/1696 [00:05<00:05,  225.27it/s]
 30%|██▉       | cHPI amplitudes : 506/1696 [00:05<00:05,  236.22it/s]
 30%|███       | cHPI amplitudes : 517/1696 [00:05<00:04,  244.01it/s]
 31%|███       | cHPI amplitudes : 528/1696 [00:05<00:04,  251.64it/s]
 32%|███▏      | cHPI amplitudes : 540/1696 [00:05<00:04,  260.78it/s]
 33%|███▎      | cHPI amplitudes : 554/1696 [00:05<00:04,  272.32it/s]
 33%|███▎      | cHPI amplitudes : 568/1696 [00:05<00:03,  284.05it/s]
 34%|███▍      | cHPI amplitudes : 581/1696 [00:05<00:03,  294.62it/s]
 35%|███▍      | cHPI amplitudes : 593/1696 [00:05<00:03,  304.13it/s]
 36%|███▌      | cHPI amplitudes : 606/1696 [00:05<00:03,  314.57it/s]
 36%|███▋      | cHPI amplitudes : 619/1696 [00:05<00:03,  325.16it/s]
 37%|███▋      | cHPI amplitudes : 632/1696 [00:05<00:03,  335.69it/s]
 38%|███▊      | cHPI amplitudes : 645/1696 [00:05<00:03,  346.30it/s]
 39%|███▉      | cHPI amplitudes : 659/1696 [00:05<00:02,  358.82it/s]
 40%|███▉      | cHPI amplitudes : 671/1696 [00:05<00:02,  367.87it/s]
 40%|████      | cHPI amplitudes : 681/1696 [00:05<00:02,  374.32it/s]
 41%|████      | cHPI amplitudes : 693/1696 [00:05<00:02,  383.52it/s]
 42%|████▏     | cHPI amplitudes : 707/1696 [00:06<00:02,  395.88it/s]
 42%|████▏     | cHPI amplitudes : 720/1696 [00:06<00:02,  406.41it/s]
 43%|████▎     | cHPI amplitudes : 734/1696 [00:06<00:02,  418.70it/s]
 44%|████▍     | cHPI amplitudes : 748/1696 [00:06<00:02,  430.97it/s]
 45%|████▍     | cHPI amplitudes : 761/1696 [00:06<00:02,  441.09it/s]
 46%|████▌     | cHPI amplitudes : 773/1696 [00:06<00:02,  450.18it/s]
 46%|████▋     | cHPI amplitudes : 785/1696 [00:06<00:01,  459.06it/s]
 47%|████▋     | cHPI amplitudes : 797/1696 [00:06<00:01,  467.94it/s]
 48%|████▊     | cHPI amplitudes : 810/1696 [00:06<00:01,  477.85it/s]
 48%|████▊     | cHPI amplitudes : 822/1696 [00:06<00:01,  486.44it/s]
 49%|████▉     | cHPI amplitudes : 836/1696 [00:06<00:01,  498.31it/s]
 50%|█████     | cHPI amplitudes : 848/1696 [00:06<00:01,  506.06it/s]
 51%|█████     | cHPI amplitudes : 859/1696 [00:06<00:01,  509.87it/s]
 51%|█████▏    | cHPI amplitudes : 871/1696 [00:06<00:01,  517.13it/s]
 52%|█████▏    | cHPI amplitudes : 885/1696 [00:06<00:01,  528.23it/s]
 53%|█████▎    | cHPI amplitudes : 899/1696 [00:06<00:01,  539.35it/s]
 54%|█████▍    | cHPI amplitudes : 912/1696 [00:06<00:01,  548.17it/s]
 54%|█████▍    | cHPI amplitudes : 924/1696 [00:06<00:01,  555.01it/s]
 55%|█████▌    | cHPI amplitudes : 936/1696 [00:06<00:01,  562.04it/s]
 56%|█████▌    | cHPI amplitudes : 949/1696 [00:06<00:01,  569.56it/s]
 57%|█████▋    | cHPI amplitudes : 962/1696 [00:06<00:01,  577.36it/s]
 57%|█████▋    | cHPI amplitudes : 974/1696 [00:06<00:01,  583.57it/s]
 58%|█████▊    | cHPI amplitudes : 988/1696 [00:06<00:01,  593.66it/s]
 59%|█████▉    | cHPI amplitudes : 1000/1696 [00:06<00:01,  598.79it/s]
 60%|█████▉    | cHPI amplitudes : 1011/1696 [00:06<00:01,  600.24it/s]
 60%|██████    | cHPI amplitudes : 1022/1696 [00:06<00:01,  603.53it/s]
 61%|██████    | cHPI amplitudes : 1035/1696 [00:06<00:01,  611.34it/s]
 62%|██████▏   | cHPI amplitudes : 1047/1696 [00:06<00:01,  616.75it/s]
 63%|██████▎   | cHPI amplitudes : 1061/1696 [00:06<00:01,  625.79it/s]
 63%|██████▎   | cHPI amplitudes : 1075/1696 [00:06<00:00,  634.46it/s]
 64%|██████▍   | cHPI amplitudes : 1088/1696 [00:06<00:00,  641.13it/s]
 65%|██████▍   | cHPI amplitudes : 1101/1696 [00:06<00:00,  646.23it/s]
 66%|██████▌   | cHPI amplitudes : 1113/1696 [00:06<00:00,  650.13it/s]
 66%|██████▋   | cHPI amplitudes : 1126/1696 [00:06<00:00,  655.32it/s]
 67%|██████▋   | cHPI amplitudes : 1139/1696 [00:06<00:00,  659.58it/s]
 68%|██████▊   | cHPI amplitudes : 1152/1696 [00:06<00:00,  664.42it/s]
 69%|██████▉   | cHPI amplitudes : 1166/1696 [00:06<00:00,  672.01it/s]
 69%|██████▉   | cHPI amplitudes : 1178/1696 [00:06<00:00,  674.48it/s]
 70%|███████   | cHPI amplitudes : 1189/1696 [00:06<00:00,  674.57it/s]
 71%|███████   | cHPI amplitudes : 1199/1696 [00:06<00:00,  671.91it/s]
 71%|███████▏  | cHPI amplitudes : 1212/1696 [00:06<00:00,  677.65it/s]
 72%|███████▏  | cHPI amplitudes : 1226/1696 [00:06<00:00,  684.58it/s]
 73%|███████▎  | cHPI amplitudes : 1239/1696 [00:06<00:00,  690.06it/s]
 74%|███████▍  | cHPI amplitudes : 1252/1696 [00:06<00:00,  692.84it/s]
 75%|███████▍  | cHPI amplitudes : 1264/1696 [00:06<00:00,  695.17it/s]
 75%|███████▌  | cHPI amplitudes : 1277/1696 [00:06<00:00,  698.12it/s]
 76%|███████▌  | cHPI amplitudes : 1290/1696 [00:06<00:00,  700.78it/s]
 77%|███████▋  | cHPI amplitudes : 1303/1696 [00:06<00:00,  703.34it/s]
 78%|███████▊  | cHPI amplitudes : 1317/1696 [00:06<00:00,  709.39it/s]
 78%|███████▊  | cHPI amplitudes : 1329/1696 [00:06<00:00,  710.68it/s]
 79%|███████▉  | cHPI amplitudes : 1340/1696 [00:06<00:00,  709.17it/s]
 80%|███████▉  | cHPI amplitudes : 1350/1696 [00:06<00:00,  704.77it/s]
 80%|████████  | cHPI amplitudes : 1364/1696 [00:06<00:00,  710.74it/s]
 81%|████████  | cHPI amplitudes : 1377/1696 [00:06<00:00,  714.70it/s]
 82%|████████▏ | cHPI amplitudes : 1391/1696 [00:06<00:00,  719.70it/s]
 83%|████████▎ | cHPI amplitudes : 1403/1696 [00:06<00:00,  720.97it/s]
 83%|████████▎ | cHPI amplitudes : 1415/1696 [00:06<00:00,  722.20it/s]
 84%|████████▍ | cHPI amplitudes : 1427/1696 [00:06<00:00,  723.06it/s]
 85%|████████▍ | cHPI amplitudes : 1439/1696 [00:06<00:00,  724.03it/s]
 86%|████████▌ | cHPI amplitudes : 1452/1696 [00:06<00:00,  725.42it/s]
 86%|████████▋ | cHPI amplitudes : 1465/1696 [00:07<00:00,  729.27it/s]
 87%|████████▋ | cHPI amplitudes : 1478/1696 [00:07<00:00,  729.46it/s]
 88%|████████▊ | cHPI amplitudes : 1490/1696 [00:07<00:00,  729.45it/s]
 89%|████████▊ | cHPI amplitudes : 1501/1696 [00:07<00:00,  725.35it/s]
 89%|████████▉ | cHPI amplitudes : 1514/1696 [00:07<00:00,  727.47it/s]
 90%|████████▉ | cHPI amplitudes : 1526/1696 [00:07<00:00,  727.71it/s]
 91%|█████████ | cHPI amplitudes : 1540/1696 [00:07<00:00,  732.43it/s]
 92%|█████████▏| cHPI amplitudes : 1554/1696 [00:07<00:00,  736.85it/s]
 92%|█████████▏| cHPI amplitudes : 1568/1696 [00:07<00:00,  741.05it/s]
 93%|█████████▎| cHPI amplitudes : 1580/1696 [00:07<00:00,  740.70it/s]
 94%|█████████▍| cHPI amplitudes : 1592/1696 [00:07<00:00,  740.69it/s]
 95%|█████████▍| cHPI amplitudes : 1604/1696 [00:07<00:00,  740.63it/s]
 95%|█████████▌| cHPI amplitudes : 1616/1696 [00:07<00:00,  740.48it/s]
 96%|█████████▌| cHPI amplitudes : 1628/1696 [00:07<00:00,  740.43it/s]
 97%|█████████▋| cHPI amplitudes : 1641/1696 [00:07<00:00,  742.25it/s]
 98%|█████████▊| cHPI amplitudes : 1655/1696 [00:07<00:00,  747.46it/s]
 98%|█████████▊| cHPI amplitudes : 1666/1696 [00:07<00:00,  743.31it/s]
 99%|█████████▉| cHPI amplitudes : 1676/1696 [00:07<00:00,  734.38it/s]
100%|█████████▉| cHPI amplitudes : 1688/1696 [00:07<00:00,  734.96it/s]
100%|██████████| cHPI amplitudes : 1696/1696 [00:07<00:00,  231.92it/s]

Second, let’s compute time-varying HPI coil locations from these:

Computing 4385 HPI location guesses (1 cm grid in a 10.7 cm sphere)
HPIFIT: 5 coils digitized in order 5 1 4 3 2
HPI consistency of isotrak and hpifit is OK.

  0%|          | cHPI locations  : 0/1696 [00:00<?,       ?it/s]
  0%|          | cHPI locations  : 1/1696 [00:01<36:22,    1.29s/it]
  2%|▏         | cHPI locations  : 33/1696 [00:01<01:02,   26.59it/s]
  4%|▍         | cHPI locations  : 64/1696 [00:01<00:31,   52.20it/s]
  6%|▌         | cHPI locations  : 96/1696 [00:01<00:20,   79.29it/s]
  6%|▌         | cHPI locations  : 101/1696 [00:01<00:20,   77.54it/s]
  8%|▊         | cHPI locations  : 133/1696 [00:01<00:14,  104.50it/s]
 10%|▉         | cHPI locations  : 166/1696 [00:01<00:11,  133.00it/s]
 12%|█▏        | cHPI locations  : 198/1696 [00:01<00:09,  161.18it/s]
 12%|█▏        | cHPI locations  : 201/1696 [00:01<00:09,  152.41it/s]
 14%|█▎        | cHPI locations  : 232/1696 [00:01<00:08,  179.65it/s]
 16%|█▌        | cHPI locations  : 264/1696 [00:01<00:06,  208.45it/s]
 18%|█▊        | cHPI locations  : 297/1696 [00:01<00:05,  238.80it/s]
 18%|█▊        | cHPI locations  : 301/1696 [00:01<00:06,  225.51it/s]
 20%|█▉        | cHPI locations  : 339/1696 [00:01<00:05,  261.05it/s]
 22%|██▏       | cHPI locations  : 374/1696 [00:01<00:04,  294.05it/s]
 24%|██▎       | cHPI locations  : 401/1696 [00:01<00:04,  295.08it/s]
 26%|██▌       | cHPI locations  : 438/1696 [00:01<00:03,  329.25it/s]
 28%|██▊       | cHPI locations  : 469/1696 [00:01<00:03,  357.41it/s]
 29%|██▉       | cHPI locations  : 500/1696 [00:01<00:03,  386.06it/s]
 30%|██▉       | cHPI locations  : 501/1696 [00:01<00:03,  353.57it/s]
 31%|███▏      | cHPI locations  : 534/1696 [00:01<00:03,  384.21it/s]
 33%|███▎      | cHPI locations  : 559/1696 [00:02<00:03,  360.38it/s]
 33%|███▎      | cHPI locations  : 568/1696 [00:02<00:03,  329.51it/s]
 34%|███▍      | cHPI locations  : 573/1696 [00:02<00:03,  299.27it/s]
 34%|███▍      | cHPI locations  : 577/1696 [00:02<00:04,  275.28it/s]
 34%|███▍      | cHPI locations  : 581/1696 [00:02<00:04,  251.27it/s]
 35%|███▍      | cHPI locations  : 587/1696 [00:02<00:04,  233.79it/s]
 35%|███▌      | cHPI locations  : 600/1696 [00:02<00:04,  223.20it/s]
 37%|███▋      | cHPI locations  : 630/1696 [00:02<00:04,  244.07it/s]
 39%|███▉      | cHPI locations  : 661/1696 [00:02<00:03,  266.23it/s]
 41%|████      | cHPI locations  : 697/1696 [00:02<00:03,  293.22it/s]
 41%|████▏     | cHPI locations  : 700/1696 [00:02<00:03,  270.43it/s]
 43%|████▎     | cHPI locations  : 737/1696 [00:02<00:03,  298.13it/s]
 46%|████▌     | cHPI locations  : 773/1696 [00:02<00:02,  325.68it/s]
 47%|████▋     | cHPI locations  : 789/1696 [00:03<00:02,  309.15it/s]
 47%|████▋     | cHPI locations  : 794/1696 [00:03<00:03,  286.20it/s]
 47%|████▋     | cHPI locations  : 800/1696 [00:03<00:03,  267.01it/s]
 47%|████▋     | cHPI locations  : 805/1696 [00:03<00:03,  248.12it/s]
 48%|████▊     | cHPI locations  : 810/1696 [00:03<00:03,  231.94it/s]
 48%|████▊     | cHPI locations  : 815/1696 [00:03<00:04,  219.00it/s]
 48%|████▊     | cHPI locations  : 819/1696 [00:03<00:04,  205.65it/s]
 49%|████▊     | cHPI locations  : 823/1696 [00:03<00:04,  193.03it/s]
 49%|████▉     | cHPI locations  : 827/1696 [00:03<00:04,  182.54it/s]
 49%|████▉     | cHPI locations  : 833/1696 [00:04<00:05,  171.20it/s]
 50%|█████     | cHPI locations  : 848/1696 [00:04<00:05,  169.21it/s]
 52%|█████▏    | cHPI locations  : 885/1696 [00:04<00:04,  191.70it/s]
 54%|█████▍    | cHPI locations  : 920/1696 [00:04<00:03,  213.44it/s]
 56%|█████▌    | cHPI locations  : 948/1696 [00:04<00:03,  214.07it/s]
 58%|█████▊    | cHPI locations  : 987/1696 [00:04<00:02,  238.46it/s]
 61%|██████    | cHPI locations  : 1028/1696 [00:04<00:02,  264.93it/s]
 61%|██████▏   | cHPI locations  : 1040/1696 [00:04<00:02,  253.66it/s]
 62%|██████▏   | cHPI locations  : 1051/1696 [00:04<00:02,  241.59it/s]
 63%|██████▎   | cHPI locations  : 1062/1696 [00:04<00:02,  231.69it/s]
 63%|██████▎   | cHPI locations  : 1072/1696 [00:04<00:02,  220.75it/s]
 64%|██████▍   | cHPI locations  : 1086/1696 [00:04<00:02,  215.37it/s]
 66%|██████▌   | cHPI locations  : 1121/1696 [00:04<00:02,  236.12it/s]
 68%|██████▊   | cHPI locations  : 1156/1696 [00:04<00:02,  257.54it/s]
 70%|██████▉   | cHPI locations  : 1186/1696 [00:05<00:01,  258.93it/s]
 72%|███████▏  | cHPI locations  : 1221/1696 [00:05<00:01,  280.40it/s]
 74%|███████▍  | cHPI locations  : 1257/1696 [00:05<00:01,  303.20it/s]
 76%|███████▌  | cHPI locations  : 1286/1696 [00:05<00:01,  299.61it/s]
 76%|███████▋  | cHPI locations  : 1296/1696 [00:05<00:01,  282.00it/s]
 77%|███████▋  | cHPI locations  : 1301/1696 [00:05<00:01,  266.90it/s]
 77%|███████▋  | cHPI locations  : 1306/1696 [00:05<00:01,  252.15it/s]
 77%|███████▋  | cHPI locations  : 1311/1696 [00:05<00:01,  237.32it/s]
 78%|███████▊  | cHPI locations  : 1315/1696 [00:05<00:01,  220.92it/s]
 78%|███████▊  | cHPI locations  : 1319/1696 [00:05<00:01,  210.55it/s]
 78%|███████▊  | cHPI locations  : 1325/1696 [00:05<00:01,  199.63it/s]
 78%|███████▊  | cHPI locations  : 1331/1696 [00:06<00:01,  191.71it/s]
 79%|███████▉  | cHPI locations  : 1341/1696 [00:06<00:01,  185.22it/s]
 81%|████████  | cHPI locations  : 1375/1696 [00:06<00:01,  204.29it/s]
 83%|████████▎ | cHPI locations  : 1410/1696 [00:06<00:01,  224.58it/s]
 85%|████████▍ | cHPI locations  : 1441/1696 [00:06<00:01,  227.03it/s]
 87%|████████▋ | cHPI locations  : 1481/1696 [00:06<00:00,  250.60it/s]
 90%|████████▉ | cHPI locations  : 1522/1696 [00:06<00:00,  275.55it/s]
 91%|█████████ | cHPI locations  : 1541/1696 [00:06<00:00,  266.05it/s]
 92%|█████████▏| cHPI locations  : 1565/1696 [00:06<00:00,  260.80it/s]
 93%|█████████▎| cHPI locations  : 1573/1696 [00:06<00:00,  248.51it/s]
 93%|█████████▎| cHPI locations  : 1580/1696 [00:06<00:00,  237.75it/s]
 94%|█████████▎| cHPI locations  : 1586/1696 [00:06<00:00,  226.39it/s]
 94%|█████████▍| cHPI locations  : 1590/1696 [00:06<00:00,  211.81it/s]
 94%|█████████▍| cHPI locations  : 1594/1696 [00:07<00:00,  199.97it/s]
 94%|█████████▍| cHPI locations  : 1599/1696 [00:07<00:00,  188.20it/s]
 95%|█████████▍| cHPI locations  : 1609/1696 [00:07<00:00,  182.81it/s]
 97%|█████████▋| cHPI locations  : 1645/1696 [00:07<00:00,  202.25it/s]
 97%|█████████▋| cHPI locations  : 1652/1696 [00:07<00:00,  193.89it/s]
100%|█████████▉| cHPI locations  : 1688/1696 [00:07<00:00,  213.81it/s]
100%|██████████| cHPI locations  : 1696/1696 [00:07<00:00,  226.69it/s]

Lastly, compute head positions from the coil locations:

t=9.000:     5/5 good HPI fits, movements [mm/s] =      0.1 /      0.2 /      0.5 /      0.2 /      0.3
t=10.000:    5/5 good HPI fits, movements [mm/s] =      0.1 /      0.2 /      0.0 /      0.2 /      0.1
t=11.000:    5/5 good HPI fits, movements [mm/s] =      0.0 /      0.1 /      0.1 /      0.0 /      0.0
t=12.000:    5/5 good HPI fits, movements [mm/s] =      0.0 /      0.0 /      0.1 /      0.0 /      0.0
t=13.000:    5/5 good HPI fits, movements [mm/s] =      0.0 /      0.1 /      0.0 /      0.0 /      0.0
t=14.000:    5/5 good HPI fits, movements [mm/s] =      0.0 /      0.1 /      0.1 /      0.1 /      0.1
t=14.580:    5/5 good HPI fits, movements [mm/s] =      5.0 /      4.8 /      6.1 /      5.5 /      4.9
t=14.670:    5/5 good HPI fits, movements [mm/s] =     33.3 /     33.8 /     39.9 /     37.9 /     30.2
t=14.720:    5/5 good HPI fits, movements [mm/s] =     49.3 /     47.7 /     60.2 /     59.1 /     44.3
t=14.760:    5/5 good HPI fits, movements [mm/s] =     64.9 /     63.6 /     73.0 /     71.3 /     56.6
t=14.800:    5/5 good HPI fits, movements [mm/s] =     67.4 /     59.1 /     83.1 /     78.2 /     60.9
t=14.860:    5/5 good HPI fits, movements [mm/s] =     54.4 /     52.2 /     57.6 /     62.0 /     47.2
t=14.990:    5/5 good HPI fits, movements [mm/s] =     23.3 /     22.6 /     24.2 /     27.0 /     19.8
t=15.990:    5/5 good HPI fits, movements [mm/s] =      0.7 /      0.9 /      0.8 /      0.8 /      0.9
t=16.880:    5/5 good HPI fits, movements [mm/s] =      2.5 /      3.4 /      3.0 /      3.8 /      3.3
t=16.930:    5/5 good HPI fits, movements [mm/s] =     52.2 /     55.2 /     58.3 /     67.0 /     59.7
t=16.990:    5/5 good HPI fits, movements [mm/s] =     57.1 /     53.8 /     62.0 /     65.1 /     57.7
t=17.040:    5/5 good HPI fits, movements [mm/s] =     53.0 /     50.7 /     60.0 /     61.9 /     49.3
t=17.090:    5/5 good HPI fits, movements [mm/s] =     57.9 /     49.2 /     66.6 /     64.8 /     51.6
t=17.140:    5/5 good HPI fits, movements [mm/s] =     60.4 /     54.7 /     72.6 /     67.3 /     57.7
t=17.180:    5/5 good HPI fits, movements [mm/s] =     63.6 /     58.2 /     74.5 /     72.2 /     61.7
t=17.220:    5/5 good HPI fits, movements [mm/s] =     61.0 /     60.0 /     75.2 /     71.3 /     63.3
t=17.260:    5/5 good HPI fits, movements [mm/s] =     67.9 /     66.3 /     73.4 /     68.9 /     68.9
t=17.320:    5/5 good HPI fits, movements [mm/s] =     49.7 /     50.9 /     54.8 /     55.0 /     52.6
t=17.470:    5/5 good HPI fits, movements [mm/s] =     18.4 /     21.5 /     19.3 /     20.5 /     17.3
t=18.470:    5/5 good HPI fits, movements [mm/s] =      1.9 /      2.7 /      2.0 /      2.4 /      1.9
t=19.390:    5/5 good HPI fits, movements [mm/s] =      2.4 /      2.7 /      1.9 /      2.9 /      2.5
t=19.500:    5/5 good HPI fits, movements [mm/s] =     23.0 /     25.3 /     19.4 /     28.9 /     27.7
t=19.610:    5/5 good HPI fits, movements [mm/s] =     21.2 /     25.7 /     21.8 /     31.6 /     31.3
t=19.710:    5/5 good HPI fits, movements [mm/s] =     22.0 /     20.7 /     23.0 /     29.7 /     27.8
t=19.850:    5/5 good HPI fits, movements [mm/s] =     16.5 /     14.7 /     18.5 /     21.9 /     20.1
t=20.850:    5/5 good HPI fits, movements [mm/s] =      2.3 /      1.9 /      2.0 /      2.5 /      2.2
t=21.850:    5/5 good HPI fits, movements [mm/s] =      0.6 /      1.7 /      1.7 /      2.0 /      1.9
t=21.950:    5/5 good HPI fits, movements [mm/s] =     25.8 /     27.1 /     24.1 /     32.2 /     26.4
t=22.000:    5/5 good HPI fits, movements [mm/s] =     66.0 /     58.9 /     46.4 /     64.8 /     51.9
t=22.050:    5/5 good HPI fits, movements [mm/s] =     59.7 /     62.9 /     51.0 /     69.1 /     57.9
t=22.100:    5/5 good HPI fits, movements [mm/s] =     61.5 /     65.4 /     58.5 /     75.0 /     64.8
t=22.140:    5/5 good HPI fits, movements [mm/s] =     74.4 /     73.6 /     62.3 /     79.9 /     68.2
t=22.180:    5/5 good HPI fits, movements [mm/s] =     63.9 /     59.6 /     52.9 /     67.2 /     53.2
t=22.240:    5/5 good HPI fits, movements [mm/s] =     38.3 /     39.0 /     36.5 /     48.3 /     42.2
t=22.300:    5/5 good HPI fits, movements [mm/s] =     42.0 /     40.4 /     33.7 /     47.1 /     38.9
t=22.400:    5/5 good HPI fits, movements [mm/s] =     31.7 /     28.5 /     22.1 /     30.8 /     25.0
t=23.400:    5/5 good HPI fits, movements [mm/s] =      1.8 /      1.8 /      1.1 /      1.6 /      1.2
t=24.400:    5/5 good HPI fits, movements [mm/s] =      1.2 /      0.8 /      0.7 /      0.8 /      0.7
t=24.640:    5/5 good HPI fits, movements [mm/s] =     12.6 /     11.6 /     11.5 /     13.0 /     11.0
t=24.720:    5/5 good HPI fits, movements [mm/s] =     30.3 /     33.0 /     31.4 /     39.0 /     35.0
t=24.790:    5/5 good HPI fits, movements [mm/s] =     31.3 /     35.7 /     33.0 /     43.0 /     40.8
t=24.850:    5/5 good HPI fits, movements [mm/s] =     37.2 /     41.4 /     35.6 /     44.6 /     42.4
t=24.890:    5/5 good HPI fits, movements [mm/s] =     50.1 /     51.9 /     49.7 /     60.1 /     52.9
t=24.930:    5/5 good HPI fits, movements [mm/s] =     56.4 /     55.3 /     59.1 /     68.3 /     61.9
t=24.980:    5/5 good HPI fits, movements [mm/s] =     47.2 /     47.1 /     51.0 /     58.7 /     53.7
t=25.080:    5/5 good HPI fits, movements [mm/s] =     23.8 /     19.4 /     23.3 /     28.2 /     26.3
t=25.510:    5/5 good HPI fits, movements [mm/s] =      2.4 /      6.6 /      7.4 /      6.5 /      7.8

Note that these can then be written to disk or read from disk with mne.chpi.write_head_pos() and mne.chpi.read_head_pos(), respectively.

Visualizing continuous head position#

We can plot as traces, which is especially useful for long recordings:

Position (mm), Rotation (quat)

Or we can visualize them as a continuous field (with the vectors pointing in the head-upward direction):

59 head positions

These head positions can then be used with mne.preprocessing.maxwell_filter() to compensate for movement, or with mne.preprocessing.annotate_movement() to mark segments as bad that deviate too much from the average head position.

Computing SNR of the HPI signal#

It is also possible to compute the SNR of the continuous HPI measurements. This can be a useful proxy for head position along the vertical dimension, i.e., it can indicate the distance between the HPI coils and the MEG sensors. Using compute_chpi_snr, the HPI power and SNR are computed separately for each MEG sensor type and each HPI coil (frequency), along with the residual power for each sensor type. The results can then be visualized with plot_chpi_snr. Here we’ll just show a few seconds, for speed:

SNR, magnetometers, cHPI power, magnetometers, Residual variance, magnetometers, SNR, gradiometers, cHPI power, gradiometers, Residual variance, gradiometers
Using 5 HPI coils: 83 143 203 263 323 Hz
Line interference frequencies: 60.0 120.0 180.0 240.0 300.0 360.0 Hz
Using time window: 83.3 ms
Fitting 5 HPI coil locations at up to 496 time points (5.0 s duration)

  0%|          | cHPI SNRs : 0/496 [00:00<?,       ?it/s]
  0%|          | cHPI SNRs : 1/496 [00:06<55:39,    6.75s/it]
  1%|          | cHPI SNRs : 4/496 [00:06<13:20,    1.63s/it]
  1%|▏         | cHPI SNRs : 7/496 [00:06<07:23,    1.10it/s]
  2%|▏         | cHPI SNRs : 10/496 [00:06<05:01,    1.61it/s]
  3%|▎         | cHPI SNRs : 13/496 [00:06<03:44,    2.15it/s]
  3%|▎         | cHPI SNRs : 16/496 [00:06<02:57,    2.71it/s]
  4%|▍         | cHPI SNRs : 19/496 [00:06<02:24,    3.29it/s]
  4%|▍         | cHPI SNRs : 22/496 [00:06<02:01,    3.90it/s]
  5%|▌         | cHPI SNRs : 25/496 [00:06<01:43,    4.54it/s]
  6%|▌         | cHPI SNRs : 28/496 [00:06<01:29,    5.20it/s]
  6%|▋         | cHPI SNRs : 31/496 [00:06<01:18,    5.90it/s]
  7%|▋         | cHPI SNRs : 34/496 [00:06<01:09,    6.62it/s]
  7%|▋         | cHPI SNRs : 37/496 [00:06<01:02,    7.38it/s]
  8%|▊         | cHPI SNRs : 40/496 [00:06<00:55,    8.17it/s]
  9%|▉         | cHPI SNRs : 44/496 [00:06<00:48,    9.27it/s]
 10%|▉         | cHPI SNRs : 48/496 [00:07<00:42,   10.42it/s]
 10%|█         | cHPI SNRs : 52/496 [00:07<00:38,   11.61it/s]
 11%|█▏        | cHPI SNRs : 56/496 [00:07<00:34,   12.85it/s]
 12%|█▏        | cHPI SNRs : 60/496 [00:07<00:30,   14.13it/s]
 13%|█▎        | cHPI SNRs : 64/496 [00:07<00:27,   15.46it/s]
 14%|█▎        | cHPI SNRs : 67/496 [00:07<00:26,   16.49it/s]
 14%|█▍        | cHPI SNRs : 70/496 [00:07<00:24,   17.57it/s]
 15%|█▍        | cHPI SNRs : 74/496 [00:07<00:22,   19.06it/s]
 16%|█▌        | cHPI SNRs : 78/496 [00:07<00:20,   20.60it/s]
 17%|█▋        | cHPI SNRs : 82/496 [00:07<00:18,   22.19it/s]
 17%|█▋        | cHPI SNRs : 86/496 [00:07<00:17,   23.83it/s]
 18%|█▊        | cHPI SNRs : 90/496 [00:07<00:15,   25.53it/s]
 19%|█▉        | cHPI SNRs : 93/496 [00:07<00:15,   26.83it/s]
 19%|█▉        | cHPI SNRs : 96/496 [00:07<00:14,   28.18it/s]
 20%|█▉        | cHPI SNRs : 99/496 [00:07<00:13,   29.56it/s]
 21%|██        | cHPI SNRs : 103/496 [00:07<00:12,   31.49it/s]
 21%|██▏       | cHPI SNRs : 106/496 [00:07<00:11,   32.94it/s]
 22%|██▏       | cHPI SNRs : 109/496 [00:07<00:11,   34.45it/s]
 23%|██▎       | cHPI SNRs : 112/496 [00:07<00:10,   36.01it/s]
 23%|██▎       | cHPI SNRs : 115/496 [00:07<00:10,   37.60it/s]
 24%|██▍       | cHPI SNRs : 118/496 [00:07<00:09,   39.23it/s]
 24%|██▍       | cHPI SNRs : 121/496 [00:07<00:09,   40.91it/s]
 25%|██▌       | cHPI SNRs : 124/496 [00:07<00:08,   42.62it/s]
 26%|██▌       | cHPI SNRs : 127/496 [00:07<00:08,   44.38it/s]
 26%|██▌       | cHPI SNRs : 130/496 [00:07<00:07,   46.17it/s]
 27%|██▋       | cHPI SNRs : 133/496 [00:07<00:07,   47.99it/s]
 27%|██▋       | cHPI SNRs : 136/496 [00:07<00:07,   49.85it/s]
 28%|██▊       | cHPI SNRs : 139/496 [00:07<00:06,   51.76it/s]
 29%|██▊       | cHPI SNRs : 142/496 [00:07<00:06,   53.70it/s]
 29%|██▉       | cHPI SNRs : 145/496 [00:07<00:06,   55.67it/s]
 30%|██▉       | cHPI SNRs : 148/496 [00:07<00:06,   57.71it/s]
 30%|███       | cHPI SNRs : 151/496 [00:07<00:05,   59.77it/s]
 31%|███       | cHPI SNRs : 154/496 [00:07<00:05,   61.86it/s]
 32%|███▏      | cHPI SNRs : 157/496 [00:07<00:05,   63.97it/s]
 32%|███▏      | cHPI SNRs : 160/496 [00:07<00:05,   66.13it/s]
 33%|███▎      | cHPI SNRs : 163/496 [00:07<00:04,   68.27it/s]
 33%|███▎      | cHPI SNRs : 166/496 [00:07<00:04,   70.42it/s]
 34%|███▍      | cHPI SNRs : 169/496 [00:07<00:04,   72.58it/s]
 35%|███▍      | cHPI SNRs : 172/496 [00:07<00:04,   74.75it/s]
 35%|███▌      | cHPI SNRs : 175/496 [00:07<00:04,   76.90it/s]
 36%|███▌      | cHPI SNRs : 178/496 [00:07<00:04,   79.10it/s]
 36%|███▋      | cHPI SNRs : 181/496 [00:07<00:03,   81.30it/s]
 37%|███▋      | cHPI SNRs : 184/496 [00:07<00:03,   83.54it/s]
 38%|███▊      | cHPI SNRs : 187/496 [00:07<00:03,   85.79it/s]
 38%|███▊      | cHPI SNRs : 190/496 [00:07<00:03,   88.05it/s]
 39%|███▉      | cHPI SNRs : 193/496 [00:07<00:03,   90.35it/s]
 40%|███▉      | cHPI SNRs : 197/496 [00:07<00:03,   93.68it/s]
 41%|████      | cHPI SNRs : 201/496 [00:07<00:03,   96.92it/s]
 41%|████      | cHPI SNRs : 204/496 [00:07<00:02,   99.27it/s]
 42%|████▏     | cHPI SNRs : 208/496 [00:07<00:02,  102.45it/s]
 43%|████▎     | cHPI SNRs : 212/496 [00:07<00:02,  105.59it/s]
 44%|████▎     | cHPI SNRs : 216/496 [00:07<00:02,  108.69it/s]
 44%|████▍     | cHPI SNRs : 220/496 [00:07<00:02,  111.71it/s]
 45%|████▌     | cHPI SNRs : 224/496 [00:08<00:02,  114.74it/s]
 46%|████▌     | cHPI SNRs : 228/496 [00:08<00:02,  117.55it/s]
 47%|████▋     | cHPI SNRs : 231/496 [00:08<00:02,  119.42it/s]
 47%|████▋     | cHPI SNRs : 234/496 [00:08<00:02,  121.23it/s]
 48%|████▊     | cHPI SNRs : 237/496 [00:08<00:02,  123.17it/s]
 48%|████▊     | cHPI SNRs : 240/496 [00:08<00:02,  125.03it/s]
 49%|████▉     | cHPI SNRs : 243/496 [00:08<00:01,  126.77it/s]
 50%|████▉     | cHPI SNRs : 246/496 [00:08<00:01,  128.31it/s]
 50%|█████     | cHPI SNRs : 249/496 [00:08<00:01,  129.94it/s]
 51%|█████     | cHPI SNRs : 252/496 [00:08<00:01,  131.55it/s]
 51%|█████▏    | cHPI SNRs : 255/496 [00:08<00:01,  132.97it/s]
 52%|█████▏    | cHPI SNRs : 258/496 [00:08<00:01,  134.53it/s]
 53%|█████▎    | cHPI SNRs : 261/496 [00:08<00:01,  136.07it/s]
 53%|█████▎    | cHPI SNRs : 264/496 [00:08<00:01,  137.38it/s]
 54%|█████▍    | cHPI SNRs : 267/496 [00:08<00:01,  138.59it/s]
 54%|█████▍    | cHPI SNRs : 270/496 [00:08<00:01,  139.78it/s]
 55%|█████▌    | cHPI SNRs : 273/496 [00:08<00:01,  140.91it/s]
 56%|█████▌    | cHPI SNRs : 276/496 [00:08<00:01,  141.97it/s]
 56%|█████▋    | cHPI SNRs : 279/496 [00:08<00:01,  143.09it/s]
 57%|█████▋    | cHPI SNRs : 282/496 [00:08<00:01,  144.23it/s]
 57%|█████▋    | cHPI SNRs : 285/496 [00:08<00:01,  145.37it/s]
 58%|█████▊    | cHPI SNRs : 288/496 [00:08<00:01,  146.48it/s]
 59%|█████▊    | cHPI SNRs : 291/496 [00:08<00:01,  147.59it/s]
 59%|█████▉    | cHPI SNRs : 294/496 [00:08<00:01,  148.52it/s]
 60%|█████▉    | cHPI SNRs : 297/496 [00:08<00:01,  149.53it/s]
 60%|██████    | cHPI SNRs : 300/496 [00:08<00:01,  150.59it/s]
 61%|██████    | cHPI SNRs : 303/496 [00:08<00:01,  151.65it/s]
 62%|██████▏   | cHPI SNRs : 306/496 [00:08<00:01,  152.44it/s]
 62%|██████▏   | cHPI SNRs : 309/496 [00:08<00:01,  153.10it/s]
 63%|██████▎   | cHPI SNRs : 312/496 [00:08<00:01,  153.78it/s]
 64%|██████▎   | cHPI SNRs : 315/496 [00:08<00:01,  154.47it/s]
 64%|██████▍   | cHPI SNRs : 318/496 [00:08<00:01,  155.11it/s]
 65%|██████▍   | cHPI SNRs : 321/496 [00:08<00:01,  155.73it/s]
 65%|██████▌   | cHPI SNRs : 324/496 [00:08<00:01,  156.18it/s]
 66%|██████▌   | cHPI SNRs : 327/496 [00:08<00:01,  156.89it/s]
 67%|██████▋   | cHPI SNRs : 330/496 [00:08<00:01,  157.71it/s]
 67%|██████▋   | cHPI SNRs : 333/496 [00:08<00:01,  158.62it/s]
 68%|██████▊   | cHPI SNRs : 336/496 [00:08<00:01,  159.63it/s]
 69%|██████▊   | cHPI SNRs : 340/496 [00:08<00:00,  161.12it/s]
 69%|██████▉   | cHPI SNRs : 343/496 [00:08<00:00,  161.40it/s]
 70%|██████▉   | cHPI SNRs : 346/496 [00:08<00:00,  162.27it/s]
 70%|███████   | cHPI SNRs : 349/496 [00:08<00:00,  163.10it/s]
 71%|███████   | cHPI SNRs : 352/496 [00:08<00:00,  164.03it/s]
 72%|███████▏  | cHPI SNRs : 355/496 [00:08<00:00,  164.77it/s]
 72%|███████▏  | cHPI SNRs : 358/496 [00:08<00:00,  165.59it/s]
 73%|███████▎  | cHPI SNRs : 361/496 [00:08<00:00,  166.36it/s]
 73%|███████▎  | cHPI SNRs : 364/496 [00:08<00:00,  167.14it/s]
 74%|███████▍  | cHPI SNRs : 367/496 [00:08<00:00,  167.92it/s]
 75%|███████▍  | cHPI SNRs : 370/496 [00:08<00:00,  168.15it/s]
 75%|███████▌  | cHPI SNRs : 373/496 [00:08<00:00,  168.18it/s]
 76%|███████▌  | cHPI SNRs : 376/496 [00:08<00:00,  168.11it/s]
 76%|███████▋  | cHPI SNRs : 379/496 [00:08<00:00,  167.86it/s]
 77%|███████▋  | cHPI SNRs : 382/496 [00:08<00:00,  167.70it/s]
 78%|███████▊  | cHPI SNRs : 385/496 [00:08<00:00,  167.65it/s]
 78%|███████▊  | cHPI SNRs : 388/496 [00:08<00:00,  167.69it/s]
 79%|███████▉  | cHPI SNRs : 391/496 [00:08<00:00,  167.70it/s]
 79%|███████▉  | cHPI SNRs : 394/496 [00:08<00:00,  167.63it/s]
 80%|████████  | cHPI SNRs : 397/496 [00:09<00:00,  167.43it/s]
 81%|████████  | cHPI SNRs : 400/496 [00:09<00:00,  167.40it/s]
 81%|████████▏ | cHPI SNRs : 403/496 [00:09<00:00,  167.44it/s]
 82%|████████▏ | cHPI SNRs : 406/496 [00:09<00:00,  167.52it/s]
 82%|████████▏ | cHPI SNRs : 409/496 [00:09<00:00,  167.25it/s]
 83%|████████▎ | cHPI SNRs : 412/496 [00:09<00:00,  167.30it/s]
 84%|████████▎ | cHPI SNRs : 415/496 [00:09<00:00,  167.28it/s]
 84%|████████▍ | cHPI SNRs : 418/496 [00:09<00:00,  167.24it/s]
 85%|████████▍ | cHPI SNRs : 421/496 [00:09<00:00,  167.06it/s]
 85%|████████▌ | cHPI SNRs : 424/496 [00:09<00:00,  167.08it/s]
 86%|████████▌ | cHPI SNRs : 427/496 [00:09<00:00,  167.09it/s]
 87%|████████▋ | cHPI SNRs : 430/496 [00:09<00:00,  167.02it/s]
 87%|████████▋ | cHPI SNRs : 433/496 [00:09<00:00,  167.10it/s]
 88%|████████▊ | cHPI SNRs : 436/496 [00:09<00:00,  167.14it/s]
 89%|████████▊ | cHPI SNRs : 439/496 [00:09<00:00,  167.20it/s]
 89%|████████▉ | cHPI SNRs : 442/496 [00:09<00:00,  167.00it/s]
 90%|████████▉ | cHPI SNRs : 445/496 [00:09<00:00,  166.97it/s]
 90%|█████████ | cHPI SNRs : 448/496 [00:09<00:00,  166.91it/s]
 91%|█████████ | cHPI SNRs : 451/496 [00:09<00:00,  166.96it/s]
 92%|█████████▏| cHPI SNRs : 454/496 [00:09<00:00,  166.96it/s]
 92%|█████████▏| cHPI SNRs : 457/496 [00:09<00:00,  166.80it/s]
 93%|█████████▎| cHPI SNRs : 460/496 [00:09<00:00,  166.80it/s]
 93%|█████████▎| cHPI SNRs : 463/496 [00:09<00:00,  166.77it/s]
 94%|█████████▍| cHPI SNRs : 466/496 [00:09<00:00,  166.79it/s]
 95%|█████████▍| cHPI SNRs : 469/496 [00:09<00:00,  166.76it/s]
 95%|█████████▌| cHPI SNRs : 472/496 [00:09<00:00,  166.82it/s]
 96%|█████████▌| cHPI SNRs : 475/496 [00:09<00:00,  166.83it/s]
 96%|█████████▋| cHPI SNRs : 478/496 [00:09<00:00,  166.82it/s]
 97%|█████████▋| cHPI SNRs : 481/496 [00:09<00:00,  166.67it/s]
 98%|█████████▊| cHPI SNRs : 484/496 [00:09<00:00,  166.73it/s]
 98%|█████████▊| cHPI SNRs : 487/496 [00:09<00:00,  166.73it/s]
 99%|█████████▉| cHPI SNRs : 490/496 [00:09<00:00,  166.60it/s]
 99%|█████████▉| cHPI SNRs : 493/496 [00:09<00:00,  166.39it/s]
100%|██████████| cHPI SNRs : 496/496 [00:09<00:00,  166.01it/s]
100%|██████████| cHPI SNRs : 496/496 [00:09<00:00,   51.69it/s]

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

Gallery generated by Sphinx-Gallery