Multi-Echo Denoising with tedana

Multi-Echo Denoising with tedana#

In this analysis tutorial, we will use tedana [DuPre et al., 2021] to perform multi-echo denoising.

Specifically, we will use tedana.workflows.tedana_workflow().

import json
import os
from glob import glob
from pprint import pprint

import pandas as pd
from IPython.display import HTML, display
from repo2data.repo2data import Repo2Data
from tedana import workflows

# Install the data if running locally, or point to cached data if running on neurolibre
DATA_REQ_FILE = os.path.join("../binder/data_requirement.json")

# Download data
repo2data = Repo2Data(DATA_REQ_FILE)
data_path = repo2data.install()
data_path = os.path.abspath(data_path[0])
---- repo2data starting ----
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/repo2data
Config from file :
../binder/data_requirement.json
Destination:
./../data/multi-echo-data-analysis

Info : ./../data/multi-echo-data-analysis already downloaded
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm
func_dir = os.path.join(data_path, "func/")
data_files = [
    os.path.join(
        func_dir,
        "sub-04570_task-rest_echo-1_space-scanner_desc-partialPreproc_bold.nii.gz",
    ),
    os.path.join(
        func_dir,
        "sub-04570_task-rest_echo-2_space-scanner_desc-partialPreproc_bold.nii.gz",
    ),
    os.path.join(
        func_dir,
        "sub-04570_task-rest_echo-3_space-scanner_desc-partialPreproc_bold.nii.gz",
    ),
    os.path.join(
        func_dir,
        "sub-04570_task-rest_echo-4_space-scanner_desc-partialPreproc_bold.nii.gz",
    ),
]
echo_times = [12.0, 28.0, 44.0, 60.0]
mask_file = os.path.join(
    func_dir, "sub-04570_task-rest_space-scanner_desc-brain_mask.nii.gz"
)
confounds_file = os.path.join(
    func_dir, "sub-04570_task-rest_desc-confounds_timeseries.tsv"
)

out_dir = os.path.join(data_path, "tedana")
workflows.tedana_workflow(
    data_files,
    echo_times,
    out_dir=out_dir,
    mask=mask_file,
    prefix="sub-04570_task-rest_space-scanner",
    fittype="curvefit",
    tedpca="mdl",
    verbose=True,
    gscontrol=["mir"],
)
Hide code cell output
INFO     tedana:tedana_workflow:569 Using output directory: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana
INFO     tedana:tedana_workflow:587 Initializing and validating component selection tree
WARNING  component_selector:validate_tree:141 Decision tree includes fields that are not used or logged ['_comment']
INFO     component_selector:__init__:326 Performing component selection with tedana_orig_decision_tree
INFO     component_selector:__init__:327 Very similar to the decision tree designed by Prantik Kundu
INFO     tedana:tedana_workflow:590 Loading input data: ['/home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/func/sub-04570_task-rest_echo-1_space-scanner_desc-partialPreproc_bold.nii.gz', '/home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/func/sub-04570_task-rest_echo-2_space-scanner_desc-partialPreproc_bold.nii.gz', '/home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/func/sub-04570_task-rest_echo-3_space-scanner_desc-partialPreproc_bold.nii.gz', '/home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/func/sub-04570_task-rest_echo-4_space-scanner_desc-partialPreproc_bold.nii.gz']
INFO     io:__init__:155 Generating figures directory: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/figures
INFO     tedana:tedana_workflow:666 Using user-defined mask
INFO     utils:make_adaptive_mask:198 Echo-wise intensity thresholds for adaptive mask: [258.33994278 180.98638476 134.6796175   91.51006253]
WARNING  utils:make_adaptive_mask:227 734 voxels in user-defined mask do not have good signal. Removing voxels from mask.
INFO     tedana:tedana_workflow:716 Computing T2* map
2-echo monoexponential:   0%|          | 0/2224 [00:00<?, ?it/s]
2-echo monoexponential:   3%|▎         | 57/2224 [00:00<00:03, 565.55it/s]
2-echo monoexponential:   6%|▌         | 135/2224 [00:00<00:03, 687.37it/s]
2-echo monoexponential:  10%|▉         | 214/2224 [00:00<00:02, 733.17it/s]
2-echo monoexponential:  13%|█▎        | 294/2224 [00:00<00:02, 758.20it/s]
2-echo monoexponential:  17%|█▋        | 372/2224 [00:00<00:02, 762.36it/s]
2-echo monoexponential:  20%|██        | 452/2224 [00:00<00:02, 772.77it/s]
2-echo monoexponential:  24%|██▍       | 532/2224 [00:00<00:02, 779.62it/s]
2-echo monoexponential:  27%|██▋       | 610/2224 [00:00<00:02, 774.36it/s]
2-echo monoexponential:  31%|███       | 688/2224 [00:00<00:01, 770.13it/s]
2-echo monoexponential:  34%|███▍      | 766/2224 [00:01<00:01, 768.18it/s]
2-echo monoexponential:  38%|███▊      | 843/2224 [00:01<00:01, 764.77it/s]
2-echo monoexponential:  41%|████▏     | 920/2224 [00:01<00:01, 765.61it/s]
2-echo monoexponential:  45%|████▍     | 997/2224 [00:01<00:01, 762.44it/s]
2-echo monoexponential:  48%|████▊     | 1076/2224 [00:01<00:01, 767.88it/s]
2-echo monoexponential:  52%|█████▏    | 1153/2224 [00:01<00:01, 765.10it/s]
2-echo monoexponential:  55%|█████▌    | 1230/2224 [00:01<00:01, 761.38it/s]
2-echo monoexponential:  59%|█████▉    | 1308/2224 [00:01<00:01, 763.89it/s]
2-echo monoexponential:  62%|██████▏   | 1385/2224 [00:01<00:01, 760.53it/s]
2-echo monoexponential:  66%|██████▌   | 1462/2224 [00:01<00:01, 757.87it/s]
2-echo monoexponential:  69%|██████▉   | 1539/2224 [00:02<00:00, 761.07it/s]
2-echo monoexponential:  73%|███████▎  | 1616/2224 [00:02<00:00, 763.59it/s]
2-echo monoexponential:  76%|███████▌  | 1693/2224 [00:02<00:00, 764.15it/s]
2-echo monoexponential:  80%|███████▉  | 1771/2224 [00:02<00:00, 765.81it/s]
2-echo monoexponential:  83%|████████▎ | 1850/2224 [00:02<00:00, 770.55it/s]
2-echo monoexponential:  87%|████████▋ | 1930/2224 [00:02<00:00, 776.73it/s]
2-echo monoexponential:  90%|█████████ | 2009/2224 [00:02<00:00, 780.15it/s]
2-echo monoexponential:  94%|█████████▍| 2088/2224 [00:02<00:00, 771.55it/s]
2-echo monoexponential:  97%|█████████▋| 2166/2224 [00:02<00:00, 757.93it/s]
2-echo monoexponential: 100%|██████████| 2224/2224 [00:02<00:00, 761.24it/s]

3-echo monoexponential:   0%|          | 0/1092 [00:00<?, ?it/s]
3-echo monoexponential:   4%|▍         | 48/1092 [00:00<00:02, 474.76it/s]
3-echo monoexponential:   9%|▉         | 97/1092 [00:00<00:02, 479.39it/s]
3-echo monoexponential:  14%|█▎        | 149/1092 [00:00<00:01, 496.22it/s]
3-echo monoexponential:  18%|█▊        | 201/1092 [00:00<00:01, 505.44it/s]
3-echo monoexponential:  23%|██▎       | 252/1092 [00:00<00:01, 502.63it/s]
3-echo monoexponential:  28%|██▊       | 303/1092 [00:00<00:01, 497.69it/s]
3-echo monoexponential:  32%|███▏      | 353/1092 [00:00<00:01, 493.14it/s]
3-echo monoexponential:  37%|███▋      | 403/1092 [00:00<00:01, 493.70it/s]
3-echo monoexponential:  42%|████▏     | 455/1092 [00:00<00:01, 498.76it/s]
3-echo monoexponential:  46%|████▋     | 506/1092 [00:01<00:01, 500.51it/s]
3-echo monoexponential:  51%|█████     | 557/1092 [00:01<00:01, 499.04it/s]
3-echo monoexponential:  56%|█████▌    | 607/1092 [00:01<00:00, 489.88it/s]
3-echo monoexponential:  60%|██████    | 660/1092 [00:01<00:00, 501.54it/s]
3-echo monoexponential:  65%|██████▌   | 711/1092 [00:01<00:00, 491.21it/s]
3-echo monoexponential:  70%|██████▉   | 761/1092 [00:01<00:00, 491.17it/s]
3-echo monoexponential:  74%|███████▍  | 811/1092 [00:01<00:00, 488.27it/s]
3-echo monoexponential:  79%|███████▉  | 860/1092 [00:01<00:00, 487.44it/s]
3-echo monoexponential:  84%|████████▎ | 912/1092 [00:01<00:00, 496.68it/s]
3-echo monoexponential:  88%|████████▊ | 964/1092 [00:01<00:00, 502.70it/s]
3-echo monoexponential:  93%|█████████▎| 1015/1092 [00:02<00:00, 501.78it/s]
3-echo monoexponential:  98%|█████████▊| 1066/1092 [00:02<00:00, 497.76it/s]
3-echo monoexponential: 100%|██████████| 1092/1092 [00:02<00:00, 495.35it/s]

