Note
Go to the end to download the full example code.
Callosal bundles using AFQ API#
An example using the AFQ API to find callosal bundles using the templates from: http://hdl.handle.net/1773/34926
import os.path as op
import matplotlib.pyplot as plt
import nibabel as nib
import plotly
from AFQ.api.group import GroupAFQ
import AFQ.api.bundle_dict as abd
from AFQ.definitions.image import RoiImage
import AFQ.data.fetch as afd
Get some example data#
Retrieves Stanford HARDI dataset.
afd.organize_stanford_data(clear_previous_afq="track")
0%| | 0/5578 [00:00<?, ? MB/s]
0%| | 12/5578 [00:00<00:53, 104.45 MB/s]
1%| | 32/5578 [00:00<00:38, 144.71 MB/s]
1%| | 62/5578 [00:00<00:27, 197.73 MB/s]
2%|▏ | 107/5578 [00:00<00:19, 274.28 MB/s]
3%|▎ | 153/5578 [00:00<00:16, 335.36 MB/s]
3%|▎ | 194/5578 [00:00<00:15, 347.10 MB/s]
4%|▍ | 238/5578 [00:00<00:14, 375.26 MB/s]
5%|▌ | 282/5578 [00:00<00:13, 380.01 MB/s]
6%|▌ | 329/5578 [00:00<00:13, 389.62 MB/s]
7%|▋ | 369/5578 [00:01<00:13, 392.29 MB/s]
7%|▋ | 417/5578 [00:01<00:12, 399.97 MB/s]
8%|▊ | 464/5578 [00:01<00:12, 403.04 MB/s]
9%|▉ | 512/5578 [00:01<00:12, 407.09 MB/s]
10%|█ | 560/5578 [00:01<00:12, 410.67 MB/s]
11%|█ | 607/5578 [00:01<00:12, 409.46 MB/s]
12%|█▏ | 655/5578 [00:01<00:11, 411.27 MB/s]
13%|█▎ | 702/5578 [00:01<00:11, 408.98 MB/s]
13%|█▎ | 750/5578 [00:02<00:11, 411.68 MB/s]
14%|█▍ | 798/5578 [00:02<00:11, 413.97 MB/s]
15%|█▌ | 845/5578 [00:02<00:11, 412.32 MB/s]
16%|█▌ | 893/5578 [00:02<00:11, 414.29 MB/s]
17%|█▋ | 940/5578 [00:02<00:11, 413.13 MB/s]
18%|█▊ | 988/5578 [00:02<00:11, 414.58 MB/s]
18%|█▊ | 1031/5578 [00:02<00:10, 416.66 MB/s]
19%|█▉ | 1075/5578 [00:02<00:10, 412.62 MB/s]
20%|██ | 1118/5578 [00:02<00:10, 415.37 MB/s]
21%|██ | 1163/5578 [00:03<00:10, 414.00 MB/s]
22%|██▏ | 1205/5578 [00:03<00:10, 414.74 MB/s]
22%|██▏ | 1250/5578 [00:03<00:10, 410.99 MB/s]
23%|██▎ | 1293/5578 [00:03<00:10, 415.72 MB/s]
24%|██▍ | 1337/5578 [00:03<00:10, 406.12 MB/s]
25%|██▍ | 1385/5578 [00:03<00:10, 409.41 MB/s]
26%|██▌ | 1432/5578 [00:03<00:10, 408.85 MB/s]
27%|██▋ | 1480/5578 [00:03<00:09, 411.12 MB/s]
27%|██▋ | 1522/5578 [00:03<00:09, 410.34 MB/s]
28%|██▊ | 1567/5578 [00:04<00:09, 408.19 MB/s]
29%|██▉ | 1612/5578 [00:04<00:09, 418.30 MB/s]
30%|██▉ | 1655/5578 [00:04<00:09, 409.22 MB/s]
30%|███ | 1700/5578 [00:04<00:09, 413.12 MB/s]
31%|███ | 1742/5578 [00:04<00:09, 410.79 MB/s]
32%|███▏ | 1788/5578 [00:04<00:09, 414.36 MB/s]
33%|███▎ | 1830/5578 [00:04<00:09, 410.97 MB/s]
34%|███▎ | 1875/5578 [00:04<00:08, 413.66 MB/s]
34%|███▍ | 1917/5578 [00:04<00:08, 409.89 MB/s]
35%|███▌ | 1962/5578 [00:04<00:08, 421.02 MB/s]
36%|███▌ | 2005/5578 [00:05<00:08, 408.67 MB/s]
37%|███▋ | 2050/5578 [00:05<00:08, 408.68 MB/s]
37%|███▋ | 2091/5578 [00:05<00:08, 406.58 MB/s]
38%|███▊ | 2137/5578 [00:05<00:08, 410.86 MB/s]
39%|███▉ | 2179/5578 [00:05<00:08, 407.64 MB/s]
40%|███▉ | 2224/5578 [00:05<00:08, 410.89 MB/s]
41%|████ | 2266/5578 [00:05<00:08, 408.37 MB/s]
41%|████▏ | 2312/5578 [00:05<00:07, 415.22 MB/s]
42%|████▏ | 2354/5578 [00:05<00:07, 411.36 MB/s]
43%|████▎ | 2399/5578 [00:06<00:07, 411.75 MB/s]
44%|████▍ | 2441/5578 [00:06<00:07, 411.36 MB/s]
45%|████▍ | 2486/5578 [00:06<00:07, 410.85 MB/s]
45%|████▌ | 2528/5578 [00:06<00:07, 405.15 MB/s]
46%|████▌ | 2574/5578 [00:06<00:07, 416.51 MB/s]
47%|████▋ | 2616/5578 [00:06<00:07, 408.14 MB/s]
48%|████▊ | 2658/5578 [00:06<00:07, 411.40 MB/s]
48%|████▊ | 2701/5578 [00:06<00:06, 415.87 MB/s]
49%|████▉ | 2743/5578 [00:06<00:07, 403.42 MB/s]
50%|█████ | 2789/5578 [00:06<00:06, 401.64 MB/s]
51%|█████ | 2836/5578 [00:07<00:06, 403.61 MB/s]
52%|█████▏ | 2883/5578 [00:07<00:06, 418.04 MB/s]
52%|█████▏ | 2925/5578 [00:07<00:06, 406.60 MB/s]
53%|█████▎ | 2971/5578 [00:07<00:06, 403.45 MB/s]
54%|█████▍ | 3018/5578 [00:07<00:06, 421.23 MB/s]
55%|█████▍ | 3061/5578 [00:07<00:06, 408.58 MB/s]
56%|█████▌ | 3104/5578 [00:07<00:06, 410.03 MB/s]
56%|█████▋ | 3146/5578 [00:07<00:06, 405.24 MB/s]
57%|█████▋ | 3191/5578 [00:07<00:05, 412.26 MB/s]
58%|█████▊ | 3233/5578 [00:08<00:05, 405.39 MB/s]
59%|█████▉ | 3278/5578 [00:08<00:05, 414.81 MB/s]
60%|█████▉ | 3321/5578 [00:08<00:05, 409.85 MB/s]
60%|██████ | 3365/5578 [00:08<00:05, 415.67 MB/s]
61%|██████ | 3408/5578 [00:08<00:05, 408.20 MB/s]
62%|██████▏ | 3453/5578 [00:08<00:05, 420.04 MB/s]
63%|██████▎ | 3496/5578 [00:08<00:05, 409.59 MB/s]
63%|██████▎ | 3538/5578 [00:08<00:04, 411.27 MB/s]
64%|██████▍ | 3583/5578 [00:08<00:04, 410.27 MB/s]
65%|██████▍ | 3625/5578 [00:09<00:04, 412.19 MB/s]
66%|██████▌ | 3670/5578 [00:09<00:04, 408.16 MB/s]
67%|██████▋ | 3714/5578 [00:09<00:04, 417.01 MB/s]
67%|██████▋ | 3756/5578 [00:09<00:04, 416.96 MB/s]
68%|██████▊ | 3798/5578 [00:09<00:04, 408.90 MB/s]
69%|██████▉ | 3842/5578 [00:09<00:04, 417.50 MB/s]
70%|██████▉ | 3884/5578 [00:09<00:04, 397.47 MB/s]
70%|███████ | 3931/5578 [00:09<00:04, 400.69 MB/s]
71%|███████▏ | 3979/5578 [00:09<00:03, 403.80 MB/s]
72%|███████▏ | 4027/5578 [00:09<00:03, 407.41 MB/s]
73%|███████▎ | 4074/5578 [00:10<00:03, 407.11 MB/s]
74%|███████▍ | 4122/5578 [00:10<00:03, 410.23 MB/s]
75%|███████▍ | 4169/5578 [00:10<00:03, 408.60 MB/s]
76%|███████▌ | 4217/5578 [00:10<00:03, 410.26 MB/s]
76%|███████▋ | 4264/5578 [00:10<00:03, 407.99 MB/s]
77%|███████▋ | 4305/5578 [00:10<00:03, 405.69 MB/s]
78%|███████▊ | 4346/5578 [00:10<00:03, 402.11 MB/s]
79%|███████▊ | 4391/5578 [00:10<00:02, 398.27 MB/s]
80%|███████▉ | 4438/5578 [00:11<00:02, 415.26 MB/s]
80%|████████ | 4480/5578 [00:11<00:02, 403.83 MB/s]
81%|████████ | 4526/5578 [00:11<00:02, 404.55 MB/s]
82%|████████▏ | 4567/5578 [00:11<00:02, 404.42 MB/s]
83%|████████▎ | 4613/5578 [00:11<00:02, 402.85 MB/s]
84%|████████▎ | 4661/5578 [00:11<00:02, 406.26 MB/s]
84%|████████▍ | 4709/5578 [00:11<00:02, 409.99 MB/s]
85%|████████▌ | 4756/5578 [00:11<00:02, 409.39 MB/s]
86%|████████▌ | 4804/5578 [00:11<00:01, 410.89 MB/s]
87%|████████▋ | 4846/5578 [00:12<00:01, 412.04 MB/s]
88%|████████▊ | 4891/5578 [00:12<00:01, 405.32 MB/s]
89%|████████▊ | 4939/5578 [00:12<00:01, 409.45 MB/s]
89%|████████▉ | 4980/5578 [00:12<00:01, 407.27 MB/s]
90%|█████████ | 5026/5578 [00:12<00:01, 404.72 MB/s]
91%|█████████ | 5074/5578 [00:12<00:01, 408.49 MB/s]
92%|█████████▏| 5121/5578 [00:12<00:01, 407.68 MB/s]
93%|█████████▎| 5169/5578 [00:12<00:01, 408.86 MB/s]
94%|█████████▎| 5217/5578 [00:12<00:00, 410.12 MB/s]
94%|█████████▍| 5265/5578 [00:13<00:00, 411.94 MB/s]
95%|█████████▌| 5312/5578 [00:13<00:00, 410.30 MB/s]
96%|█████████▌| 5360/5578 [00:13<00:00, 412.00 MB/s]
97%|█████████▋| 5407/5578 [00:13<00:00, 408.52 MB/s]
98%|█████████▊| 5455/5578 [00:13<00:00, 410.41 MB/s]
99%|█████████▊| 5503/5578 [00:13<00:00, 412.22 MB/s]
99%|█████████▉| 5549/5578 [00:13<00:00, 418.92 MB/s]
100%|██████████| 5578/5578 [00:13<00:00, 404.56 MB/s]
0%| | 0/1 [00:00<?, ? MB/s]
100%|██████████| 1/1 [00:00<00:00, 6743.25 MB/s]
0%| | 0/1 [00:00<?, ? MB/s]
100%|██████████| 1/1 [00:00<00:00, 3945.72 MB/s]
0%| | 0/71 [00:00<?, ? MB/s]
13%|█▎ | 9/71 [00:00<00:00, 77.91 MB/s]
35%|███▌ | 25/71 [00:00<00:00, 114.10 MB/s]
76%|███████▌ | 54/71 [00:00<00:00, 177.75 MB/s]
100%|██████████| 71/71 [00:00<00:00, 185.12 MB/s]
0%| | 0/4 [00:00<?, ? MB/s]
100%|██████████| 4/4 [00:00<00:00, 68.07 MB/s]
0%| | 0/1 [00:00<?, ? MB/s]
100%|██████████| 1/1 [00:00<00:00, 6403.52 MB/s]
Set tractography parameters (optional)#
We make this tracking_params which we will pass to the GroupAFQ object which specifies that we want 100,000 seeds randomly distributed in the ROIs of every bundle.
We only do this to make this example faster and consume less space.
tracking_params = dict(seed_mask=RoiImage(),
n_seeds=10000,
random_seeds=True,
rng_seed=42)
Set segmentation parameters (optional)#
We make this segmentation_params which we will pass to the GroupAFQ object which specifies that we want to clip the extracted tract profiles to only be between the two ROIs.
We do this because tract profiles become less reliable as the bundles approach the gray matter-white matter boundary. On some of the non-callosal bundles, ROIs are not in a good position to clip edges. In these cases, one can remove the first and last nodes in a tract profile.
segmentation_params = {"clip_edges": True}
Initialize a GroupAFQ object:#
We specify bundle_info as the callosal bundles only (abd.callosal_bd). If we want to segment both the callosum and the other bundles, we would pass abd.callosal_bd() + abd.default18_bd() instead. This would tell the GroupAFQ object to use bundles from both the standard and callosal templates.
myafq = GroupAFQ(
bids_path=op.join(afd.afq_home, 'stanford_hardi'),
preproc_pipeline='vistasoft',
bundle_info=abd.callosal_bd(),
tracking_params=tracking_params,
segmentation_params=segmentation_params,
viz_backend_spec='plotly_no_gif')
# Calling export all produces all of the outputs of processing, including
# tractography, scalar maps, tract profiles and visualizations:
myafq.export_all()
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 381.02 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 3385.23 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 2735.12 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 3322.22 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 3780.36 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 3814.74 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 2453.53 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 6278.90 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 4826.59 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 4401.16 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 7262.86 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 2645.41 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 3899.86 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 3222.67 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 6652.35 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 6335.81 MB/s]
0%| | 0/2 [00:00<?, ? MB/s]
100%|██████████| 2/2 [00:00<00:00, 6502.80 MB/s]
0%| | 0/179864.0 [00:00<?, ?it/s]
0%| | 335/179864.0 [00:00<00:53, 3349.61it/s]
0%| | 745/179864.0 [00:00<00:47, 3788.74it/s]
1%| | 1162/179864.0 [00:00<00:45, 3959.78it/s]
1%| | 1589/179864.0 [00:00<00:43, 4081.96it/s]
1%| | 2008/179864.0 [00:00<00:43, 4119.45it/s]
1%|▏ | 2432/179864.0 [00:00<00:42, 4160.21it/s]
2%|▏ | 2853/179864.0 [00:00<00:42, 4173.05it/s]
2%|▏ | 3279/179864.0 [00:00<00:42, 4196.11it/s]
2%|▏ | 3714/179864.0 [00:00<00:41, 4243.34it/s]
2%|▏ | 4143/179864.0 [00:01<00:41, 4255.67it/s]
3%|▎ | 4569/179864.0 [00:01<00:41, 4250.34it/s]
3%|▎ | 5007/179864.0 [00:01<00:40, 4286.76it/s]
3%|▎ | 5436/179864.0 [00:01<00:40, 4279.45it/s]
3%|▎ | 5864/179864.0 [00:01<00:40, 4271.56it/s]
4%|▎ | 6297/179864.0 [00:01<00:40, 4288.05it/s]
4%|▎ | 6739/179864.0 [00:01<00:40, 4325.85it/s]
4%|▍ | 7172/179864.0 [00:01<00:39, 4322.01it/s]
4%|▍ | 7620/179864.0 [00:01<00:39, 4367.42it/s]
4%|▍ | 8064/179864.0 [00:01<00:39, 4387.19it/s]
5%|▍ | 8507/179864.0 [00:02<00:38, 4398.48it/s]
5%|▍ | 8947/179864.0 [00:02<00:39, 4351.09it/s]
5%|▌ | 9394/179864.0 [00:02<00:38, 4383.88it/s]
5%|▌ | 9838/179864.0 [00:02<00:38, 4400.60it/s]
6%|▌ | 10297/179864.0 [00:02<00:38, 4454.85it/s]
6%|▌ | 10743/179864.0 [00:02<00:38, 4393.47it/s]
6%|▌ | 11183/179864.0 [00:02<00:38, 4326.19it/s]
6%|▋ | 11640/179864.0 [00:02<00:38, 4397.58it/s]
7%|▋ | 12090/179864.0 [00:02<00:37, 4424.07it/s]
7%|▋ | 12546/179864.0 [00:02<00:37, 4463.06it/s]
7%|▋ | 12993/179864.0 [00:03<00:38, 4386.08it/s]
7%|▋ | 13433/179864.0 [00:03<00:38, 4344.40it/s]
8%|▊ | 13889/179864.0 [00:03<00:37, 4407.55it/s]
8%|▊ | 14354/179864.0 [00:03<00:36, 4479.24it/s]
8%|▊ | 14808/179864.0 [00:03<00:36, 4493.40it/s]
8%|▊ | 15258/179864.0 [00:03<00:36, 4476.84it/s]
9%|▊ | 15706/179864.0 [00:03<00:37, 4402.42it/s]
9%|▉ | 16177/179864.0 [00:03<00:36, 4490.80it/s]
9%|▉ | 16646/179864.0 [00:03<00:35, 4549.69it/s]
10%|▉ | 17111/179864.0 [00:03<00:35, 4579.48it/s]
10%|▉ | 17570/179864.0 [00:04<00:35, 4549.24it/s]
10%|█ | 18026/179864.0 [00:04<00:36, 4479.58it/s]
10%|█ | 18475/179864.0 [00:04<00:36, 4471.28it/s]
11%|█ | 18938/179864.0 [00:04<00:35, 4517.08it/s]
11%|█ | 19398/179864.0 [00:04<00:35, 4539.10it/s]
11%|█ | 19858/179864.0 [00:04<00:35, 4557.01it/s]
11%|█▏ | 20314/179864.0 [00:04<00:35, 4511.97it/s]
12%|█▏ | 20766/179864.0 [00:04<00:35, 4474.58it/s]
12%|█▏ | 21226/179864.0 [00:04<00:35, 4511.19it/s]
12%|█▏ | 21688/179864.0 [00:04<00:34, 4542.96it/s]
12%|█▏ | 22144/179864.0 [00:05<00:34, 4546.71it/s]
13%|█▎ | 22601/179864.0 [00:05<00:34, 4551.25it/s]
13%|█▎ | 23057/179864.0 [00:05<00:34, 4541.44it/s]
13%|█▎ | 23512/179864.0 [00:05<00:34, 4472.31it/s]
13%|█▎ | 23980/179864.0 [00:05<00:34, 4532.53it/s]
14%|█▎ | 24459/179864.0 [00:05<00:33, 4608.60it/s]
14%|█▍ | 24929/179864.0 [00:05<00:33, 4635.64it/s]
14%|█▍ | 25393/179864.0 [00:05<00:33, 4625.21it/s]
14%|█▍ | 25856/179864.0 [00:05<00:33, 4619.54it/s]
15%|█▍ | 26319/179864.0 [00:05<00:34, 4504.07it/s]
15%|█▍ | 26804/179864.0 [00:06<00:33, 4604.17it/s]
15%|█▌ | 27271/179864.0 [00:06<00:33, 4620.97it/s]
15%|█▌ | 27753/179864.0 [00:06<00:32, 4676.64it/s]
16%|█▌ | 28226/179864.0 [00:06<00:32, 4690.31it/s]
16%|█▌ | 28696/179864.0 [00:06<00:32, 4605.43it/s]
16%|█▌ | 29158/179864.0 [00:06<00:33, 4556.85it/s]
16%|█▋ | 29615/179864.0 [00:06<00:33, 4504.62it/s]
17%|█▋ | 30086/179864.0 [00:06<00:32, 4564.67it/s]
17%|█▋ | 30562/179864.0 [00:06<00:32, 4621.56it/s]
17%|█▋ | 31036/179864.0 [00:06<00:31, 4654.85it/s]
18%|█▊ | 31506/179864.0 [00:07<00:31, 4666.54it/s]
18%|█▊ | 31973/179864.0 [00:07<00:31, 4625.83it/s]
18%|█▊ | 32436/179864.0 [00:07<00:32, 4575.83it/s]
18%|█▊ | 32894/179864.0 [00:07<00:32, 4533.68it/s]
19%|█▊ | 33357/179864.0 [00:07<00:32, 4559.33it/s]
19%|█▉ | 33835/179864.0 [00:07<00:31, 4624.08it/s]
19%|█▉ | 34298/179864.0 [00:07<00:31, 4613.69it/s]
19%|█▉ | 34770/179864.0 [00:07<00:31, 4645.24it/s]
20%|█▉ | 35235/179864.0 [00:07<00:31, 4626.94it/s]
20%|█▉ | 35698/179864.0 [00:08<00:31, 4573.80it/s]
20%|██ | 36156/179864.0 [00:08<00:31, 4541.54it/s]
20%|██ | 36624/179864.0 [00:08<00:31, 4582.25it/s]
21%|██ | 37100/179864.0 [00:08<00:30, 4632.71it/s]
21%|██ | 37582/179864.0 [00:08<00:30, 4686.58it/s]
21%|██ | 38051/179864.0 [00:08<00:30, 4674.31it/s]
21%|██▏ | 38519/179864.0 [00:08<00:30, 4657.44it/s]
22%|██▏ | 38985/179864.0 [00:08<00:30, 4580.53it/s]
22%|██▏ | 39444/179864.0 [00:08<00:30, 4561.35it/s]
22%|██▏ | 39907/179864.0 [00:08<00:30, 4580.44it/s]
22%|██▏ | 40401/179864.0 [00:09<00:29, 4685.26it/s]
23%|██▎ | 40881/179864.0 [00:09<00:29, 4717.95it/s]
23%|██▎ | 41360/179864.0 [00:09<00:29, 4738.72it/s]
23%|██▎ | 41835/179864.0 [00:09<00:29, 4719.48it/s]
24%|██▎ | 42308/179864.0 [00:09<00:29, 4621.92it/s]
24%|██▍ | 42771/179864.0 [00:09<00:30, 4539.32it/s]
24%|██▍ | 43236/179864.0 [00:09<00:29, 4571.28it/s]
24%|██▍ | 43724/179864.0 [00:09<00:29, 4659.43it/s]
25%|██▍ | 44223/179864.0 [00:09<00:28, 4756.35it/s]
25%|██▍ | 44700/179864.0 [00:09<00:28, 4723.31it/s]
25%|██▌ | 45180/179864.0 [00:10<00:28, 4744.75it/s]
25%|██▌ | 45655/179864.0 [00:10<00:28, 4644.28it/s]
26%|██▌ | 46133/179864.0 [00:10<00:28, 4682.20it/s]
26%|██▌ | 46634/179864.0 [00:10<00:27, 4777.17it/s]
26%|██▌ | 47150/179864.0 [00:10<00:27, 4890.66it/s]
26%|██▋ | 47660/179864.0 [00:10<00:26, 4950.95it/s]
27%|██▋ | 48156/179864.0 [00:10<00:26, 4894.57it/s]
27%|██▋ | 48646/179864.0 [00:10<00:26, 4878.12it/s]
27%|██▋ | 49135/179864.0 [00:10<00:27, 4755.17it/s]
28%|██▊ | 49612/179864.0 [00:10<00:27, 4727.52it/s]
28%|██▊ | 50100/179864.0 [00:11<00:27, 4771.22it/s]
28%|██▊ | 50601/179864.0 [00:11<00:26, 4839.42it/s]
28%|██▊ | 51094/179864.0 [00:11<00:26, 4866.06it/s]
29%|██▊ | 51581/179864.0 [00:11<00:26, 4815.87it/s]
29%|██▉ | 52067/179864.0 [00:11<00:26, 4828.31it/s]
29%|██▉ | 52551/179864.0 [00:11<00:26, 4725.09it/s]
29%|██▉ | 53025/179864.0 [00:11<00:27, 4679.15it/s]
30%|██▉ | 53502/179864.0 [00:11<00:26, 4704.34it/s]
30%|███ | 54003/179864.0 [00:11<00:26, 4793.99it/s]
30%|███ | 54497/179864.0 [00:11<00:25, 4834.23it/s]
31%|███ | 54981/179864.0 [00:12<00:25, 4815.42it/s]
31%|███ | 55472/179864.0 [00:12<00:25, 4842.99it/s]
31%|███ | 55957/179864.0 [00:12<00:26, 4705.40it/s]
31%|███▏ | 56429/179864.0 [00:12<00:26, 4689.59it/s]
32%|███▏ | 56899/179864.0 [00:12<00:26, 4663.48it/s]
32%|███▏ | 57409/179864.0 [00:12<00:25, 4791.27it/s]
32%|███▏ | 57910/179864.0 [00:12<00:25, 4854.57it/s]
32%|███▏ | 58412/179864.0 [00:12<00:24, 4902.60it/s]
33%|███▎ | 58904/179864.0 [00:12<00:24, 4906.74it/s]
33%|███▎ | 59395/179864.0 [00:12<00:24, 4876.92it/s]
33%|███▎ | 59883/179864.0 [00:13<00:25, 4764.89it/s]
34%|███▎ | 60361/179864.0 [00:13<00:25, 4726.89it/s]
34%|███▍ | 60877/179864.0 [00:13<00:24, 4853.15it/s]
34%|███▍ | 61387/179864.0 [00:13<00:24, 4925.66it/s]
34%|███▍ | 61890/179864.0 [00:13<00:23, 4955.34it/s]
35%|███▍ | 62386/179864.0 [00:13<00:24, 4870.11it/s]
35%|███▍ | 62874/179864.0 [00:13<00:24, 4845.63it/s]
35%|███▌ | 63359/179864.0 [00:13<00:24, 4753.80it/s]
35%|███▌ | 63835/179864.0 [00:13<00:24, 4730.40it/s]
36%|███▌ | 64342/179864.0 [00:14<00:23, 4827.22it/s]
36%|███▌ | 64831/179864.0 [00:14<00:23, 4844.78it/s]
36%|███▋ | 65343/179864.0 [00:14<00:23, 4925.66it/s]
37%|███▋ | 65843/179864.0 [00:14<00:23, 4947.36it/s]
37%|███▋ | 66338/179864.0 [00:14<00:23, 4876.15it/s]
37%|███▋ | 66826/179864.0 [00:14<00:23, 4717.99it/s]
37%|███▋ | 67299/179864.0 [00:14<00:24, 4685.51it/s]
38%|███▊ | 67774/179864.0 [00:14<00:23, 4702.71it/s]
38%|███▊ | 68264/179864.0 [00:14<00:23, 4758.85it/s]
38%|███▊ | 68761/179864.0 [00:14<00:23, 4820.49it/s]
39%|███▊ | 69262/179864.0 [00:15<00:22, 4875.66it/s]
39%|███▉ | 69750/179864.0 [00:15<00:22, 4855.69it/s]
39%|███▉ | 70236/179864.0 [00:15<00:23, 4715.34it/s]
39%|███▉ | 70709/179864.0 [00:15<00:23, 4689.33it/s]
40%|███▉ | 71188/179864.0 [00:15<00:23, 4718.32it/s]
40%|███▉ | 71674/179864.0 [00:15<00:22, 4758.11it/s]
40%|████ | 72165/179864.0 [00:15<00:22, 4801.16it/s]
40%|████ | 72653/179864.0 [00:15<00:22, 4822.23it/s]
41%|████ | 73136/179864.0 [00:15<00:22, 4798.07it/s]
41%|████ | 73617/179864.0 [00:15<00:22, 4723.26it/s]
41%|████ | 74090/179864.0 [00:16<00:22, 4643.14it/s]
41%|████▏ | 74558/179864.0 [00:16<00:22, 4653.87it/s]
42%|████▏ | 75043/179864.0 [00:16<00:22, 4710.51it/s]
42%|████▏ | 75533/179864.0 [00:16<00:21, 4766.04it/s]
42%|████▏ | 76020/179864.0 [00:16<00:21, 4793.84it/s]
43%|████▎ | 76500/179864.0 [00:16<00:21, 4761.86it/s]
43%|████▎ | 76977/179864.0 [00:16<00:22, 4635.88it/s]
43%|████▎ | 77442/179864.0 [00:16<00:22, 4531.29it/s]
43%|████▎ | 77898/179864.0 [00:16<00:22, 4538.81it/s]
44%|████▎ | 78386/179864.0 [00:16<00:21, 4637.19it/s]
44%|████▍ | 78858/179864.0 [00:17<00:21, 4660.25it/s]
44%|████▍ | 79335/179864.0 [00:17<00:21, 4691.86it/s]
44%|████▍ | 79805/179864.0 [00:17<00:21, 4659.22it/s]
45%|████▍ | 80272/179864.0 [00:17<00:21, 4638.30it/s]
45%|████▍ | 80737/179864.0 [00:17<00:21, 4560.67it/s]
45%|████▌ | 81194/179864.0 [00:17<00:21, 4491.10it/s]
45%|████▌ | 81667/179864.0 [00:17<00:21, 4559.84it/s]
46%|████▌ | 82148/179864.0 [00:17<00:21, 4632.58it/s]
46%|████▌ | 82615/179864.0 [00:17<00:20, 4642.68it/s]
46%|████▌ | 83080/179864.0 [00:18<00:21, 4603.13it/s]
46%|████▋ | 83541/179864.0 [00:18<00:21, 4525.59it/s]
47%|████▋ | 84009/179864.0 [00:18<00:20, 4570.36it/s]
47%|████▋ | 84467/179864.0 [00:18<00:20, 4571.36it/s]
47%|████▋ | 84933/179864.0 [00:18<00:20, 4596.79it/s]
47%|████▋ | 85410/179864.0 [00:18<00:20, 4647.15it/s]
48%|████▊ | 85875/179864.0 [00:18<00:20, 4577.02it/s]
48%|████▊ | 86337/179864.0 [00:18<00:20, 4588.84it/s]
48%|████▊ | 86797/179864.0 [00:18<00:20, 4537.81it/s]
49%|████▊ | 87252/179864.0 [00:18<00:20, 4495.25it/s]
49%|████▉ | 87702/179864.0 [00:19<00:20, 4466.82it/s]
49%|████▉ | 88162/179864.0 [00:19<00:20, 4503.84it/s]
49%|████▉ | 88645/179864.0 [00:19<00:19, 4597.56it/s]
50%|████▉ | 89139/179864.0 [00:19<00:19, 4698.71it/s]
50%|████▉ | 89631/179864.0 [00:19<00:18, 4762.28it/s]
50%|█████ | 90108/179864.0 [00:19<00:18, 4755.12it/s]
50%|█████ | 90584/179864.0 [00:19<00:19, 4636.09it/s]
51%|█████ | 91049/179864.0 [00:19<00:19, 4537.76it/s]
51%|█████ | 91504/179864.0 [00:19<00:19, 4456.36it/s]
51%|█████ | 91966/179864.0 [00:19<00:19, 4501.89it/s]
51%|█████▏ | 92455/179864.0 [00:20<00:18, 4614.55it/s]
52%|█████▏ | 92934/179864.0 [00:20<00:18, 4665.13it/s]
52%|█████▏ | 93411/179864.0 [00:20<00:18, 4695.68it/s]
52%|█████▏ | 93884/179864.0 [00:20<00:18, 4704.15it/s]
52%|█████▏ | 94359/179864.0 [00:20<00:18, 4715.60it/s]
53%|█████▎ | 94831/179864.0 [00:20<00:18, 4632.44it/s]
53%|█████▎ | 95295/179864.0 [00:20<00:18, 4581.51it/s]
53%|█████▎ | 95781/179864.0 [00:20<00:18, 4659.78it/s]
54%|█████▎ | 96264/179864.0 [00:20<00:17, 4709.90it/s]
54%|█████▍ | 96736/179864.0 [00:20<00:17, 4711.37it/s]
54%|█████▍ | 97208/179864.0 [00:21<00:17, 4617.80it/s]
54%|█████▍ | 97671/179864.0 [00:21<00:18, 4545.98it/s]
55%|█████▍ | 98127/179864.0 [00:21<00:17, 4542.25it/s]
55%|█████▍ | 98582/179864.0 [00:21<00:18, 4514.04it/s]
55%|█████▌ | 99054/179864.0 [00:21<00:17, 4573.86it/s]
55%|█████▌ | 99545/179864.0 [00:21<00:17, 4671.44it/s]
56%|█████▌ | 100013/179864.0 [00:21<00:17, 4650.69it/s]
56%|█████▌ | 100479/179864.0 [00:21<00:17, 4632.03it/s]
56%|█████▌ | 100943/179864.0 [00:21<00:17, 4554.94it/s]
56%|█████▋ | 101399/179864.0 [00:21<00:17, 4466.04it/s]
57%|█████▋ | 101847/179864.0 [00:22<00:17, 4409.00it/s]
57%|█████▋ | 102301/179864.0 [00:22<00:17, 4445.79it/s]
57%|█████▋ | 102780/179864.0 [00:22<00:16, 4545.70it/s]
57%|█████▋ | 103258/179864.0 [00:22<00:16, 4614.19it/s]
58%|█████▊ | 103740/179864.0 [00:22<00:16, 4674.96it/s]
58%|█████▊ | 104217/179864.0 [00:22<00:16, 4699.89it/s]
58%|█████▊ | 104688/179864.0 [00:22<00:16, 4582.63it/s]
58%|█████▊ | 105148/179864.0 [00:22<00:16, 4575.71it/s]
59%|█████▊ | 105608/179864.0 [00:22<00:16, 4579.17it/s]
59%|█████▉ | 106087/179864.0 [00:23<00:15, 4638.66it/s]
59%|█████▉ | 106574/179864.0 [00:23<00:15, 4705.75it/s]
60%|█████▉ | 107055/179864.0 [00:23<00:15, 4735.62it/s]
60%|█████▉ | 107529/179864.0 [00:23<00:15, 4721.49it/s]
60%|██████ | 108004/179864.0 [00:23<00:15, 4729.02it/s]
60%|██████ | 108478/179864.0 [00:23<00:15, 4685.91it/s]
61%|██████ | 108947/179864.0 [00:23<00:15, 4648.07it/s]
61%|██████ | 109428/179864.0 [00:23<00:15, 4694.54it/s]
61%|██████ | 109933/179864.0 [00:23<00:14, 4799.44it/s]
61%|██████▏ | 110420/179864.0 [00:23<00:14, 4820.02it/s]
62%|██████▏ | 110904/179864.0 [00:24<00:14, 4824.89it/s]
62%|██████▏ | 111400/179864.0 [00:24<00:14, 4863.68it/s]
62%|██████▏ | 111887/179864.0 [00:24<00:14, 4812.93it/s]
62%|██████▏ | 112369/179864.0 [00:24<00:14, 4749.82it/s]
63%|██████▎ | 112847/179864.0 [00:24<00:14, 4757.19it/s]
63%|██████▎ | 113340/179864.0 [00:24<00:13, 4806.98it/s]
63%|██████▎ | 113845/179864.0 [00:24<00:13, 4877.09it/s]
64%|██████▎ | 114334/179864.0 [00:24<00:13, 4879.56it/s]
64%|██████▍ | 114823/179864.0 [00:24<00:13, 4834.15it/s]
64%|██████▍ | 115307/179864.0 [00:24<00:13, 4800.74it/s]
64%|██████▍ | 115788/179864.0 [00:25<00:13, 4750.22it/s]
65%|██████▍ | 116265/179864.0 [00:25<00:13, 4755.24it/s]
65%|██████▍ | 116756/179864.0 [00:25<00:13, 4800.83it/s]
65%|██████▌ | 117251/179864.0 [00:25<00:12, 4843.17it/s]
65%|██████▌ | 117748/179864.0 [00:25<00:12, 4878.26it/s]
66%|██████▌ | 118251/179864.0 [00:25<00:12, 4922.41it/s]
66%|██████▌ | 118744/179864.0 [00:25<00:12, 4876.78it/s]
66%|██████▋ | 119232/179864.0 [00:25<00:12, 4868.77it/s]
67%|██████▋ | 119720/179864.0 [00:25<00:12, 4870.03it/s]
67%|██████▋ | 120236/179864.0 [00:25<00:12, 4954.56it/s]
67%|██████▋ | 120739/179864.0 [00:26<00:11, 4976.45it/s]
67%|██████▋ | 121237/179864.0 [00:26<00:11, 4964.88it/s]
68%|██████▊ | 121752/179864.0 [00:26<00:11, 5018.16it/s]
68%|██████▊ | 122254/179864.0 [00:26<00:11, 4943.87it/s]
68%|██████▊ | 122749/179864.0 [00:26<00:11, 4910.44it/s]
69%|██████▊ | 123241/179864.0 [00:26<00:11, 4908.86it/s]
69%|██████▉ | 123754/179864.0 [00:26<00:11, 4971.39it/s]
69%|██████▉ | 124254/179864.0 [00:26<00:11, 4976.00it/s]
69%|██████▉ | 124754/179864.0 [00:26<00:11, 4982.49it/s]
70%|██████▉ | 125256/179864.0 [00:26<00:10, 4993.64it/s]
70%|██████▉ | 125756/179864.0 [00:27<00:11, 4880.08it/s]
70%|███████ | 126245/179864.0 [00:27<00:11, 4842.11it/s]
70%|███████ | 126752/179864.0 [00:27<00:10, 4907.17it/s]
71%|███████ | 127264/179864.0 [00:27<00:10, 4968.96it/s]
71%|███████ | 127762/179864.0 [00:27<00:10, 4942.03it/s]
71%|███████▏ | 128257/179864.0 [00:27<00:10, 4868.00it/s]
72%|███████▏ | 128745/179864.0 [00:27<00:10, 4824.03it/s]
72%|███████▏ | 129228/179864.0 [00:27<00:10, 4751.32it/s]
72%|███████▏ | 129704/179864.0 [00:27<00:10, 4745.90it/s]
72%|███████▏ | 130201/179864.0 [00:27<00:10, 4810.54it/s]
73%|███████▎ | 130703/179864.0 [00:28<00:10, 4871.16it/s]
73%|███████▎ | 131203/179864.0 [00:28<00:09, 4907.24it/s]
73%|███████▎ | 131694/179864.0 [00:28<00:09, 4863.42it/s]
73%|███████▎ | 132181/179864.0 [00:28<00:09, 4829.11it/s]
74%|███████▍ | 132665/179864.0 [00:28<00:10, 4645.34it/s]
74%|███████▍ | 133131/179864.0 [00:28<00:10, 4594.38it/s]
74%|███████▍ | 133598/179864.0 [00:28<00:10, 4615.09it/s]
75%|███████▍ | 134073/179864.0 [00:28<00:09, 4653.30it/s]
75%|███████▍ | 134551/179864.0 [00:28<00:09, 4686.98it/s]
75%|███████▌ | 135027/179864.0 [00:29<00:09, 4708.56it/s]
75%|███████▌ | 135512/179864.0 [00:29<00:09, 4750.07it/s]
76%|███████▌ | 135988/179864.0 [00:29<00:09, 4671.51it/s]
76%|███████▌ | 136456/179864.0 [00:29<00:09, 4615.68it/s]
76%|███████▌ | 136929/179864.0 [00:29<00:09, 4648.22it/s]
76%|███████▋ | 137423/179864.0 [00:29<00:08, 4731.36it/s]
77%|███████▋ | 137905/179864.0 [00:29<00:08, 4756.54it/s]
77%|███████▋ | 138382/179864.0 [00:29<00:08, 4757.50it/s]
77%|███████▋ | 138858/179864.0 [00:29<00:08, 4589.37it/s]
77%|███████▋ | 139319/179864.0 [00:29<00:09, 4503.80it/s]
78%|███████▊ | 139771/179864.0 [00:30<00:08, 4473.00it/s]
78%|███████▊ | 140256/179864.0 [00:30<00:08, 4582.22it/s]
78%|███████▊ | 140750/179864.0 [00:30<00:08, 4684.35it/s]
79%|███████▊ | 141235/179864.0 [00:30<00:08, 4731.59it/s]
79%|███████▉ | 141709/179864.0 [00:30<00:08, 4721.56it/s]
79%|███████▉ | 142182/179864.0 [00:30<00:08, 4686.16it/s]
79%|███████▉ | 142651/179864.0 [00:30<00:08, 4587.63it/s]
80%|███████▉ | 143125/179864.0 [00:30<00:07, 4629.79it/s]
80%|███████▉ | 143596/179864.0 [00:30<00:07, 4652.38it/s]
80%|████████ | 144095/179864.0 [00:30<00:07, 4749.88it/s]
80%|████████ | 144588/179864.0 [00:31<00:07, 4802.21it/s]
81%|████████ | 145069/179864.0 [00:31<00:07, 4800.34it/s]
81%|████████ | 145550/179864.0 [00:31<00:07, 4676.92it/s]
81%|████████ | 146019/179864.0 [00:31<00:13, 2425.11it/s]
81%|████████▏ | 146512/179864.0 [00:31<00:11, 2871.59it/s]
82%|████████▏ | 146998/179864.0 [00:31<00:10, 3275.01it/s]
82%|████████▏ | 147505/179864.0 [00:31<00:08, 3677.69it/s]
82%|████████▏ | 147974/179864.0 [00:32<00:08, 3921.43it/s]
83%|████████▎ | 148450/179864.0 [00:32<00:07, 4136.11it/s]
83%|████████▎ | 148912/179864.0 [00:32<00:07, 4263.38it/s]
83%|████████▎ | 149395/179864.0 [00:32<00:06, 4418.71it/s]
83%|████████▎ | 149873/179864.0 [00:32<00:06, 4520.53it/s]
84%|████████▎ | 150347/179864.0 [00:32<00:06, 4582.09it/s]
84%|████████▍ | 150822/179864.0 [00:32<00:06, 4629.33it/s]
84%|████████▍ | 151295/179864.0 [00:32<00:06, 4615.46it/s]
84%|████████▍ | 151764/179864.0 [00:32<00:06, 4575.54it/s]
85%|████████▍ | 152243/179864.0 [00:32<00:05, 4637.99it/s]
85%|████████▍ | 152717/179864.0 [00:33<00:05, 4664.81it/s]
85%|████████▌ | 153202/179864.0 [00:33<00:05, 4717.71it/s]
85%|████████▌ | 153676/179864.0 [00:33<00:05, 4674.88it/s]
86%|████████▌ | 154145/179864.0 [00:33<00:05, 4621.06it/s]
86%|████████▌ | 154609/179864.0 [00:33<00:05, 4531.68it/s]
86%|████████▌ | 155064/179864.0 [00:33<00:05, 4527.54it/s]
86%|████████▋ | 155538/179864.0 [00:33<00:05, 4589.21it/s]
87%|████████▋ | 156017/179864.0 [00:33<00:05, 4646.03it/s]
87%|████████▋ | 156483/179864.0 [00:33<00:05, 4622.97it/s]
87%|████████▋ | 156950/179864.0 [00:33<00:04, 4636.40it/s]
88%|████████▊ | 157414/179864.0 [00:34<00:04, 4545.39it/s]
88%|████████▊ | 157870/179864.0 [00:34<00:04, 4527.87it/s]
88%|████████▊ | 158344/179864.0 [00:34<00:04, 4590.35it/s]
88%|████████▊ | 158834/179864.0 [00:34<00:04, 4678.34it/s]
89%|████████▊ | 159303/179864.0 [00:34<00:04, 4643.97it/s]
89%|████████▉ | 159768/179864.0 [00:34<00:04, 4554.31it/s]
89%|████████▉ | 160224/179864.0 [00:34<00:04, 4438.53it/s]
89%|████████▉ | 160681/179864.0 [00:34<00:04, 4473.39it/s]
90%|████████▉ | 161159/179864.0 [00:34<00:04, 4562.60it/s]
90%|████████▉ | 161617/179864.0 [00:35<00:03, 4565.68it/s]
90%|█████████ | 162075/179864.0 [00:35<00:03, 4552.36it/s]
90%|█████████ | 162531/179864.0 [00:35<00:03, 4452.90it/s]
91%|█████████ | 162977/179864.0 [00:35<00:03, 4450.27it/s]
91%|█████████ | 163428/179864.0 [00:35<00:03, 4465.31it/s]
91%|█████████ | 163894/179864.0 [00:35<00:03, 4520.66it/s]
91%|█████████▏| 164347/179864.0 [00:35<00:03, 4497.34it/s]
92%|█████████▏| 164797/179864.0 [00:35<00:03, 4424.97it/s]
92%|█████████▏| 165252/179864.0 [00:35<00:03, 4459.16it/s]
92%|█████████▏| 165712/179864.0 [00:35<00:03, 4500.83it/s]
92%|█████████▏| 166177/179864.0 [00:36<00:03, 4543.23it/s]
93%|█████████▎| 166632/179864.0 [00:36<00:02, 4519.35it/s]
93%|█████████▎| 167085/179864.0 [00:36<00:02, 4450.51it/s]
93%|█████████▎| 167548/179864.0 [00:36<00:02, 4503.39it/s]
93%|█████████▎| 168013/179864.0 [00:36<00:02, 4544.50it/s]
94%|█████████▎| 168468/179864.0 [00:36<00:02, 4529.20it/s]
94%|█████████▍| 168922/179864.0 [00:36<00:02, 4486.77it/s]
94%|█████████▍| 169371/179864.0 [00:36<00:02, 4428.83it/s]
94%|█████████▍| 169827/179864.0 [00:36<00:02, 4464.90it/s]
95%|█████████▍| 170296/179864.0 [00:36<00:02, 4530.26it/s]
95%|█████████▍| 170750/179864.0 [00:37<00:02, 4513.23it/s]
95%|█████████▌| 171202/179864.0 [00:37<00:01, 4452.36it/s]
95%|█████████▌| 171648/179864.0 [00:37<00:01, 4445.78it/s]
96%|█████████▌| 172093/179864.0 [00:37<00:01, 4445.28it/s]
96%|█████████▌| 172538/179864.0 [00:37<00:01, 4406.72it/s]
96%|█████████▌| 172979/179864.0 [00:37<00:01, 4364.71it/s]
96%|█████████▋| 173420/179864.0 [00:37<00:01, 4377.93it/s]
97%|█████████▋| 173861/179864.0 [00:37<00:01, 4386.38it/s]
97%|█████████▋| 174311/179864.0 [00:37<00:01, 4419.91it/s]
97%|█████████▋| 174754/179864.0 [00:37<00:01, 4399.79it/s]
97%|█████████▋| 175195/179864.0 [00:38<00:01, 4398.51it/s]
98%|█████████▊| 175654/179864.0 [00:38<00:00, 4452.26it/s]
98%|█████████▊| 176100/179864.0 [00:38<00:00, 4390.31it/s]
98%|█████████▊| 176540/179864.0 [00:38<00:00, 4354.30it/s]
98%|█████████▊| 176991/179864.0 [00:38<00:00, 4398.22it/s]
99%|█████████▊| 177432/179864.0 [00:38<00:00, 4313.14it/s]
99%|█████████▉| 177899/179864.0 [00:38<00:00, 4415.10it/s]
99%|█████████▉| 178342/179864.0 [00:38<00:00, 4370.06it/s]
99%|█████████▉| 178816/179864.0 [00:38<00:00, 4476.36it/s]
100%|█████████▉| 179297/179864.0 [00:38<00:00, 4574.03it/s]
100%|█████████▉| 179803/179864.0 [00:39<00:00, 4717.71it/s]
100%|██████████| 179864/179864.0 [00:39<00:00, 4597.71it/s]
Optimizing level 2 [max iter: 10000]
Optimizing level 1 [max iter: 1000]
Optimizing level 0 [max iter: 100]
Optimizing level 2 [max iter: 10000]
Optimizing level 1 [max iter: 1000]
Optimizing level 0 [max iter: 100]
Optimizing level 2 [max iter: 10000]
Optimizing level 1 [max iter: 1000]
Optimizing level 0 [max iter: 100]
0it [00:00, ?it/s]
21it [00:00, 195.76it/s]
41it [00:00, 189.58it/s]
61it [00:00, 187.28it/s]
86it [00:00, 203.81it/s]
107it [00:00, 205.19it/s]
128it [00:00, 200.83it/s]
149it [00:00, 192.05it/s]
174it [00:00, 204.47it/s]
195it [00:00, 201.77it/s]
217it [00:01, 201.20it/s]
238it [00:01, 199.58it/s]
259it [00:01, 199.07it/s]
284it [00:01, 211.34it/s]
309it [00:01, 221.04it/s]
333it [00:01, 226.37it/s]
356it [00:01, 225.02it/s]
379it [00:01, 220.23it/s]
402it [00:01, 213.09it/s]
424it [00:02, 205.07it/s]
451it [00:02, 222.03it/s]
477it [00:02, 226.93it/s]
502it [00:02, 231.13it/s]
526it [00:02, 223.22it/s]
549it [00:02, 220.82it/s]
572it [00:02, 209.32it/s]
596it [00:02, 217.30it/s]
619it [00:02, 216.82it/s]
645it [00:03, 228.94it/s]
669it [00:03, 227.19it/s]
692it [00:03, 208.97it/s]
714it [00:03, 201.88it/s]
736it [00:03, 205.65it/s]
759it [00:03, 210.93it/s]
783it [00:03, 218.47it/s]
806it [00:03, 200.39it/s]
831it [00:03, 213.59it/s]
856it [00:04, 221.93it/s]
879it [00:04, 203.65it/s]
900it [00:04, 201.66it/s]
925it [00:04, 212.43it/s]
947it [00:04, 213.53it/s]
969it [00:04, 209.73it/s]
991it [00:04, 203.67it/s]
1013it [00:04, 206.89it/s]
1034it [00:04, 200.69it/s]
1055it [00:05, 197.80it/s]
1075it [00:05, 192.70it/s]
1097it [00:05, 198.60it/s]
1119it [00:05, 203.34it/s]
1140it [00:05, 204.81it/s]
1162it [00:05, 206.71it/s]
1183it [00:05, 196.20it/s]
1207it [00:05, 206.73it/s]
1231it [00:05, 215.11it/s]
1254it [00:05, 218.15it/s]
1277it [00:06, 219.89it/s]
1300it [00:06, 215.02it/s]
1322it [00:06, 212.23it/s]
1344it [00:06, 209.54it/s]
1366it [00:06, 212.10it/s]
1390it [00:06, 218.02it/s]
1412it [00:06, 216.55it/s]
1438it [00:06, 228.19it/s]
1461it [00:06, 223.20it/s]
1484it [00:07, 206.08it/s]
1505it [00:07, 196.59it/s]
1525it [00:07, 188.99it/s]
1547it [00:07, 192.97it/s]
1569it [00:07, 199.26it/s]
1590it [00:07, 197.71it/s]
1610it [00:07, 192.86it/s]
1631it [00:07, 196.62it/s]
1654it [00:07, 205.99it/s]
1676it [00:08, 207.26it/s]
1697it [00:08, 197.42it/s]
1717it [00:08, 192.42it/s]
1737it [00:08, 192.98it/s]
1759it [00:08, 200.48it/s]
1781it [00:08, 203.98it/s]
1802it [00:08, 202.63it/s]
1823it [00:08, 196.91it/s]
1844it [00:08, 195.90it/s]
1866it [00:08, 200.82it/s]
1888it [00:09, 205.98it/s]
1909it [00:09, 198.37it/s]
1930it [00:09, 199.63it/s]
1951it [00:09, 199.95it/s]
1974it [00:09, 205.55it/s]
1995it [00:09, 200.33it/s]
2019it [00:09, 209.81it/s]
2046it [00:09, 223.46it/s]
2069it [00:09, 223.10it/s]
2092it [00:10, 219.85it/s]
2121it [00:10, 238.52it/s]
2146it [00:10, 241.04it/s]
2171it [00:10, 231.54it/s]
2195it [00:10, 226.74it/s]
2218it [00:10, 213.20it/s]
2240it [00:10, 210.25it/s]
2262it [00:10, 211.65it/s]
2284it [00:10, 209.81it/s]
2306it [00:11, 200.96it/s]
2332it [00:11, 211.41it/s]
2354it [00:11, 207.12it/s]
2379it [00:11, 218.55it/s]
2401it [00:11, 212.39it/s]
2425it [00:11, 219.30it/s]
2448it [00:11, 211.43it/s]
2470it [00:11, 203.97it/s]
2492it [00:11, 208.30it/s]
2513it [00:12, 202.22it/s]
2535it [00:12, 204.44it/s]
2556it [00:12, 203.27it/s]
2578it [00:12, 207.94it/s]
2601it [00:12, 214.26it/s]
2625it [00:12, 214.05it/s]
2647it [00:12, 199.25it/s]
2671it [00:12, 207.03it/s]
2692it [00:12, 203.99it/s]
2713it [00:13, 201.09it/s]
2734it [00:13, 201.72it/s]
2759it [00:13, 214.29it/s]
2781it [00:13, 211.10it/s]
2804it [00:13, 213.01it/s]
2828it [00:13, 218.66it/s]
2850it [00:13, 217.55it/s]
2872it [00:13, 214.96it/s]
2894it [00:13, 214.33it/s]
2919it [00:13, 223.18it/s]
2943it [00:14, 226.37it/s]
2966it [00:14, 219.17it/s]
2988it [00:14, 214.37it/s]
3010it [00:14, 199.70it/s]
3031it [00:14, 200.37it/s]
3055it [00:14, 211.13it/s]
3077it [00:14, 213.35it/s]
3101it [00:14, 219.72it/s]
3127it [00:14, 230.01it/s]
3151it [00:15, 205.73it/s]
3173it [00:15, 202.61it/s]
3198it [00:15, 213.99it/s]
3198it [00:15, 209.59it/s]
0%| | 0/8 [00:00<?, ?it/s]
12%|█▎ | 1/8 [00:00<00:01, 5.23it/s]
25%|██▌ | 2/8 [00:00<00:01, 4.68it/s]
38%|███▊ | 3/8 [00:00<00:01, 4.27it/s]
50%|█████ | 4/8 [00:00<00:00, 4.09it/s]
62%|██████▎ | 5/8 [00:01<00:00, 4.00it/s]
75%|███████▌ | 6/8 [00:01<00:00, 4.01it/s]
88%|████████▊ | 7/8 [00:01<00:00, 3.98it/s]
100%|██████████| 8/8 [00:01<00:00, 3.97it/s]
100%|██████████| 8/8 [00:01<00:00, 4.09it/s]
0%| | 0/8 [00:00<?, ?it/s]
12%|█▎ | 1/8 [00:00<00:01, 3.92it/s]
25%|██▌ | 2/8 [00:00<00:01, 3.94it/s]
38%|███▊ | 3/8 [00:00<00:01, 4.08it/s]
50%|█████ | 4/8 [00:00<00:00, 4.02it/s]
62%|██████▎ | 5/8 [00:01<00:00, 3.97it/s]
75%|███████▌ | 6/8 [00:01<00:00, 4.00it/s]
88%|████████▊ | 7/8 [00:01<00:00, 4.02it/s]
100%|██████████| 8/8 [00:02<00:00, 3.96it/s]
100%|██████████| 8/8 [00:02<00:00, 3.98it/s]
Create Group Density Maps:#
pyAFQ can make density maps of streamline counts per subject/session by calling myafq.export(“density_map”). When using GroupAFQ, you can also combine these into one file by calling myafq.export_group_density().
group_density = myafq.export_group_density()
group_density = nib.load(group_density).get_fdata()
fig, ax = plt.subplots(1)
ax.matshow(
group_density[:, :, group_density.shape[-1] // 2, 0],
cmap='viridis')
ax.axis("off")
0%| | 0/1 [00:00<?, ?it/s]
100%|██████████| 1/1 [00:00<00:00, 12.64it/s]
(-0.5, 105.5, 80.5, -0.5)
Visualizing bundles and tract profiles:#
This would run the script and visualize the bundles using the plotly interactive visualization, which should automatically open in a new browser window.
bundle_html = myafq.export("all_bundles_figure")
plotly.io.show(bundle_html["01"][0])
Total running time of the script: (14 minutes 43.237 seconds)
Estimated memory usage: 2638 MB