4-echo monoexponential:   0%|          | 0/20176 [00:00<?, ?it/s]
4-echo monoexponential:   0%|          | 50/20176 [00:00<00:40, 496.54it/s]
4-echo monoexponential:   1%|          | 104/20176 [00:00<00:38, 518.71it/s]
4-echo monoexponential:   1%|          | 160/20176 [00:00<00:37, 535.22it/s]
4-echo monoexponential:   1%|          | 219/20176 [00:00<00:36, 553.94it/s]
4-echo monoexponential:   1%|▏         | 276/20176 [00:00<00:35, 555.36it/s]
4-echo monoexponential:   2%|▏         | 333/20176 [00:00<00:35, 559.36it/s]
4-echo monoexponential:   2%|▏         | 392/20176 [00:00<00:34, 568.87it/s]
4-echo monoexponential:   2%|▏         | 449/20176 [00:00<00:35, 562.81it/s]
4-echo monoexponential:   3%|▎         | 508/20176 [00:00<00:34, 568.92it/s]
4-echo monoexponential:   3%|▎         | 566/20176 [00:01<00:34, 570.62it/s]
4-echo monoexponential:   3%|▎         | 624/20176 [00:01<00:34, 563.48it/s]
4-echo monoexponential:   3%|▎         | 681/20176 [00:01<00:34, 559.22it/s]
4-echo monoexponential:   4%|▎         | 739/20176 [00:01<00:34, 562.39it/s]
4-echo monoexponential:   4%|▍         | 797/20176 [00:01<00:34, 565.43it/s]
4-echo monoexponential:   4%|▍         | 854/20176 [00:01<00:34, 566.20it/s]
4-echo monoexponential:   5%|▍         | 914/20176 [00:01<00:33, 574.44it/s]
4-echo monoexponential:   5%|▍         | 972/20176 [00:01<00:33, 570.27it/s]
4-echo monoexponential:   5%|▌         | 1030/20176 [00:01<00:35, 541.75it/s]
4-echo monoexponential:   5%|▌         | 1085/20176 [00:01<00:35, 543.31it/s]
4-echo monoexponential:   6%|▌         | 1144/20176 [00:02<00:34, 556.04it/s]
4-echo monoexponential:   6%|▌         | 1201/20176 [00:02<00:33, 559.84it/s]
4-echo monoexponential:   6%|▌         | 1258/20176 [00:02<00:33, 562.82it/s]
4-echo monoexponential:   7%|▋         | 1320/20176 [00:02<00:32, 577.49it/s]
4-echo monoexponential:   7%|▋         | 1382/20176 [00:02<00:31, 588.76it/s]
4-echo monoexponential:   7%|▋         | 1441/20176 [00:02<00:32, 574.98it/s]
4-echo monoexponential:   7%|▋         | 1499/20176 [00:02<00:33, 557.37it/s]
4-echo monoexponential:   8%|▊         | 1559/20176 [00:02<00:32, 566.86it/s]
4-echo monoexponential:   8%|▊         | 1618/20176 [00:02<00:32, 573.02it/s]
4-echo monoexponential:   8%|▊         | 1680/20176 [00:02<00:31, 583.84it/s]
4-echo monoexponential:   9%|▊         | 1739/20176 [00:03<00:31, 584.40it/s]
4-echo monoexponential:   9%|▉         | 1798/20176 [00:03<00:31, 583.59it/s]
4-echo monoexponential:   9%|▉         | 1859/20176 [00:03<00:30, 591.04it/s]
4-echo monoexponential:  10%|▉         | 1919/20176 [00:03<00:30, 590.79it/s]
4-echo monoexponential:  10%|▉         | 1979/20176 [00:03<00:31, 573.24it/s]
4-echo monoexponential:  10%|█         | 2037/20176 [00:03<00:31, 570.98it/s]
4-echo monoexponential:  10%|█         | 2097/20176 [00:03<00:31, 577.34it/s]
4-echo monoexponential:  11%|█         | 2156/20176 [00:03<00:31, 579.32it/s]
4-echo monoexponential:  11%|█         | 2218/20176 [00:03<00:30, 591.16it/s]
4-echo monoexponential:  11%|█▏        | 2280/20176 [00:03<00:29, 598.29it/s]
4-echo monoexponential:  12%|█▏        | 2342/20176 [00:04<00:29, 604.73it/s]
4-echo monoexponential:  12%|█▏        | 2404/20176 [00:04<00:29, 606.67it/s]
4-echo monoexponential:  12%|█▏        | 2466/20176 [00:04<00:29, 608.53it/s]
4-echo monoexponential:  13%|█▎        | 2527/20176 [00:04<00:29, 605.95it/s]
4-echo monoexponential:  13%|█▎        | 2588/20176 [00:04<00:30, 580.38it/s]
4-echo monoexponential:  13%|█▎        | 2647/20176 [00:04<00:30, 582.19it/s]
4-echo monoexponential:  13%|█▎        | 2706/20176 [00:04<00:30, 580.56it/s]
4-echo monoexponential:  14%|█▎        | 2766/20176 [00:04<00:29, 585.19it/s]
4-echo monoexponential:  14%|█▍        | 2828/20176 [00:04<00:29, 594.81it/s]
4-echo monoexponential:  14%|█▍        | 2889/20176 [00:05<00:28, 598.80it/s]
4-echo monoexponential:  15%|█▍        | 2951/20176 [00:05<00:28, 603.11it/s]
4-echo monoexponential:  15%|█▍        | 3013/20176 [00:05<00:28, 607.67it/s]
4-echo monoexponential:  15%|█▌        | 3076/20176 [00:05<00:27, 610.95it/s]
4-echo monoexponential:  16%|█▌        | 3139/20176 [00:05<00:27, 615.30it/s]
4-echo monoexponential:  16%|█▌        | 3201/20176 [00:05<00:27, 606.64it/s]
4-echo monoexponential:  16%|█▌        | 3262/20176 [00:05<00:28, 589.00it/s]
4-echo monoexponential:  16%|█▋        | 3323/20176 [00:05<00:28, 592.28it/s]
4-echo monoexponential:  17%|█▋        | 3384/20176 [00:05<00:28, 595.33it/s]
4-echo monoexponential:  17%|█▋        | 3444/20176 [00:05<00:28, 595.66it/s]
4-echo monoexponential:  17%|█▋        | 3507/20176 [00:06<00:27, 604.49it/s]
4-echo monoexponential:  18%|█▊        | 3571/20176 [00:06<00:27, 613.56it/s]
4-echo monoexponential:  18%|█▊        | 3633/20176 [00:06<00:27, 609.31it/s]
4-echo monoexponential:  18%|█▊        | 3694/20176 [00:06<00:27, 605.17it/s]
4-echo monoexponential:  19%|█▊        | 3756/20176 [00:06<00:26, 608.33it/s]
4-echo monoexponential:  19%|█▉        | 3817/20176 [00:06<00:27, 605.40it/s]
4-echo monoexponential:  19%|█▉        | 3878/20176 [00:06<00:27, 602.14it/s]
4-echo monoexponential:  20%|█▉        | 3939/20176 [00:06<00:27, 587.57it/s]
4-echo monoexponential:  20%|█▉        | 3999/20176 [00:06<00:27, 589.10it/s]
4-echo monoexponential:  20%|██        | 4060/20176 [00:06<00:27, 592.84it/s]
4-echo monoexponential:  20%|██        | 4120/20176 [00:07<00:27, 580.18it/s]
4-echo monoexponential:  21%|██        | 4179/20176 [00:07<00:27, 578.19it/s]
4-echo monoexponential:  21%|██        | 4241/20176 [00:07<00:27, 590.11it/s]
4-echo monoexponential:  21%|██▏       | 4305/20176 [00:07<00:26, 604.31it/s]
4-echo monoexponential:  22%|██▏       | 4366/20176 [00:07<00:26, 598.21it/s]
4-echo monoexponential:  22%|██▏       | 4427/20176 [00:07<00:26, 600.63it/s]
4-echo monoexponential:  22%|██▏       | 4491/20176 [00:07<00:25, 609.33it/s]
4-echo monoexponential:  23%|██▎       | 4552/20176 [00:07<00:25, 608.26it/s]
4-echo monoexponential:  23%|██▎       | 4613/20176 [00:07<00:25, 604.48it/s]
4-echo monoexponential:  23%|██▎       | 4674/20176 [00:08<00:26, 588.90it/s]
4-echo monoexponential:  23%|██▎       | 4733/20176 [00:08<00:26, 588.04it/s]
4-echo monoexponential:  24%|██▍       | 4793/20176 [00:08<00:26, 590.99it/s]
4-echo monoexponential:  24%|██▍       | 4853/20176 [00:08<00:26, 587.86it/s]
4-echo monoexponential:  24%|██▍       | 4913/20176 [00:08<00:25, 589.02it/s]
4-echo monoexponential:  25%|██▍       | 4974/20176 [00:08<00:25, 594.09it/s]
4-echo monoexponential:  25%|██▍       | 5038/20176 [00:08<00:24, 607.17it/s]
4-echo monoexponential:  25%|██▌       | 5100/20176 [00:08<00:24, 608.13it/s]
4-echo monoexponential:  26%|██▌       | 5164/20176 [00:08<00:24, 615.82it/s]
4-echo monoexponential:  26%|██▌       | 5227/20176 [00:08<00:24, 617.33it/s]
4-echo monoexponential:  26%|██▌       | 5289/20176 [00:09<00:24, 615.91it/s]
4-echo monoexponential:  27%|██▋       | 5351/20176 [00:09<00:24, 608.66it/s]
4-echo monoexponential:  27%|██▋       | 5412/20176 [00:09<00:24, 592.57it/s]
4-echo monoexponential:  27%|██▋       | 5472/20176 [00:09<00:25, 580.94it/s]
4-echo monoexponential:  27%|██▋       | 5533/20176 [00:09<00:24, 587.24it/s]
4-echo monoexponential:  28%|██▊       | 5592/20176 [00:09<00:24, 586.37it/s]
4-echo monoexponential:  28%|██▊       | 5651/20176 [00:09<00:24, 584.75it/s]
4-echo monoexponential:  28%|██▊       | 5715/20176 [00:09<00:24, 599.41it/s]
4-echo monoexponential:  29%|██▊       | 5780/20176 [00:09<00:23, 611.68it/s]
4-echo monoexponential:  29%|██▉       | 5842/20176 [00:09<00:23, 613.75it/s]
4-echo monoexponential:  29%|██▉       | 5904/20176 [00:10<00:23, 607.19it/s]
4-echo monoexponential:  30%|██▉       | 5965/20176 [00:10<00:23, 607.38it/s]
4-echo monoexponential:  30%|██▉       | 6026/20176 [00:10<00:23, 599.01it/s]
4-echo monoexponential:  30%|███       | 6086/20176 [00:10<00:24, 585.20it/s]
4-echo monoexponential:  30%|███       | 6147/20176 [00:10<00:23, 592.14it/s]
4-echo monoexponential:  31%|███       | 6207/20176 [00:10<00:24, 569.67it/s]
4-echo monoexponential:  31%|███       | 6265/20176 [00:10<00:24, 568.68it/s]
4-echo monoexponential:  31%|███▏      | 6323/20176 [00:10<00:24, 571.60it/s]
4-echo monoexponential:  32%|███▏      | 6381/20176 [00:10<00:24, 571.02it/s]
4-echo monoexponential:  32%|███▏      | 6440/20176 [00:10<00:23, 575.63it/s]
4-echo monoexponential:  32%|███▏      | 6502/20176 [00:11<00:23, 586.68it/s]
4-echo monoexponential:  33%|███▎      | 6564/20176 [00:11<00:22, 595.69it/s]
4-echo monoexponential:  33%|███▎      | 6627/20176 [00:11<00:22, 602.84it/s]
4-echo monoexponential:  33%|███▎      | 6688/20176 [00:11<00:22, 603.67it/s]
4-echo monoexponential:  33%|███▎      | 6749/20176 [00:11<00:22, 602.47it/s]
4-echo monoexponential:  34%|███▍      | 6811/20176 [00:11<00:21, 607.56it/s]
4-echo monoexponential:  34%|███▍      | 6872/20176 [00:11<00:22, 602.93it/s]
4-echo monoexponential:  34%|███▍      | 6933/20176 [00:11<00:22, 594.16it/s]
4-echo monoexponential:  35%|███▍      | 6993/20176 [00:11<00:23, 570.67it/s]
4-echo monoexponential:  35%|███▍      | 7053/20176 [00:12<00:22, 576.80it/s]
4-echo monoexponential:  35%|███▌      | 7113/20176 [00:12<00:22, 581.36it/s]
4-echo monoexponential:  36%|███▌      | 7173/20176 [00:12<00:22, 585.48it/s]
4-echo monoexponential:  36%|███▌      | 7233/20176 [00:12<00:22, 587.02it/s]
4-echo monoexponential:  36%|███▌      | 7295/20176 [00:12<00:21, 595.36it/s]
4-echo monoexponential:  36%|███▋      | 7359/20176 [00:12<00:21, 607.23it/s]
4-echo monoexponential:  37%|███▋      | 7420/20176 [00:12<00:21, 607.32it/s]
4-echo monoexponential:  37%|███▋      | 7481/20176 [00:12<00:21, 600.55it/s]
4-echo monoexponential:  37%|███▋      | 7542/20176 [00:12<00:21, 600.94it/s]
4-echo monoexponential:  38%|███▊      | 7604/20176 [00:12<00:20, 604.68it/s]
4-echo monoexponential:  38%|███▊      | 7667/20176 [00:13<00:20, 609.80it/s]
4-echo monoexponential:  38%|███▊      | 7728/20176 [00:13<00:21, 591.44it/s]
4-echo monoexponential:  39%|███▊      | 7788/20176 [00:13<00:21, 577.69it/s]
4-echo monoexponential:  39%|███▉      | 7846/20176 [00:13<00:21, 577.77it/s]
4-echo monoexponential:  39%|███▉      | 7904/20176 [00:13<00:21, 576.35it/s]
4-echo monoexponential:  39%|███▉      | 7965/20176 [00:13<00:20, 583.85it/s]
4-echo monoexponential:  40%|███▉      | 8024/20176 [00:13<00:20, 583.71it/s]
4-echo monoexponential:  40%|████      | 8085/20176 [00:13<00:20, 589.00it/s]
4-echo monoexponential:  40%|████      | 8148/20176 [00:13<00:20, 599.66it/s]
4-echo monoexponential:  41%|████      | 8210/20176 [00:13<00:19, 602.30it/s]
4-echo monoexponential:  41%|████      | 8272/20176 [00:14<00:19, 605.58it/s]
4-echo monoexponential:  41%|████▏     | 8333/20176 [00:14<00:19, 602.48it/s]
4-echo monoexponential:  42%|████▏     | 8394/20176 [00:14<00:19, 600.60it/s]
4-echo monoexponential:  42%|████▏     | 8456/20176 [00:14<00:19, 603.49it/s]
4-echo monoexponential:  42%|████▏     | 8517/20176 [00:14<00:19, 604.62it/s]
4-echo monoexponential:  43%|████▎     | 8578/20176 [00:14<00:19, 584.22it/s]
4-echo monoexponential:  43%|████▎     | 8637/20176 [00:14<00:20, 576.74it/s]
4-echo monoexponential:  43%|████▎     | 8696/20176 [00:14<00:19, 578.66it/s]
4-echo monoexponential:  43%|████▎     | 8754/20176 [00:14<00:19, 574.38it/s]
4-echo monoexponential:  44%|████▎     | 8816/20176 [00:14<00:19, 586.26it/s]
4-echo monoexponential:  44%|████▍     | 8878/20176 [00:15<00:19, 594.59it/s]
4-echo monoexponential:  44%|████▍     | 8938/20176 [00:15<00:19, 586.53it/s]
4-echo monoexponential:  45%|████▍     | 9001/20176 [00:15<00:18, 596.31it/s]
4-echo monoexponential:  45%|████▍     | 9061/20176 [00:15<00:18, 596.14it/s]
4-echo monoexponential:  45%|████▌     | 9123/20176 [00:15<00:18, 600.29it/s]
4-echo monoexponential:  46%|████▌     | 9188/20176 [00:15<00:17, 612.70it/s]
4-echo monoexponential:  46%|████▌     | 9251/20176 [00:15<00:17, 615.45it/s]
4-echo monoexponential:  46%|████▌     | 9313/20176 [00:15<00:17, 612.94it/s]
4-echo monoexponential:  46%|████▋     | 9375/20176 [00:15<00:18, 594.70it/s]
4-echo monoexponential:  47%|████▋     | 9435/20176 [00:16<00:18, 593.42it/s]
4-echo monoexponential:  47%|████▋     | 9495/20176 [00:16<00:18, 592.62it/s]
4-echo monoexponential:  47%|████▋     | 9555/20176 [00:16<00:18, 581.52it/s]
4-echo monoexponential:  48%|████▊     | 9617/20176 [00:16<00:17, 588.46it/s]
4-echo monoexponential:  48%|████▊     | 9677/20176 [00:16<00:17, 590.28it/s]
4-echo monoexponential:  48%|████▊     | 9739/20176 [00:16<00:17, 594.87it/s]
4-echo monoexponential:  49%|████▊     | 9799/20176 [00:16<00:17, 595.65it/s]
4-echo monoexponential:  49%|████▉     | 9859/20176 [00:16<00:17, 592.70it/s]
4-echo monoexponential:  49%|████▉     | 9923/20176 [00:16<00:16, 605.58it/s]
4-echo monoexponential:  50%|████▉     | 9988/20176 [00:16<00:16, 616.49it/s]
4-echo monoexponential:  50%|████▉     | 10050/20176 [00:17<00:16, 614.47it/s]
4-echo monoexponential:  50%|█████     | 10112/20176 [00:17<00:16, 605.41it/s]
4-echo monoexponential:  50%|█████     | 10173/20176 [00:17<00:16, 589.83it/s]
4-echo monoexponential:  51%|█████     | 10233/20176 [00:17<00:17, 579.10it/s]
4-echo monoexponential:  51%|█████     | 10294/20176 [00:17<00:16, 585.66it/s]
4-echo monoexponential:  51%|█████▏    | 10353/20176 [00:17<00:16, 583.74it/s]
4-echo monoexponential:  52%|█████▏    | 10413/20176 [00:17<00:16, 587.91it/s]
4-echo monoexponential:  52%|█████▏    | 10474/20176 [00:17<00:16, 594.18it/s]
4-echo monoexponential:  52%|█████▏    | 10536/20176 [00:17<00:16, 601.31it/s]
4-echo monoexponential:  53%|█████▎    | 10600/20176 [00:17<00:15, 610.69it/s]
4-echo monoexponential:  53%|█████▎    | 10662/20176 [00:18<00:16, 593.51it/s]
4-echo monoexponential:  53%|█████▎    | 10724/20176 [00:18<00:15, 600.20it/s]
4-echo monoexponential:  53%|█████▎    | 10788/20176 [00:18<00:15, 609.09it/s]
4-echo monoexponential:  54%|█████▍    | 10851/20176 [00:18<00:15, 612.98it/s]
4-echo monoexponential:  54%|█████▍    | 10913/20176 [00:18<00:15, 603.99it/s]
4-echo monoexponential:  54%|█████▍    | 10974/20176 [00:18<00:15, 584.21it/s]
4-echo monoexponential:  55%|█████▍    | 11033/20176 [00:18<00:15, 575.07it/s]
4-echo monoexponential:  55%|█████▍    | 11091/20176 [00:18<00:15, 574.08it/s]
4-echo monoexponential:  55%|█████▌    | 11150/20176 [00:18<00:15, 577.40it/s]
4-echo monoexponential:  56%|█████▌    | 11216/20176 [00:19<00:14, 598.99it/s]
4-echo monoexponential:  56%|█████▌    | 11280/20176 [00:19<00:14, 608.55it/s]
4-echo monoexponential:  56%|█████▌    | 11341/20176 [00:19<00:14, 603.78it/s]
4-echo monoexponential:  57%|█████▋    | 11402/20176 [00:19<00:14, 604.83it/s]
4-echo monoexponential:  57%|█████▋    | 11465/20176 [00:19<00:14, 612.17it/s]
4-echo monoexponential:  57%|█████▋    | 11527/20176 [00:19<00:14, 611.49it/s]
4-echo monoexponential:  57%|█████▋    | 11590/20176 [00:19<00:13, 615.85it/s]
4-echo monoexponential:  58%|█████▊    | 11652/20176 [00:19<00:13, 616.54it/s]
4-echo monoexponential:  58%|█████▊    | 11714/20176 [00:19<00:13, 612.20it/s]
4-echo monoexponential:  58%|█████▊    | 11776/20176 [00:19<00:15, 557.90it/s]
4-echo monoexponential:  59%|█████▊    | 11834/20176 [00:20<00:14, 563.75it/s]
4-echo monoexponential:  59%|█████▉    | 11892/20176 [00:20<00:14, 565.42it/s]
4-echo monoexponential:  59%|█████▉    | 11952/20176 [00:20<00:14, 573.45it/s]
4-echo monoexponential:  60%|█████▉    | 12012/20176 [00:20<00:14, 580.78it/s]
4-echo monoexponential:  60%|█████▉    | 12071/20176 [00:20<00:13, 583.18it/s]
4-echo monoexponential:  60%|██████    | 12134/20176 [00:20<00:13, 595.98it/s]
4-echo monoexponential:  60%|██████    | 12196/20176 [00:20<00:13, 602.75it/s]
4-echo monoexponential:  61%|██████    | 12259/20176 [00:20<00:13, 608.23it/s]
4-echo monoexponential:  61%|██████    | 12322/20176 [00:20<00:12, 612.97it/s]
4-echo monoexponential:  61%|██████▏   | 12384/20176 [00:20<00:12, 613.43it/s]
4-echo monoexponential:  62%|██████▏   | 12446/20176 [00:21<00:12, 614.46it/s]
4-echo monoexponential:  62%|██████▏   | 12508/20176 [00:21<00:12, 611.94it/s]
4-echo monoexponential:  62%|██████▏   | 12570/20176 [00:21<00:13, 565.61it/s]
4-echo monoexponential:  63%|██████▎   | 12630/20176 [00:21<00:13, 574.13it/s]
4-echo monoexponential:  63%|██████▎   | 12692/20176 [00:21<00:12, 586.13it/s]
4-echo monoexponential:  63%|██████▎   | 12754/20176 [00:21<00:12, 593.53it/s]
4-echo monoexponential:  64%|██████▎   | 12816/20176 [00:21<00:12, 598.64it/s]
4-echo monoexponential:  64%|██████▍   | 12879/20176 [00:21<00:12, 607.05it/s]
4-echo monoexponential:  64%|██████▍   | 12940/20176 [00:21<00:11, 607.22it/s]
4-echo monoexponential:  64%|██████▍   | 13002/20176 [00:21<00:11, 608.34it/s]
4-echo monoexponential:  65%|██████▍   | 13064/20176 [00:22<00:11, 610.91it/s]
4-echo monoexponential:  65%|██████▌   | 13126/20176 [00:22<00:11, 606.76it/s]
4-echo monoexponential:  65%|██████▌   | 13187/20176 [00:22<00:11, 604.03it/s]
4-echo monoexponential:  66%|██████▌   | 13248/20176 [00:22<00:11, 601.84it/s]
4-echo monoexponential:  66%|██████▌   | 13309/20176 [00:22<00:11, 596.09it/s]
4-echo monoexponential:  66%|██████▋   | 13369/20176 [00:22<00:11, 568.19it/s]
4-echo monoexponential:  67%|██████▋   | 13430/20176 [00:22<00:11, 579.22it/s]
4-echo monoexponential:  67%|██████▋   | 13489/20176 [00:22<00:11, 579.52it/s]
4-echo monoexponential:  67%|██████▋   | 13548/20176 [00:22<00:11, 582.44it/s]
4-echo monoexponential:  67%|██████▋   | 13609/20176 [00:23<00:11, 590.28it/s]
4-echo monoexponential:  68%|██████▊   | 13673/20176 [00:23<00:10, 602.67it/s]
4-echo monoexponential:  68%|██████▊   | 13736/20176 [00:23<00:10, 609.61it/s]
4-echo monoexponential:  68%|██████▊   | 13798/20176 [00:23<00:10, 609.31it/s]
4-echo monoexponential:  69%|██████▊   | 13859/20176 [00:23<00:10, 608.30it/s]
4-echo monoexponential:  69%|██████▉   | 13920/20176 [00:23<00:10, 606.30it/s]
4-echo monoexponential:  69%|██████▉   | 13983/20176 [00:23<00:10, 610.63it/s]
4-echo monoexponential:  70%|██████▉   | 14045/20176 [00:23<00:10, 608.43it/s]
4-echo monoexponential:  70%|██████▉   | 14106/20176 [00:23<00:10, 598.61it/s]
4-echo monoexponential:  70%|███████   | 14166/20176 [00:23<00:10, 576.89it/s]
4-echo monoexponential:  70%|███████   | 14224/20176 [00:24<00:10, 571.69it/s]
4-echo monoexponential:  71%|███████   | 14286/20176 [00:24<00:10, 583.62it/s]
4-echo monoexponential:  71%|███████   | 14346/20176 [00:24<00:09, 586.66it/s]
4-echo monoexponential:  71%|███████▏  | 14410/20176 [00:24<00:09, 599.53it/s]
4-echo monoexponential:  72%|███████▏  | 14475/20176 [00:24<00:09, 614.08it/s]
4-echo monoexponential:  72%|███████▏  | 14538/20176 [00:24<00:09, 618.18it/s]
4-echo monoexponential:  72%|███████▏  | 14601/20176 [00:24<00:08, 621.40it/s]
4-echo monoexponential:  73%|███████▎  | 14664/20176 [00:24<00:09, 611.84it/s]
4-echo monoexponential:  73%|███████▎  | 14726/20176 [00:24<00:09, 602.88it/s]
4-echo monoexponential:  73%|███████▎  | 14787/20176 [00:24<00:08, 604.63it/s]
4-echo monoexponential:  74%|███████▎  | 14848/20176 [00:25<00:09, 588.30it/s]
4-echo monoexponential:  74%|███████▍  | 14907/20176 [00:25<00:09, 573.94it/s]
4-echo monoexponential:  74%|███████▍  | 14965/20176 [00:25<00:09, 571.47it/s]
4-echo monoexponential:  74%|███████▍  | 15026/20176 [00:25<00:08, 579.49it/s]
4-echo monoexponential:  75%|███████▍  | 15085/20176 [00:25<00:08, 581.83it/s]
4-echo monoexponential:  75%|███████▌  | 15147/20176 [00:25<00:08, 592.91it/s]
4-echo monoexponential:  75%|███████▌  | 15207/20176 [00:25<00:08, 590.64it/s]
4-echo monoexponential:  76%|███████▌  | 15268/20176 [00:25<00:08, 596.18it/s]
4-echo monoexponential:  76%|███████▌  | 15330/20176 [00:25<00:08, 601.73it/s]
4-echo monoexponential:  76%|███████▋  | 15391/20176 [00:26<00:07, 600.61it/s]
4-echo monoexponential:  77%|███████▋  | 15452/20176 [00:26<00:07, 602.56it/s]
4-echo monoexponential:  77%|███████▋  | 15513/20176 [00:26<00:07, 594.30it/s]
4-echo monoexponential:  77%|███████▋  | 15573/20176 [00:26<00:07, 583.52it/s]
4-echo monoexponential:  77%|███████▋  | 15632/20176 [00:26<00:07, 573.23it/s]
4-echo monoexponential:  78%|███████▊  | 15691/20176 [00:26<00:07, 577.49it/s]
4-echo monoexponential:  78%|███████▊  | 15753/20176 [00:26<00:07, 585.71it/s]
4-echo monoexponential:  78%|███████▊  | 15812/20176 [00:26<00:07, 576.39it/s]
4-echo monoexponential:  79%|███████▊  | 15870/20176 [00:26<00:07, 576.28it/s]
4-echo monoexponential:  79%|███████▉  | 15932/20176 [00:26<00:07, 586.45it/s]
4-echo monoexponential:  79%|███████▉  | 15994/20176 [00:27<00:07, 596.29it/s]
4-echo monoexponential:  80%|███████▉  | 16057/20176 [00:27<00:06, 604.42it/s]
4-echo monoexponential:  80%|███████▉  | 16118/20176 [00:27<00:06, 602.66it/s]
4-echo monoexponential:  80%|████████  | 16179/20176 [00:27<00:06, 594.23it/s]
4-echo monoexponential:  80%|████████  | 16239/20176 [00:27<00:06, 594.73it/s]
4-echo monoexponential:  81%|████████  | 16299/20176 [00:27<00:06, 580.81it/s]
4-echo monoexponential:  81%|████████  | 16358/20176 [00:27<00:06, 569.10it/s]
4-echo monoexponential:  81%|████████▏ | 16417/20176 [00:27<00:06, 573.98it/s]
4-echo monoexponential:  82%|████████▏ | 16475/20176 [00:27<00:06, 563.78it/s]
4-echo monoexponential:  82%|████████▏ | 16533/20176 [00:27<00:06, 567.49it/s]
4-echo monoexponential:  82%|████████▏ | 16594/20176 [00:28<00:06, 577.86it/s]
4-echo monoexponential:  83%|████████▎ | 16652/20176 [00:28<00:06, 576.68it/s]
4-echo monoexponential:  83%|████████▎ | 16715/20176 [00:28<00:05, 590.79it/s]
4-echo monoexponential:  83%|████████▎ | 16777/20176 [00:28<00:05, 596.79it/s]
4-echo monoexponential:  83%|████████▎ | 16837/20176 [00:28<00:05, 591.40it/s]
4-echo monoexponential:  84%|████████▎ | 16897/20176 [00:28<00:05, 588.03it/s]
4-echo monoexponential:  84%|████████▍ | 16957/20176 [00:28<00:05, 589.51it/s]
4-echo monoexponential:  84%|████████▍ | 17016/20176 [00:28<00:05, 552.51it/s]
4-echo monoexponential:  85%|████████▍ | 17074/20176 [00:28<00:05, 559.70it/s]
4-echo monoexponential:  85%|████████▍ | 17134/20176 [00:29<00:05, 569.65it/s]
4-echo monoexponential:  85%|████████▌ | 17192/20176 [00:29<00:05, 557.92it/s]
4-echo monoexponential:  85%|████████▌ | 17250/20176 [00:29<00:05, 562.48it/s]
4-echo monoexponential:  86%|████████▌ | 17307/20176 [00:29<00:05, 563.22it/s]
4-echo monoexponential:  86%|████████▌ | 17368/20176 [00:29<00:04, 575.61it/s]
4-echo monoexponential:  86%|████████▋ | 17430/20176 [00:29<00:04, 587.32it/s]
4-echo monoexponential:  87%|████████▋ | 17490/20176 [00:29<00:04, 588.38it/s]
4-echo monoexponential:  87%|████████▋ | 17549/20176 [00:29<00:04, 587.66it/s]
4-echo monoexponential:  87%|████████▋ | 17608/20176 [00:29<00:04, 585.75it/s]
4-echo monoexponential:  88%|████████▊ | 17667/20176 [00:29<00:04, 561.76it/s]
4-echo monoexponential:  88%|████████▊ | 17724/20176 [00:30<00:04, 553.49it/s]
4-echo monoexponential:  88%|████████▊ | 17780/20176 [00:30<00:04, 537.55it/s]
4-echo monoexponential:  88%|████████▊ | 17840/20176 [00:30<00:04, 553.87it/s]
4-echo monoexponential:  89%|████████▊ | 17899/20176 [00:30<00:04, 561.49it/s]
4-echo monoexponential:  89%|████████▉ | 17962/20176 [00:30<00:03, 580.75it/s]
4-echo monoexponential:  89%|████████▉ | 18026/20176 [00:30<00:03, 595.81it/s]
4-echo monoexponential:  90%|████████▉ | 18087/20176 [00:30<00:03, 597.04it/s]
4-echo monoexponential:  90%|████████▉ | 18147/20176 [00:30<00:03, 592.87it/s]
4-echo monoexponential:  90%|█████████ | 18207/20176 [00:30<00:03, 582.69it/s]
4-echo monoexponential:  91%|█████████ | 18266/20176 [00:30<00:03, 562.56it/s]
4-echo monoexponential:  91%|█████████ | 18324/20176 [00:31<00:03, 564.72it/s]
4-echo monoexponential:  91%|█████████ | 18381/20176 [00:31<00:03, 555.70it/s]
4-echo monoexponential:  91%|█████████▏| 18438/20176 [00:31<00:03, 558.46it/s]
4-echo monoexponential:  92%|█████████▏| 18494/20176 [00:31<00:03, 516.65it/s]
4-echo monoexponential:  92%|█████████▏| 18554/20176 [00:31<00:03, 538.89it/s]
4-echo monoexponential:  92%|█████████▏| 18617/20176 [00:31<00:02, 562.48it/s]
4-echo monoexponential:  93%|█████████▎| 18675/20176 [00:31<00:02, 567.27it/s]
4-echo monoexponential:  93%|█████████▎| 18733/20176 [00:31<00:02, 562.47it/s]
4-echo monoexponential:  93%|█████████▎| 18790/20176 [00:31<00:02, 557.53it/s]
4-echo monoexponential:  93%|█████████▎| 18850/20176 [00:32<00:02, 567.55it/s]
4-echo monoexponential:  94%|█████████▎| 18907/20176 [00:32<00:02, 565.16it/s]
4-echo monoexponential:  94%|█████████▍| 18968/20176 [00:32<00:02, 577.67it/s]
4-echo monoexponential:  94%|█████████▍| 19030/20176 [00:32<00:01, 589.88it/s]
4-echo monoexponential:  95%|█████████▍| 19095/20176 [00:32<00:01, 604.16it/s]
4-echo monoexponential:  95%|█████████▍| 19156/20176 [00:32<00:01, 594.51it/s]
4-echo monoexponential:  95%|█████████▌| 19216/20176 [00:32<00:01, 573.92it/s]
4-echo monoexponential:  96%|█████████▌| 19274/20176 [00:32<00:01, 566.58it/s]
4-echo monoexponential:  96%|█████████▌| 19331/20176 [00:32<00:01, 562.75it/s]
4-echo monoexponential:  96%|█████████▌| 19388/20176 [00:32<00:01, 558.25it/s]
4-echo monoexponential:  96%|█████████▋| 19446/20176 [00:33<00:01, 564.12it/s]
4-echo monoexponential:  97%|█████████▋| 19508/20176 [00:33<00:01, 579.23it/s]
4-echo monoexponential:  97%|█████████▋| 19566/20176 [00:33<00:01, 568.55it/s]
4-echo monoexponential:  97%|█████████▋| 19625/20176 [00:33<00:00, 573.22it/s]
4-echo monoexponential:  98%|█████████▊| 19684/20176 [00:33<00:00, 577.30it/s]
4-echo monoexponential:  98%|█████████▊| 19749/20176 [00:33<00:00, 596.90it/s]
4-echo monoexponential:  98%|█████████▊| 19811/20176 [00:33<00:00, 600.55it/s]
4-echo monoexponential:  98%|█████████▊| 19872/20176 [00:33<00:00, 580.69it/s]
4-echo monoexponential:  99%|█████████▉| 19931/20176 [00:33<00:00, 575.20it/s]
4-echo monoexponential:  99%|█████████▉| 19989/20176 [00:34<00:00, 572.91it/s]
4-echo monoexponential:  99%|█████████▉| 20047/20176 [00:34<00:00, 570.83it/s]
4-echo monoexponential: 100%|█████████▉| 20105/20176 [00:34<00:00, 565.19it/s]
4-echo monoexponential: 100%|█████████▉| 20162/20176 [00:34<00:00, 562.82it/s]
4-echo monoexponential: 100%|██████████| 20176/20176 [00:34<00:00, 587.29it/s]

/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/tedana/decay.py:541: RuntimeWarning: Mean of empty slice
  rmse_map = np.nanmean(rmse, axis=1)
INFO     combine:make_optcom:192 Optimally combining data with voxel-wise T2* estimates
INFO     tedana:tedana_workflow:758 Writing optimally combined data set: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_desc-optcom_bold.nii.gz
INFO     pca:tedpca:203 Computing PCA of optimally combined multi-echo data with selection criteria: mdl
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/tedana/io.py:833: UserWarning: Data array used to create a new image contains 64-bit ints. This is likely due to creating the array with numpy and passing `int` as the `dtype`. Many tools such as FSL and SPM cannot deal with int64 in Nifti images, so for compatibility the data has been converted to int32.
  nii = new_img_like(ref_img, newdata, affine=affine, copy_header=copy_header)
INFO     pca:tedpca:243 Optimal number of components based on different criteria:
INFO     pca:tedpca:244 AIC: 77 | KIC: 67 | MDL: 43 | 90% varexp: 141 | 95% varexp: 186
INFO     pca:tedpca:249 Explained variance based on different criteria:
INFO     pca:tedpca:250 AIC: 0.816% | KIC: 0.801% | MDL: 0.757% | 90% varexp: 0.9% | 95% varexp: 0.95%
INFO     pca:tedpca:267 Plotting maPCA optimization curves
INFO     collect:generate_metrics:150 Calculating weight maps
INFO     collect:generate_metrics:162 Calculating parameter estimate maps for optimally combined data
INFO     collect:generate_metrics:182 Calculating z-statistic maps
INFO     collect:generate_metrics:192 Calculating F-statistic maps
INFO     collect:generate_metrics:216 Thresholding z-statistic maps
INFO     collect:generate_metrics:226 Calculating T2* F-statistic maps
INFO     collect:generate_metrics:236 Calculating S0 F-statistic maps
INFO     collect:generate_metrics:247 Counting significant voxels in T2* F-statistic maps
INFO     collect:generate_metrics:253 Counting significant voxels in S0 F-statistic maps
INFO     collect:generate_metrics:260 Thresholding optimal combination beta maps to match T2* F-statistic maps
INFO     collect:generate_metrics:269 Thresholding optimal combination beta maps to match S0 F-statistic maps
INFO     collect:generate_metrics:279 Calculating kappa and rho
INFO     collect:generate_metrics:288 Calculating variance explained
INFO     collect:generate_metrics:294 Calculating normalized variance explained
INFO     collect:generate_metrics:301 Calculating DSI between thresholded T2* F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:311 Calculating DSI between thresholded S0 F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:322 Calculating signal-noise t-statistics
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/tedana/metrics/dependence.py:573: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
  (signal_minus_noise_t[i_comp], signal_minus_noise_p[i_comp]) = stats.ttest_ind(
INFO     collect:generate_metrics:356 Counting significant noise voxels from z-statistic maps
INFO     collect:generate_metrics:368 Calculating decision table score
INFO     pca:tedpca:399 Selected 43 components with 75.69% normalized variance explained using mdl dimensionality estimate
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/tedana/io.py:354: FutureWarning: Downcasting behavior in `replace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`
  deblanked = data.replace("", np.nan)
INFO     ica:f_ica:260 ICA with random seed 42 converged in 62 iterations
INFO     collect:generate_metrics:150 Calculating weight maps
INFO     collect:generate_metrics:162 Calculating parameter estimate maps for optimally combined data
INFO     collect:generate_metrics:182 Calculating z-statistic maps
INFO     collect:generate_metrics:192 Calculating F-statistic maps
INFO     collect:generate_metrics:216 Thresholding z-statistic maps
INFO     collect:generate_metrics:226 Calculating T2* F-statistic maps
INFO     collect:generate_metrics:236 Calculating S0 F-statistic maps
INFO     collect:generate_metrics:247 Counting significant voxels in T2* F-statistic maps
INFO     collect:generate_metrics:253 Counting significant voxels in S0 F-statistic maps
INFO     collect:generate_metrics:260 Thresholding optimal combination beta maps to match T2* F-statistic maps
INFO     collect:generate_metrics:269 Thresholding optimal combination beta maps to match S0 F-statistic maps
INFO     collect:generate_metrics:279 Calculating kappa and rho
INFO     collect:generate_metrics:288 Calculating variance explained
INFO     collect:generate_metrics:294 Calculating normalized variance explained
INFO     collect:generate_metrics:301 Calculating DSI between thresholded T2* F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:311 Calculating DSI between thresholded S0 F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:322 Calculating signal-noise t-statistics
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/tedana/metrics/dependence.py:573: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
  (signal_minus_noise_t[i_comp], signal_minus_noise_p[i_comp]) = stats.ttest_ind(
INFO     collect:generate_metrics:356 Counting significant noise voxels from z-statistic maps
INFO     collect:generate_metrics:368 Calculating decision table score
INFO     tedana:tedana_workflow:815 Selecting components from ICA results
INFO     tedica:automatic_selection:56 Performing ICA component selection with tree: tedana_orig
INFO     selection_nodes:manual_classify:104 Step 0: manual_classify: Set all to unclassified 
INFO     selection_utils:log_decision_tree_step:436 Step 0: manual_classify applied to 43 components. 43 True -> unclassified. 0 False -> nochange.
INFO     selection_nodes:manual_classify:136 Step 0: manual_classify component classification tags are cleared
INFO     selection_utils:log_classification_counts:481 Step 0: Total component classifications: 43 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 1: left_op_right: rejected if rho>kappa, else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 1: left_op_right applied to 43 components. 15 True -> rejected. 28 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 1: Total component classifications: 15 rejected, 28 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 2: left_op_right: rejected if ['countsigFS0>countsigFT2 & countsigFT2>0'], else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 2: left_op_right applied to 43 components. 15 True -> rejected. 28 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 2: Total component classifications: 16 rejected, 27 unclassified
INFO     selection_nodes:calc_median:653 Step 3: calc_median: Median(median_varex)
INFO     selection_utils:log_decision_tree_step:448 Step 3: calc_median calculated: median_varex=0.6369008306484396
INFO     selection_utils:log_classification_counts:481 Step 3: Total component classifications: 16 rejected, 27 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 4: left_op_right: rejected if ['dice_FS0>dice_FT2 & variance explained>0.64'], else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 4: left_op_right applied to 43 components. 4 True -> rejected. 39 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 4: Total component classifications: 16 rejected, 27 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 5: left_op_right: rejected if ['0>signal-noise_t & variance explained>0.64'], else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 5: left_op_right applied to 43 components. 2 True -> rejected. 41 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 5: Total component classifications: 18 rejected, 25 unclassified
INFO     selection_nodes:calc_kappa_elbow:757 Step 6: calc_kappa_elbow: Calc Kappa Elbow
INFO     selection_utils:kappa_elbow_kundu:651 Calculating kappa elbow based on min of all and nonsig components.
INFO     selection_utils:log_decision_tree_step:448 Step 6: calc_kappa_elbow calculated: kappa_elbow_kundu=24.006482976611334, kappa_allcomps_elbow=37.5628903937137, kappa_nonsig_elbow=24.006482976611334, varex_upper_p=0.8089089913339204
INFO     selection_utils:log_classification_counts:481 Step 6: Total component classifications: 18 rejected, 25 unclassified
INFO     selection_nodes:dec_reclassify_high_var_comps:1120 Step 7: reclassify_high_var_comps: Change unclassified to unclass_highvar for the top couple of components with the highest jumps in variance
INFO     selection_utils:log_decision_tree_step:436 Step 7: reclassify_high_var_comps applied to 25 components. 3 True -> unclass_highvar. 22 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 7: Total component classifications: 18 rejected, 3 unclass_highvar, 22 unclassified
INFO     selection_nodes:calc_rho_elbow:882 Step 8: calc_rho_elbow: Calc Rho Elbow
INFO     selection_utils:log_decision_tree_step:448 Step 8: calc_rho_elbow calculated: rho_elbow_kundu=16.593474162927425, rho_allcomps_elbow=24.547042487262495, rho_unclassified_elbow=15.105415515505845, elbow_f05=10.127964486013928
INFO     selection_utils:log_classification_counts:481 Step 8: Total component classifications: 18 rejected, 3 unclass_highvar, 22 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 9: left_op_right: provisionalaccept if kappa>=24.01, else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 9: left_op_right applied to 22 components. 16 True -> provisionalaccept. 6 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 9: Total component classifications: 16 provisionalaccept, 18 rejected, 3 unclass_highvar, 6 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 10: left_op_right: unclassified if rho>16.59, else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 10: left_op_right applied to 16 components. 6 True -> unclassified. 10 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 10: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:dec_classification_doesnt_exist:1009 Step 11: classification_doesnt_exist: Change ['provisionalaccept', 'unclassified', 'unclass_highvar'] to accepted if less than 2 components with provisionalaccept exist
INFO     selection_nodes:dec_classification_doesnt_exist:1011 Step 11: classification_doesnt_exist If nothing is provisionally accepted by this point, then rerun ICA & selection. If max iterations of rerunning done, then accept everything not already rejected
INFO     selection_utils:log_decision_tree_step:436 Step 11: classification_doesnt_exist applied to 25 components. None True -> 0. None False -> 25.
INFO     selection_utils:log_classification_counts:481 Step 11: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:calc_varex_thresh:1308 Step 12: calc_varex_thresh: Calc varex_upper_thresh, 90th percentile threshold
INFO     selection_utils:log_decision_tree_step:448 Step 12: calc_varex_thresh calculated: varex_upper_thresh=1.0599282255701226, upper_perc=90
INFO     selection_utils:log_classification_counts:481 Step 12: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:calc_varex_thresh:1308 Step 13: calc_varex_thresh: Calc varex_lower_thresh, 25th percentile threshold
INFO     selection_utils:log_decision_tree_step:448 Step 13: calc_varex_thresh calculated: varex_lower_thresh=0.40360285414716357, lower_perc=25
INFO     selection_utils:log_classification_counts:481 Step 13: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_utils:get_extend_factor:828 extend_factor=2.0, based on number of fMRI volumes
INFO     selection_utils:log_decision_tree_step:448 Step 14: calc_extend_factor calculated: extend_factor=2.0
INFO     selection_utils:log_classification_counts:481 Step 14: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_utils:log_decision_tree_step:448 Step 15: calc_max_good_meanmetricrank calculated: max_good_meanmetricrank=20.0
INFO     selection_utils:log_classification_counts:481 Step 15: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_utils:log_decision_tree_step:448 Step 16: calc_varex_kappa_ratio calculated: kappa_rate=76.84859750446972
INFO     selection_utils:log_classification_counts:481 Step 16: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 17: left_op_right: rejected if ['d_table_score>20.0 & variance explained>2.0*1.06'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 17: left_op_right If variance and d_table_scores are high, then reject
INFO     selection_utils:comptable_classification_changer:282 Step 17: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:436 Step 17: left_op_right applied to 25 components. 0 True -> rejected. 25 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 17: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 18: left_op_right: accepted if ['d_table_score>20.0 & variance explained<=0.4 & kappa<=24.01'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 18: left_op_right If low variance, accept even if bad kappa & d_table_scores
INFO     selection_utils:log_decision_tree_step:436 Step 18: left_op_right applied to 25 components. 6 True -> accepted. 19 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 18: Total component classifications: 6 accepted, 9 provisionalaccept, 18 rejected, 3 unclass_highvar, 7 unclassified
INFO     selection_nodes:dec_classification_doesnt_exist:1009 Step 19: classification_doesnt_exist: Change ['provisionalaccept', 'unclassified', 'unclass_highvar'] to accepted if ['unclassified', 'unclass_highvar'] doesn't exist
INFO     selection_nodes:dec_classification_doesnt_exist:1011 Step 19: classification_doesnt_exist If nothing left is unclassified, then accept all
INFO     selection_utils:log_decision_tree_step:436 Step 19: classification_doesnt_exist applied to 19 components. None True -> 0. None False -> 19.
INFO     selection_utils:log_classification_counts:481 Step 19: Total component classifications: 6 accepted, 9 provisionalaccept, 18 rejected, 3 unclass_highvar, 7 unclassified
INFO     selection_nodes:calc_revised_meanmetricrank_guesses:1768 Step 20: calc_revised_meanmetricrank_guesses: Calc revised d_table_score & num accepted component guesses
INFO     selection_utils:log_decision_tree_step:448 Step 20: calc_revised_meanmetricrank_guesses calculated: num_acc_guess=13, conservative_guess=6.5, restrict_factor=2
INFO     selection_utils:log_classification_counts:481 Step 20: Total component classifications: 6 accepted, 9 provisionalaccept, 18 rejected, 3 unclass_highvar, 7 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 21: left_op_right: rejected if ['d_table_score_node20>6.5 & varex kappa ratio>2*2.0 & variance explained>2.0*1.06'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 21: left_op_right Reject if a combination of kappa, variance, and other factors are ranked worse than others
INFO     selection_utils:log_decision_tree_step:436 Step 21: left_op_right applied to 19 components. 2 True -> rejected. 17 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 21: Total component classifications: 6 accepted, 9 provisionalaccept, 20 rejected, 1 unclass_highvar, 7 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 22: left_op_right: rejected if ['d_table_score_node20>0.9*13 & variance explained>2.0*0.4'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 22: left_op_right Reject if a combination of variance and ranks of other metrics are worse than others
INFO     selection_utils:log_decision_tree_step:436 Step 22: left_op_right applied to 17 components. 5 True -> rejected. 12 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 22: Total component classifications: 6 accepted, 8 provisionalaccept, 25 rejected, 1 unclass_highvar, 3 unclassified
INFO     selection_nodes:calc_varex_thresh:1308 Step 23: calc_varex_thresh: Calc varex_new_lower_thresh, 25th percentile threshold
INFO     selection_nodes:calc_varex_thresh:1332 Step 23: calc_varex_thresh: num_highest_var_comps (13) > len(comps2use) (12). Setting to equal len(comps2use) since selection should not use more components than exist
INFO     selection_utils:log_decision_tree_step:448 Step 23: calc_varex_thresh calculated: varex_new_lower_thresh=0.5074016845951463, new_lower_perc=25
INFO     selection_utils:log_classification_counts:481 Step 23: Total component classifications: 6 accepted, 8 provisionalaccept, 25 rejected, 1 unclass_highvar, 3 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 24: left_op_right: accepted if ['d_table_score_node20>13 & variance explained>0.51'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 24: left_op_right Accept components with a bad d_table_score, but are at the higher end of the remaining variance so more cautious to not remove
INFO     selection_utils:log_decision_tree_step:436 Step 24: left_op_right applied to 12 components. 1 True -> accepted. 11 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 24: Total component classifications: 7 accepted, 8 provisionalaccept, 25 rejected, 1 unclass_highvar, 2 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 25: left_op_right: accepted if ['kappa<=24.01 & variance explained>0.51'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 25: left_op_right For not already rejected components, accept ones below the kappa elbow, but at the higher end of the remaining variance so more cautious to not remove
INFO     selection_utils:comptable_classification_changer:282 Step 25: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:436 Step 25: left_op_right applied to 11 components. 0 True -> accepted. 11 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 25: Total component classifications: 7 accepted, 8 provisionalaccept, 25 rejected, 1 unclass_highvar, 2 unclassified
INFO     selection_nodes:manual_classify:104 Step 26: manual_classify: Set ['provisionalaccept', 'unclassified', 'unclass_highvar'] to accepted 
INFO     selection_nodes:manual_classify:106 Step 26: manual_classify Anything still provisional (accepted or rejected) or unclassified should be accepted
INFO     selection_utils:log_decision_tree_step:436 Step 26: manual_classify applied to 11 components. 11 True -> accepted. 0 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 26: Total component classifications: 18 accepted, 25 rejected
INFO     tedana:tedana_workflow:823 Selecting components from ICA results
INFO     tedica:automatic_selection:56 Performing ICA component selection with tree: tedana_orig
INFO     selection_nodes:manual_classify:104 Step 0: manual_classify: Set all to unclassified 
INFO     selection_utils:log_decision_tree_step:436 Step 0: manual_classify applied to 43 components. 43 True -> unclassified. 0 False -> nochange.
INFO     selection_nodes:manual_classify:136 Step 0: manual_classify component classification tags are cleared
INFO     selection_utils:log_classification_counts:481 Step 0: Total component classifications: 43 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 1: left_op_right: rejected if rho>kappa, else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 1: left_op_right applied to 43 components. 15 True -> rejected. 28 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 1: Total component classifications: 15 rejected, 28 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 2: left_op_right: rejected if ['countsigFS0>countsigFT2 & countsigFT2>0'], else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 2: left_op_right applied to 43 components. 15 True -> rejected. 28 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 2: Total component classifications: 16 rejected, 27 unclassified
INFO     selection_nodes:calc_median:653 Step 3: calc_median: Median(median_varex)
INFO     selection_utils:log_decision_tree_step:448 Step 3: calc_median calculated: median_varex=0.6369008306484396
INFO     selection_utils:log_classification_counts:481 Step 3: Total component classifications: 16 rejected, 27 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 4: left_op_right: rejected if ['dice_FS0>dice_FT2 & variance explained>0.64'], else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 4: left_op_right applied to 43 components. 4 True -> rejected. 39 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 4: Total component classifications: 16 rejected, 27 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 5: left_op_right: rejected if ['0>signal-noise_t & variance explained>0.64'], else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 5: left_op_right applied to 43 components. 2 True -> rejected. 41 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 5: Total component classifications: 18 rejected, 25 unclassified
INFO     selection_nodes:calc_kappa_elbow:757 Step 6: calc_kappa_elbow: Calc Kappa Elbow
INFO     selection_utils:kappa_elbow_kundu:651 Calculating kappa elbow based on min of all and nonsig components.
INFO     selection_utils:log_decision_tree_step:448 Step 6: calc_kappa_elbow calculated: kappa_elbow_kundu=24.006482976611334, kappa_allcomps_elbow=37.5628903937137, kappa_nonsig_elbow=24.006482976611334, varex_upper_p=0.8089089913339204
INFO     selection_utils:log_classification_counts:481 Step 6: Total component classifications: 18 rejected, 25 unclassified
INFO     selection_nodes:dec_reclassify_high_var_comps:1120 Step 7: reclassify_high_var_comps: Change unclassified to unclass_highvar for the top couple of components with the highest jumps in variance
INFO     selection_utils:log_decision_tree_step:436 Step 7: reclassify_high_var_comps applied to 25 components. 3 True -> unclass_highvar. 22 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 7: Total component classifications: 18 rejected, 3 unclass_highvar, 22 unclassified
INFO     selection_nodes:calc_rho_elbow:882 Step 8: calc_rho_elbow: Calc Rho Elbow
INFO     selection_utils:log_decision_tree_step:448 Step 8: calc_rho_elbow calculated: rho_elbow_kundu=16.593474162927425, rho_allcomps_elbow=24.547042487262495, rho_unclassified_elbow=15.105415515505845, elbow_f05=10.127964486013928
INFO     selection_utils:log_classification_counts:481 Step 8: Total component classifications: 18 rejected, 3 unclass_highvar, 22 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 9: left_op_right: provisionalaccept if kappa>=24.01, else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 9: left_op_right applied to 22 components. 16 True -> provisionalaccept. 6 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 9: Total component classifications: 16 provisionalaccept, 18 rejected, 3 unclass_highvar, 6 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 10: left_op_right: unclassified if rho>16.59, else nochange
INFO     selection_utils:log_decision_tree_step:436 Step 10: left_op_right applied to 16 components. 6 True -> unclassified. 10 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 10: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:dec_classification_doesnt_exist:1009 Step 11: classification_doesnt_exist: Change ['provisionalaccept', 'unclassified', 'unclass_highvar'] to accepted if less than 2 components with provisionalaccept exist
INFO     selection_nodes:dec_classification_doesnt_exist:1011 Step 11: classification_doesnt_exist If nothing is provisionally accepted by this point, then rerun ICA & selection. If max iterations of rerunning done, then accept everything not already rejected
INFO     selection_utils:log_decision_tree_step:436 Step 11: classification_doesnt_exist applied to 25 components. None True -> 0. None False -> 25.
INFO     selection_utils:log_classification_counts:481 Step 11: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:calc_varex_thresh:1308 Step 12: calc_varex_thresh: Calc varex_upper_thresh, 90th percentile threshold
INFO     selection_utils:log_decision_tree_step:448 Step 12: calc_varex_thresh calculated: varex_upper_thresh=1.0599282255701226, upper_perc=90
INFO     selection_utils:log_classification_counts:481 Step 12: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:calc_varex_thresh:1308 Step 13: calc_varex_thresh: Calc varex_lower_thresh, 25th percentile threshold
INFO     selection_utils:log_decision_tree_step:448 Step 13: calc_varex_thresh calculated: varex_lower_thresh=0.40360285414716357, lower_perc=25
INFO     selection_utils:log_classification_counts:481 Step 13: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_utils:get_extend_factor:828 extend_factor=2.0, based on number of fMRI volumes
INFO     selection_utils:log_decision_tree_step:448 Step 14: calc_extend_factor calculated: extend_factor=2.0
INFO     selection_utils:log_classification_counts:481 Step 14: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_utils:log_decision_tree_step:448 Step 15: calc_max_good_meanmetricrank calculated: max_good_meanmetricrank=20.0
INFO     selection_utils:log_classification_counts:481 Step 15: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_utils:log_decision_tree_step:448 Step 16: calc_varex_kappa_ratio calculated: kappa_rate=76.84859750446972
INFO     selection_utils:log_classification_counts:481 Step 16: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 17: left_op_right: rejected if ['d_table_score>20.0 & variance explained>2.0*1.06'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 17: left_op_right If variance and d_table_scores are high, then reject
INFO     selection_utils:comptable_classification_changer:282 Step 17: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:436 Step 17: left_op_right applied to 25 components. 0 True -> rejected. 25 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 17: Total component classifications: 10 provisionalaccept, 18 rejected, 3 unclass_highvar, 12 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 18: left_op_right: accepted if ['d_table_score>20.0 & variance explained<=0.4 & kappa<=24.01'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 18: left_op_right If low variance, accept even if bad kappa & d_table_scores
INFO     selection_utils:log_decision_tree_step:436 Step 18: left_op_right applied to 25 components. 6 True -> accepted. 19 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 18: Total component classifications: 6 accepted, 9 provisionalaccept, 18 rejected, 3 unclass_highvar, 7 unclassified
INFO     selection_nodes:dec_classification_doesnt_exist:1009 Step 19: classification_doesnt_exist: Change ['provisionalaccept', 'unclassified', 'unclass_highvar'] to accepted if ['unclassified', 'unclass_highvar'] doesn't exist
INFO     selection_nodes:dec_classification_doesnt_exist:1011 Step 19: classification_doesnt_exist If nothing left is unclassified, then accept all
INFO     selection_utils:log_decision_tree_step:436 Step 19: classification_doesnt_exist applied to 19 components. None True -> 0. None False -> 19.
INFO     selection_utils:log_classification_counts:481 Step 19: Total component classifications: 6 accepted, 9 provisionalaccept, 18 rejected, 3 unclass_highvar, 7 unclassified
INFO     selection_nodes:calc_revised_meanmetricrank_guesses:1768 Step 20: calc_revised_meanmetricrank_guesses: Calc revised d_table_score & num accepted component guesses
INFO     selection_utils:log_decision_tree_step:448 Step 20: calc_revised_meanmetricrank_guesses calculated: num_acc_guess=13, conservative_guess=6.5, restrict_factor=2
INFO     selection_utils:log_classification_counts:481 Step 20: Total component classifications: 6 accepted, 9 provisionalaccept, 18 rejected, 3 unclass_highvar, 7 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 21: left_op_right: rejected if ['d_table_score_node20>6.5 & varex kappa ratio>2*2.0 & variance explained>2.0*1.06'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 21: left_op_right Reject if a combination of kappa, variance, and other factors are ranked worse than others
INFO     selection_utils:log_decision_tree_step:436 Step 21: left_op_right applied to 19 components. 2 True -> rejected. 17 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 21: Total component classifications: 6 accepted, 9 provisionalaccept, 20 rejected, 1 unclass_highvar, 7 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 22: left_op_right: rejected if ['d_table_score_node20>0.9*13 & variance explained>2.0*0.4'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 22: left_op_right Reject if a combination of variance and ranks of other metrics are worse than others
INFO     selection_utils:log_decision_tree_step:436 Step 22: left_op_right applied to 17 components. 5 True -> rejected. 12 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 22: Total component classifications: 6 accepted, 8 provisionalaccept, 25 rejected, 1 unclass_highvar, 3 unclassified
INFO     selection_nodes:calc_varex_thresh:1308 Step 23: calc_varex_thresh: Calc varex_new_lower_thresh, 25th percentile threshold
INFO     selection_nodes:calc_varex_thresh:1332 Step 23: calc_varex_thresh: num_highest_var_comps (13) > len(comps2use) (12). Setting to equal len(comps2use) since selection should not use more components than exist
INFO     selection_utils:log_decision_tree_step:448 Step 23: calc_varex_thresh calculated: varex_new_lower_thresh=0.5074016845951463, new_lower_perc=25
INFO     selection_utils:log_classification_counts:481 Step 23: Total component classifications: 6 accepted, 8 provisionalaccept, 25 rejected, 1 unclass_highvar, 3 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 24: left_op_right: accepted if ['d_table_score_node20>13 & variance explained>0.51'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 24: left_op_right Accept components with a bad d_table_score, but are at the higher end of the remaining variance so more cautious to not remove
INFO     selection_utils:log_decision_tree_step:436 Step 24: left_op_right applied to 12 components. 1 True -> accepted. 11 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 24: Total component classifications: 7 accepted, 8 provisionalaccept, 25 rejected, 1 unclass_highvar, 2 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 25: left_op_right: accepted if ['kappa<=24.01 & variance explained>0.51'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 25: left_op_right For not already rejected components, accept ones below the kappa elbow, but at the higher end of the remaining variance so more cautious to not remove
INFO     selection_utils:comptable_classification_changer:282 Step 25: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:436 Step 25: left_op_right applied to 11 components. 0 True -> accepted. 11 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 25: Total component classifications: 7 accepted, 8 provisionalaccept, 25 rejected, 1 unclass_highvar, 2 unclassified
INFO     selection_nodes:manual_classify:104 Step 26: manual_classify: Set ['provisionalaccept', 'unclassified', 'unclass_highvar'] to accepted 
INFO     selection_nodes:manual_classify:106 Step 26: manual_classify Anything still provisional (accepted or rejected) or unclassified should be accepted
INFO     selection_utils:log_decision_tree_step:436 Step 26: manual_classify applied to 11 components. 11 True -> accepted. 0 False -> nochange.
INFO     selection_utils:log_classification_counts:481 Step 26: Total component classifications: 18 accepted, 25 rejected
INFO     io:denoise_ts:560 Variance explained by decomposition: 91.66%
INFO     io:write_split_ts:632 Writing high-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_desc-optcomAccepted_bold.nii.gz
INFO     io:write_split_ts:640 Writing low-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_desc-optcomRejected_bold.nii.gz
INFO     io:write_split_ts:647 Writing denoised time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_desc-denoised_bold.nii.gz
INFO     io:writeresults:696 Writing full ICA coefficient feature set: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_desc-ICA_components.nii.gz
INFO     io:writeresults:700 Writing denoised ICA coefficient feature set: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_desc-ICAAccepted_components.nii.gz
INFO     io:writeresults:706 Writing Z-normalized spatial component maps: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_desc-ICAAccepted_stat-z_components.nii.gz
INFO     gscontrol:minimum_image_regression:207 Performing minimum image regression to remove spatially-diffuse noise
WARNING  gscontrol:minimum_image_regression:219 Decision tree does not contain classification tags indicating low variance components (low variance, accept borderline).
INFO     io:writeresults_echoes:746 Writing Kappa-filtered echo #1 timeseries
INFO     io:denoise_ts:560 Variance explained by decomposition: 83.21%
INFO     io:write_split_ts:629 Writing high-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-1_desc-Accepted_bold.nii.gz
INFO     io:write_split_ts:637 Writing low-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-1_desc-Rejected_bold.nii.gz
INFO     io:write_split_ts:647 Writing denoised time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-1_desc-Denoised_bold.nii.gz
INFO     io:writeresults_echoes:746 Writing Kappa-filtered echo #2 timeseries
INFO     io:denoise_ts:560 Variance explained by decomposition: 84.82%
INFO     io:write_split_ts:629 Writing high-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-2_desc-Accepted_bold.nii.gz
INFO     io:write_split_ts:637 Writing low-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-2_desc-Rejected_bold.nii.gz
INFO     io:write_split_ts:647 Writing denoised time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-2_desc-Denoised_bold.nii.gz
INFO     io:writeresults_echoes:746 Writing Kappa-filtered echo #3 timeseries
INFO     io:denoise_ts:560 Variance explained by decomposition: 85.41%
INFO     io:write_split_ts:629 Writing high-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-3_desc-Accepted_bold.nii.gz
INFO     io:write_split_ts:637 Writing low-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-3_desc-Rejected_bold.nii.gz
INFO     io:write_split_ts:647 Writing denoised time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-3_desc-Denoised_bold.nii.gz
INFO     io:writeresults_echoes:746 Writing Kappa-filtered echo #4 timeseries
INFO     io:denoise_ts:560 Variance explained by decomposition: 85.34%
INFO     io:write_split_ts:629 Writing high-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-4_desc-Accepted_bold.nii.gz
INFO     io:write_split_ts:637 Writing low-Kappa time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-4_desc-Rejected_bold.nii.gz
INFO     io:write_split_ts:647 Writing denoised time series: /home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/sub-04570_task-rest_space-scanner_echo-4_desc-Denoised_bold.nii.gz
INFO     tedana:tedana_workflow:1025 Making figures folder with static component maps and timecourse plots.
INFO     io:denoise_ts:560 Variance explained by decomposition: 91.66%
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/tedana/io.py:833: UserWarning: Data array used to create a new image contains 64-bit ints. This is likely due to creating the array with numpy and passing `int` as the `dtype`. Many tools such as FSL and SPM cannot deal with int64 in Nifti images, so for compatibility the data has been converted to int32.
  nii = new_img_like(ref_img, newdata, affine=affine, copy_header=copy_header)
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/tedana/io.py:833: UserWarning: Data array used to create a new image contains 64-bit ints. This is likely due to creating the array with numpy and passing `int` as the `dtype`. Many tools such as FSL and SPM cannot deal with int64 in Nifti images, so for compatibility the data has been converted to int32.
  nii = new_img_like(ref_img, newdata, affine=affine, copy_header=copy_header)
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/tedana/io.py:833: UserWarning: Data array used to create a new image contains 64-bit ints. This is likely due to creating the array with numpy and passing `int` as the `dtype`. Many tools such as FSL and SPM cannot deal with int64 in Nifti images, so for compatibility the data has been converted to int32.
  nii = new_img_like(ref_img, newdata, affine=affine, copy_header=copy_header)
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/nilearn/plotting/img_plotting.py:1317: UserWarning: Non-finite values detected. These values will be replaced with zeros.
  safe_get_data(stat_map_img, ensure_finite=True),
INFO     tedana:tedana_workflow:1058 Generating dynamic report
INFO     tedana:tedana_workflow:1061 Workflow completed

The tedana workflow writes out a number of files.

out_files = sorted(glob(os.path.join(out_dir, "*")))
out_files = [os.path.basename(f) for f in out_files]
print("\n".join(out_files))
figures
sub-04570_task-rest_space-scanner_S0map.nii.gz
sub-04570_task-rest_space-scanner_T2starmap.nii.gz
sub-04570_task-rest_space-scanner_dataset_description.json
sub-04570_task-rest_space-scanner_desc-ICAAcceptedMIRDenoised_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICAAccepted_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICAAccepted_stat-z_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICAAveragingWeights_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICACrossComponent_metrics.json
sub-04570_task-rest_space-scanner_desc-ICAMIRDenoised_mixing.tsv
sub-04570_task-rest_space-scanner_desc-ICAS0_stat-F_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-ICAT2_stat-F_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICA_decision_tree.json
sub-04570_task-rest_space-scanner_desc-ICA_decomposition.json
sub-04570_task-rest_space-scanner_desc-ICA_mixing.tsv
sub-04570_task-rest_space-scanner_desc-ICA_stat-z_components.nii.gz
sub-04570_task-rest_space-scanner_desc-ICA_status_table.tsv
sub-04570_task-rest_space-scanner_desc-PCAAveragingWeights_components.nii.gz
sub-04570_task-rest_space-scanner_desc-PCACrossComponent_metrics.json
sub-04570_task-rest_space-scanner_desc-PCAS0_stat-F_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-PCAT2_stat-F_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-PCA_decomposition.json
sub-04570_task-rest_space-scanner_desc-PCA_metrics.json
sub-04570_task-rest_space-scanner_desc-PCA_metrics.tsv
sub-04570_task-rest_space-scanner_desc-PCA_mixing.tsv
sub-04570_task-rest_space-scanner_desc-PCA_stat-z_components.nii.gz
sub-04570_task-rest_space-scanner_desc-T1likeEffect_min.nii.gz
sub-04570_task-rest_space-scanner_desc-adaptiveGoodSignal_mask.nii.gz
sub-04570_task-rest_space-scanner_desc-confounds_timeseries.tsv
sub-04570_task-rest_space-scanner_desc-denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-limited_S0map.nii.gz
sub-04570_task-rest_space-scanner_desc-limited_T2starmap.nii.gz
sub-04570_task-rest_space-scanner_desc-optcomAcceptedMIRDenoised_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcomAccepted_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcomMIRDenoised_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcomRejected_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcom_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-optcom_whitened_bold.nii.gz
sub-04570_task-rest_space-scanner_desc-rmse_statmap.nii.gz
sub-04570_task-rest_space-scanner_desc-tedana_metrics.json
sub-04570_task-rest_space-scanner_desc-tedana_metrics.tsv
sub-04570_task-rest_space-scanner_desc-tedana_registry.json
sub-04570_task-rest_space-scanner_echo-1_desc-Accepted_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-Denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-ICAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-ICAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-PCAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-PCAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-PCA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-1_desc-Rejected_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-Accepted_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-Denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-ICAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-ICAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-PCAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-PCAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-PCA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-2_desc-Rejected_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-Accepted_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-Denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-ICAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-ICAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-PCAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-PCAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-PCA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-3_desc-Rejected_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-Accepted_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-Denoised_bold.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-ICAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-ICAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-ICA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-PCAS0ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-PCAT2ModelPredictions_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-PCA_components.nii.gz
sub-04570_task-rest_space-scanner_echo-4_desc-Rejected_bold.nii.gz
sub-04570_task-rest_space-scanner_references.bib
sub-04570_task-rest_space-scanner_report.txt
sub-04570_task-rest_space-scanner_tedana_report.html
tedana_2024-11-26T002500.tsv
metrics = pd.read_table(
    os.path.join(out_dir, "sub-04570_task-rest_space-scanner_desc-tedana_metrics.tsv")
)
Hide code cell source
def color_rejected_red(series):
    """Color rejected components red."""
    return [
        "color: red" if series["classification"] == "rejected" else "" for v in series
    ]


metrics.style.apply(color_rejected_red, axis=1)
  Component kappa rho variance explained normalized variance explained countsigFT2 countsigFS0 dice_FT2 dice_FS0 countnoise signal-noise_t signal-noise_p d_table_score optimal sign varex kappa ratio d_table_score_node20 classification classification_tags
0 ICA_00 23.963910 18.845160 0.974387 0.014406 813 766 0.000000 0.000000 1223 -2.264125 0.025652 31.200000 1 3.124711 nan rejected Unlikely BOLD
1 ICA_01 18.386390 15.105416 0.209236 0.002638 322 163 0.243200 0.000000 1228 0.000000 0.000000 31.200000 1 0.874533 nan accepted Low variance
2 ICA_02 53.904796 11.570936 0.365079 0.004694 1849 375 0.621872 0.252033 880 10.298052 0.000000 7.600000 -1 0.520470 6.600000 accepted Likely BOLD
3 ICA_03 22.443964 29.659039 0.394177 0.005023 840 1175 0.336829 0.364685 1183 0.000000 0.000000 25.800000 1 1.349670 nan rejected Unlikely BOLD
4 ICA_04 36.402447 36.417731 1.079447 0.010505 2030 1616 0.447545 0.424479 1136 7.114071 0.000000 14.400000 -1 2.278803 nan rejected Unlikely BOLD
5 ICA_05 14.776330 53.185372 0.539564 0.012173 280 786 0.000000 0.362080 509 -8.452758 0.000000 31.000000 -1 2.806160 nan rejected Unlikely BOLD
6 ICA_06 35.682686 41.152975 1.411969 0.016422 722 729 0.268085 0.332160 1050 6.150607 0.000002 19.000000 -1 3.040910 nan rejected Unlikely BOLD
7 ICA_07 102.876143 10.929019 0.754819 0.009029 3277 362 0.669988 0.166436 613 6.615788 0.000000 2.800000 -1 0.563851 2.400000 accepted Likely BOLD
8 ICA_08 14.768110 20.934533 0.273712 0.003667 226 300 0.059908 0.384615 997 -6.963965 0.000000 34.200000 -1 1.424309 nan rejected Unlikely BOLD
9 ICA_09 21.605372 17.761140 0.307787 0.004137 388 282 0.000000 0.000000 1225 0.000000 0.000000 32.000000 1 1.094775 nan accepted Low variance
10 ICA_10 49.297713 30.183255 0.940788 0.012705 3215 1499 0.515872 0.268544 1121 -1.525198 0.131335 16.400000 1 1.466563 nan rejected Unlikely BOLD
11 ICA_11 22.601135 36.298328 0.453209 0.004387 470 538 0.341151 0.458527 1089 1.325181 0.197289 23.400000 -1 1.541007 nan rejected Unlikely BOLD
12 ICA_12 23.968036 20.341244 0.472085 0.004739 570 377 0.255958 0.176471 1148 -3.632142 0.000857 29.000000 -1 1.513643 17.000000 accepted Likely BOLD
13 ICA_13 24.006483 14.921336 0.218386 0.003102 1128 630 0.319091 0.296675 1231 0.000000 0.000000 26.000000 -1 0.699088 nan accepted Low variance
14 ICA_14 52.863978 11.030685 0.808909 0.009880 2942 188 0.563806 0.000000 929 12.391319 0.000000 7.600000 -1 1.175915 6.600000 accepted Likely BOLD
15 ICA_15 28.881649 23.392165 1.202041 0.011165 1297 433 0.313320 0.163170 1233 0.000000 0.000000 25.200000 1 3.198404 15.200000 rejected Less likely BOLD
16 ICA_16 25.912802 31.719562 0.420603 0.004614 392 463 0.304124 0.282916 1099 0.000000 0.000000 26.400000 1 1.247365 nan rejected Unlikely BOLD
17 ICA_17 16.999247 19.297453 0.278863 0.003151 420 655 0.203593 0.222566 1230 0.000000 0.000000 31.800000 -1 1.260659 nan rejected Unlikely BOLD
18 ICA_18 66.799022 11.946827 0.683821 0.006818 2054 421 0.645953 0.255696 689 14.985958 0.000000 4.400000 -1 0.786699 3.800000 accepted Likely BOLD
19 ICA_19 37.562890 40.905321 1.464678 0.015207 547 710 0.389199 0.400868 1001 3.334854 0.002702 17.000000 1 2.996533 nan rejected Unlikely BOLD
20 ICA_20 15.305864 21.290880 0.407149 0.006202 45 192 0.000000 0.317708 831 -2.145011 0.032462 33.200000 -1 2.044238 nan rejected Unlikely BOLD
21 ICA_21 84.952283 11.250273 1.244685 0.008481 2580 288 0.658527 0.117647 628 10.338983 0.000000 3.400000 1 1.125953 3.000000 accepted Likely BOLD
22 ICA_22 47.428357 22.884456 18.118683 0.147507 5043 2404 0.457943 0.179092 1041 0.000000 0.000000 13.600000 -1 29.357867 9.400000 rejected Less likely BOLD
23 ICA_23 12.120251 29.573528 0.326093 0.004685 94 214 0.000000 0.503529 650 -8.669511 0.000000 33.600000 1 2.067595 nan rejected Unlikely BOLD
24 ICA_24 34.286932 24.547042 0.972365 0.010708 1262 419 0.400000 0.000000 1251 0.000000 0.000000 22.800000 1 2.179397 13.800000 rejected Less likely BOLD
25 ICA_25 16.953422 16.732650 0.211095 0.002731 260 459 0.000000 0.317181 1270 0.000000 0.000000 36.400000 1 0.956880 nan rejected Unlikely BOLD
26 ICA_26 20.361392 14.432911 0.176224 0.002748 500 235 0.377510 0.186147 1203 3.117638 0.002406 24.200000 1 0.665110 nan accepted Low variance
27 ICA_27 33.321036 32.060287 0.865706 0.010818 492 365 0.357895 0.000000 1084 0.000000 0.000000 22.800000 1 1.996586 14.600000 rejected Less likely BOLD
28 ICA_28 30.108351 12.927686 1.039400 0.007045 1158 121 0.388220 0.000000 1155 0.000000 0.000000 22.200000 1 2.652965 14.400000 rejected Less likely BOLD
29 ICA_29 80.883760 12.626881 0.636901 0.010566 2945 465 0.581311 0.026287 601 8.423694 0.000000 4.000000 -1 0.605127 3.600000 accepted Likely BOLD
30 ICA_30 43.827473 11.578461 0.519174 0.005640 1534 313 0.566335 0.130081 819 14.342942 0.000000 9.000000 1 0.910338 8.000000 accepted Likely BOLD
31 ICA_31 29.139108 23.873300 0.759698 0.011004 1720 1160 0.207729 0.188510 1255 0.000000 0.000000 26.600000 -1 2.003553 15.400000 accepted Accept borderline
32 ICA_32 14.755411 17.029743 0.269894 0.003557 401 440 0.000000 0.000000 1239 0.000000 0.000000 35.000000 1 1.405653 nan rejected Unlikely BOLD
33 ICA_33 44.086324 18.077004 1.513722 0.009673 2119 408 0.523480 0.037783 777 1.150975 0.250259 10.600000 -1 2.638628 8.400000 accepted Likely BOLD
34 ICA_34 56.429382 10.814910 0.247334 0.004278 1781 95 0.617319 0.000000 666 11.382307 0.000000 6.000000 1 0.336833 5.200000 accepted Likely BOLD
35 ICA_35 17.790500 12.597793 0.232961 0.003241 285 51 0.352113 0.000000 1242 -5.030514 0.000018 33.600000 -1 1.006310 nan accepted Low variance
36 ICA_36 32.499106 34.934669 0.689722 0.007488 1095 1807 0.434334 0.462183 1082 0.153060 0.878607 18.200000 1 1.630942 nan rejected Unlikely BOLD
37 ICA_37 70.548540 17.969418 29.229082 0.233936 5731 1645 0.566419 0.110131 709 0.000000 0.000000 8.600000 -1 31.839269 5.800000 accepted Likely BOLD
38 ICA_38 21.288556 23.449890 1.429819 0.018098 1218 1285 0.240820 0.334156 1131 2.114198 0.037227 23.600000 -1 5.161439 nan rejected Unlikely BOLD
39 ICA_39 32.808892 32.459510 1.024512 0.010649 683 544 0.362297 0.336725 1065 0.000000 0.000000 21.600000 1 2.399724 14.000000 rejected Less likely BOLD
40 ICA_40 16.606237 18.724607 0.389232 0.005196 270 307 0.172084 0.164204 920 -10.839641 0.000000 32.800000 1 1.801246 nan rejected Unlikely BOLD
41 ICA_41 48.017993 36.938387 26.082638 0.311829 6059 5930 0.515417 0.356028 719 0.000000 0.000000 10.800000 1 41.742980 7.600000 rejected Less likely BOLD
42 ICA_42 17.346959 15.014701 0.360350 0.005460 268 68 0.434263 0.135338 956 5.441800 0.000000 22.600000 -1 1.596382 nan accepted Low variance
with open(
    os.path.join(out_dir, "sub-04570_task-rest_space-scanner_desc-tedana_metrics.json"),
    "r",
) as fo:
    data = json.load(fo)

first_five_keys = list(data.keys())[:5]
reduced_data = {k: data[k] for k in first_five_keys}
pprint(reduced_data)
{'Component': {'Description': 'The unique identifier of each component. This '
                              'identifier matches column names in the mixing '
                              'matrix TSV file.',
               'LongName': 'Component identifier'},
 'classification_tags': {'Description': 'A single tag or a comma separated '
                                        'list of tags to describe why a '
                                        'component received its classification',
                         'LongName': 'Component classification tags'},
 'countnoise': {'Description': "Number of 'noise' voxels (voxels highly "
                               'weighted for component, but not from clusters) '
                               'from each component.',
                'LongName': 'Noise voxel count',
                'Units': 'voxel'},
 'countsigFS0': {'Description': 'Number of significant voxels from the '
                                'cluster-extent thresholded S0 model '
                                'F-statistic map for each component.',
                 'LongName': 'S0 model F-statistic map significant voxel count',
                 'Units': 'voxel'},
 'countsigFT2': {'Description': 'Number of significant voxels from the '
                                'cluster-extent thresholded T2 model '
                                'F-statistic map for each component.',
                 'LongName': 'T2 model F-statistic map significant voxel count',
                 'Units': 'voxel'}}
df = pd.DataFrame.from_dict(data, orient="index")
df = df.fillna("n/a")
display(HTML(df.to_html()))
Description LongName Units Levels
Component The unique identifier of each component. This identifier matches column names in the mixing matrix TSV file. Component identifier n/a n/a
classification_tags A single tag or a comma separated list of tags to describe why a component received its classification Component classification tags n/a n/a
countnoise Number of 'noise' voxels (voxels highly weighted for component, but not from clusters) from each component. Noise voxel count voxel n/a
countsigFS0 Number of significant voxels from the cluster-extent thresholded S0 model F-statistic map for each component. S0 model F-statistic map significant voxel count voxel n/a
countsigFT2 Number of significant voxels from the cluster-extent thresholded T2 model F-statistic map for each component. T2 model F-statistic map significant voxel count voxel n/a
d_table_score Summary score compiled from five metrics, with smaller values (i.e., higher ranks) indicating more BOLD dependence and less noise. Decision table score arbitrary n/a
dice_FS0 Dice value of cluster-extent thresholded maps of S0-model betas and F-statistics. S0 model beta map-F-statistic map Dice similarity index arbitrary n/a
dice_FT2 Dice value of cluster-extent thresholded maps of T2-model betas and F-statistics. T2 model beta map-F-statistic map Dice similarity index arbitrary n/a
kappa A pseudo-F-statistic indicating TE-dependence of the component. This metric is calculated by computing fit to the TE-dependence model at each voxel, and then performing a weighted average based on the voxel-wise weights of the component. Kappa arbitrary n/a
normalized variance explained Normalized variance explained in the optimally combined data of each component.On a scale from 0 to 1. Normalized variance explained arbitrary n/a
optimal sign Optimal sign determined based on skew direction of component parameter estimates across the brain. In cases where components were left-skewed (-1), the component time series is flipped prior to metric calculation. Optimal component sign n/a {'-1': 'Component is flipped prior to metric calculation.', '1': 'Component is not flipped prior to metric calculation.'}
rho A pseudo-F-statistic indicating TE-independence of the component. This metric is calculated by computing fit to the TE-independence model at each voxel, and then performing a weighted average based on the voxel-wise weights of the component. Rho arbitrary n/a
signal-noise_p P-value for two-sample t-test of F-statistics from 'signal' voxels (voxels in clusters) against 'noise' voxels (voxels not in clusters) for T2 model. Signal > noise p-value arbitrary n/a
signal-noise_t T-statistic for two-sample t-test of F-statistics from 'signal' voxels (voxels in clusters) against 'noise' voxels (voxels not in clusters) for T2 model. Signal > noise t-statistic arbitrary n/a
variance explained Variance explained in the optimally combined data of each component. On a scale from 0 to 100. Variance explained arbitrary n/a
report = os.path.join(out_dir, "tedana_report.html")
with open(report, "r") as fo:
    report_data = fo.read()

figures_dir = os.path.relpath(os.path.join(out_dir, "figures"), os.getcwd())
report_data = report_data.replace("./figures", figures_dir)

display(HTML(report_data))
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[9], line 2
      1 report = os.path.join(out_dir, "tedana_report.html")
----> 2 with open(report, "r") as fo:
      3     report_data = fo.read()
      5 figures_dir = os.path.relpath(os.path.join(out_dir, "figures"), os.getcwd())

File /opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/IPython/core/interactiveshell.py:324, in _modified_open(file, *args, **kwargs)
    317 if file in {0, 1, 2}:
    318     raise ValueError(
    319         f"IPython won't let you open fd={file} by default "
    320         "as it is likely to crash IPython. If you know what you are doing, "
    321         "you can use builtins' open."
    322     )
--> 324 return io_open(file, *args, **kwargs)

FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/multi-echo-data-analysis/multi-echo-data-analysis/data/multi-echo-data-analysis/tedana/tedana_report.html'