https://doi.org/10.5072/zenodo.303067

tedana: TE Dependent ANAlysis#

Process five-echo flashing checkerboard dataset for software demo#

Author: Daniel Handwerker & Monika Doerig

Citation:#

Tools included in this workflow#

  • tedana: The tedana Community, Ahmed, Z., Bandettini, P. A., Bottenhorn, K. L., Caballero-Gaudes, C., Dowdle, L. T., DuPre, E., Gonzalez-Castillo, J., Handwerker, D., Heunis, S., Kundu, P., Laird, A. R., Markello, R., Markiewicz, C. J., Maullin-Sapey, T., Moia, S., Molfese, P., Salo, T., Staden, I., … Whitaker, K. (2025). ME-ICA/tedana: 25.0.1 (25.0.1). Zenodo. https://doi.org/10.5281/zenodo.15610868

Publications#

Educational resources#

Dataset#

  • DuPre, E., Salo, T., Whitaker, K. J., Teves, J., Dowdle, L., Reynolds, R. C., & Handwerker, D. A. (2024, February 21). tedana data. Retrieved from osf.io/bpe8h

%%capture
! pip install tedana==25.0.1
import module
await module.load('afni/24.3.00')
await module.list()
['afni/24.3.00']
%matplotlib inline
import os
import os.path as op
from glob import glob
import webbrowser

from tedana.workflows import tedana_workflow

Download 5 echo data#

%%time
dset_dir5 = 'five-echo-dataset/'
wd = os.getcwd()

if not op.isdir(dset_dir5):
    os.mkdir(dset_dir5)

!curl -L -o five_echo_NIH.tar.xz https://osf.io/ea5v3/download
!tar xf five_echo_NIH.tar.xz -C five-echo-dataset
os.remove('five_echo_NIH.tar.xz')
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   439  100   439    0     0    997      0 --:--:-- --:--:-- --:--:--  1000
100 68.5M  100 68.5M    0     0  13.1M      0  0:00:05  0:00:05 --:--:-- 16.5M
CPU times: user 159 ms, sys: 560 ms, total: 719 ms
Wall time: 8.61 s
# Clone GitHub repo and copy files
!git clone https://github.com/ME-ICA/ohbm-2025-multiecho.git temp_repo
!cp -r temp_repo/five-echo-dataset/* five-echo-dataset/
!rm -rf temp_repo
Cloning into 'temp_repo'...
remote: Enumerating objects: 150, done.
remote: Counting objects: 100% (150/150), done.
remote: Compressing objects: 100% (120/120), done.
remote: Total 150 (delta 40), reused 137 (delta 30), pack-reused 0 (from 0)
Receiving objects: 100% (150/150), 16.37 MiB | 40.88 MiB/s, done.
Resolving deltas: 100% (40/40), done.

Run workflow on 5 echo data#

%%time
dset_dir5_out = f"{dset_dir5}tedana_processed"
files = sorted(glob(op.join(dset_dir5, 'p06*.nii.gz')))
tes = [15.4, 29.7, 44.0, 58.3, 72.6]
tedana_workflow(files, tes, 
    tree="minimal",
    fixed_seed=42,
    ica_method="robustica",
    n_robust_runs=30,
    tedpca=53,
    out_dir=dset_dir5_out,
    tedort=False
    )
Setting clustering defaults: {'min_samples': 15}
Running FastICA multiple times...
Inferring sign of components...
Clustering...
Computing centroids...
Computing Silhouettes...
Computing Iq...
CPU times: user 1h 40min 54s, sys: 20.8 s, total: 1h 41min 14s
Wall time: 6min 45s
INFO     tedana:tedana_workflow:608 Using output directory: /home/jovyan/Git_repositories/five-echo-dataset/tedana_processed
INFO     tedana:tedana_workflow:627 Initializing and validating component selection tree
WARNING  component_selector:validate_tree:146 Decision tree includes fields that are not used or logged ['_comment']
INFO     component_selector:__init__:333 Performing component selection with minimal_decision_tree
INFO     component_selector:__init__:334 first version of minimal decision tree
INFO     tedana:tedana_workflow:630 Loading input data: ['five-echo-dataset/p06.SBJ01_S09_Task11_e1.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e2.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e3.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e4.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e5.sm.nii.gz']
INFO     io:__init__:156 Generating figures directory: /home/jovyan/Git_repositories/five-echo-dataset/tedana_processed/figures
WARNING  tedana:tedana_workflow:735 Computing EPI mask from first echo using nilearn's compute_epi_mask function. Most external pipelines include more reliable masking functions. It is strongly recommended to provide an external mask, and to visually confirm that mask accurately conforms to data boundaries.
INFO     utils:make_adaptive_mask:202 Echo-wise intensity thresholds for adaptive mask: [5853.6399821  4862.62750244 4073.26911418 3377.14188232 2800.73880819]
WARNING  utils:make_adaptive_mask:231 4 voxels in user-defined mask do not have good signal. Removing voxels from mask.
INFO     tedana:tedana_workflow:774 Computing T2* map
/home/jovyan/conda-environments/tedenv/lib/python3.12/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:822 Writing optimally combined data set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_processed/desc-optcom_bold.nii.gz
INFO     pca:tedpca:208 Computing PCA of optimally combined multi-echo data with selection criteria: 53
INFO     collect:generate_metrics:161 Calculating weight maps
INFO     collect:generate_metrics:173 Calculating parameter estimate maps for optimally combined data
INFO     collect:generate_metrics:193 Calculating z-statistic maps
INFO     collect:generate_metrics:203 Calculating F-statistic maps
INFO     collect:generate_metrics:228 Thresholding z-statistic maps
INFO     collect:generate_metrics:238 Calculating T2* F-statistic maps
INFO     collect:generate_metrics:248 Calculating S0 F-statistic maps
INFO     collect:generate_metrics:259 Counting significant voxels in T2* F-statistic maps
INFO     collect:generate_metrics:265 Counting significant voxels in S0 F-statistic maps
INFO     collect:generate_metrics:272 Thresholding optimal combination beta maps to match T2* F-statistic maps
INFO     collect:generate_metrics:281 Thresholding optimal combination beta maps to match S0 F-statistic maps
INFO     collect:generate_metrics:291 Calculating kappa and rho
INFO     collect:generate_metrics:300 Calculating variance explained
INFO     collect:generate_metrics:306 Calculating normalized variance explained
INFO     collect:generate_metrics:313 Calculating DSI between thresholded T2* F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:323 Calculating DSI between thresholded S0 F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:334 Calculating signal-noise t-statistics
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/scipy/_lib/deprecation.py:234: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
  return f(*args, **kwargs)
INFO     collect:generate_metrics:368 Counting significant noise voxels from z-statistic maps
INFO     collect:generate_metrics:380 Calculating decision table score
INFO     pca:tedpca:412 Selected 53 components with 88.73% normalized variance explained using a fixed number of components and no dimensionality estimate
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/tedana/io.py:355: 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)
100%|██████████| 30/30 [02:47<00:00,  5.59s/it]
INFO     ica:r_ica:204 For RobustICA, FastICA did not converge in 3 of 30 interations.
INFO     ica:r_ica:225 The DBSCAN clustering algorithm was used for clustering components across different runs
INFO     ica:r_ica:243 RobustICA with 30 robust runs and seed 42 was used. 39 components identified. The mean Index Quality is 0.9487300079521724.
INFO     ica:r_ica:251 The DBSCAN clustering algorithm detected outliers when clustering components for different runs. These outliers are excluded when calculating the index quality and the mixing matrix to maximise the robustness of the decomposition.
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/sklearn/manifold/_t_sne.py:1164: FutureWarning: 'n_iter' was renamed to 'max_iter' in version 1.5 and will be removed in 1.7.
  warnings.warn(
INFO     collect:generate_metrics:161 Calculating weight maps
INFO     collect:generate_metrics:173 Calculating parameter estimate maps for optimally combined data
INFO     collect:generate_metrics:193 Calculating z-statistic maps
INFO     collect:generate_metrics:203 Calculating F-statistic maps
INFO     collect:generate_metrics:228 Thresholding z-statistic maps
INFO     collect:generate_metrics:238 Calculating T2* F-statistic maps
INFO     collect:generate_metrics:248 Calculating S0 F-statistic maps
INFO     collect:generate_metrics:259 Counting significant voxels in T2* F-statistic maps
INFO     collect:generate_metrics:265 Counting significant voxels in S0 F-statistic maps
INFO     collect:generate_metrics:272 Thresholding optimal combination beta maps to match T2* F-statistic maps
INFO     collect:generate_metrics:281 Thresholding optimal combination beta maps to match S0 F-statistic maps
INFO     collect:generate_metrics:291 Calculating kappa and rho
INFO     collect:generate_metrics:300 Calculating variance explained
INFO     collect:generate_metrics:306 Calculating normalized variance explained
INFO     collect:generate_metrics:313 Calculating DSI between thresholded T2* F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:323 Calculating DSI between thresholded S0 F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:334 Calculating signal-noise t-statistics
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/scipy/_lib/deprecation.py:234: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
  return f(*args, **kwargs)
INFO     tedana:tedana_workflow:894 Selecting components from ICA results
INFO     tedica:automatic_selection:54 Performing ICA component selection with tree: minimal
INFO     selection_nodes:manual_classify:104 Step 0: manual_classify: Set all to unclassified 
INFO     selection_utils:comptable_classification_changer:293 Step 0: No components fit criterion False to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 0: manual_classify applied to 39 components. 39 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:492 Step 0: Total component classifications: 39 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:447 Step 1: left_op_right applied to 39 components. 5 True -> rejected. 34 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 1: Total component classifications: 5 rejected, 34 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:447 Step 2: left_op_right applied to 39 components. 2 True -> rejected. 37 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 2: Total component classifications: 5 rejected, 34 unclassified
INFO     selection_nodes:calc_median:653 Step 3: calc_median: Median(median_varex)
INFO     selection_utils:log_decision_tree_step:459 Step 3: calc_median calculated: median_varex=0.5929824670449559
INFO     selection_utils:log_classification_counts:492 Step 3: Total component classifications: 5 rejected, 34 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 4: left_op_right: rejected if ['dice_FS0>dice_FT2 & variance explained>0.59'], else nochange
INFO     selection_utils:comptable_classification_changer:293 Step 4: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 4: left_op_right applied to 39 components. 0 True -> rejected. 39 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 4: Total component classifications: 5 rejected, 34 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 5: left_op_right: rejected if ['0>signal-noise_t & variance explained>0.59'], else nochange
INFO     selection_utils:log_decision_tree_step:447 Step 5: left_op_right applied to 39 components. 4 True -> rejected. 35 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 5: Total component classifications: 7 rejected, 32 unclassified
INFO     selection_nodes:calc_kappa_elbow:767 Step 6: calc_kappa_elbow: Calc Kappa Elbow
INFO     selection_utils:kappa_elbow_kundu:668 Calculating kappa elbow based on all components.
INFO     selection_utils:log_decision_tree_step:459 Step 6: calc_kappa_elbow calculated: kappa_elbow_kundu=72.03387706852564, kappa_allcomps_elbow=72.03387706852564, kappa_nonsig_elbow=None, varex_upper_p=0.7019602209370308
INFO     selection_utils:log_classification_counts:492 Step 6: Total component classifications: 7 rejected, 32 unclassified
INFO     selection_nodes:calc_rho_elbow:902 Step 7: calc_rho_elbow: Calc Rho Elbow
INFO     selection_utils:log_decision_tree_step:459 Step 7: calc_rho_elbow calculated: rho_elbow_liberal=20.05618288148957, rho_allcomps_elbow=20.05618288148957, rho_unclassified_elbow=19.718998357049653, elbow_f05=7.708647422176786
INFO     selection_utils:log_classification_counts:492 Step 7: Total component classifications: 7 rejected, 32 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 8: left_op_right: provisionalaccept if kappa>=72.03, else provisionalreject
INFO     selection_utils:log_decision_tree_step:447 Step 8: left_op_right applied to 32 components. 13 True -> provisionalaccept. 19 False -> provisionalreject.
INFO     selection_utils:log_classification_counts:492 Step 8: Total component classifications: 13 provisionalaccept, 19 provisionalreject, 7 rejected
INFO     selection_nodes:dec_left_op_right:389 Step 9: left_op_right: accepted if kappa>2*rho, else nochange
INFO     selection_utils:comptable_classification_changer:293 Step 9: No components fit criterion False to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 9: left_op_right applied to 13 components. 13 True -> accepted. 0 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 9: Total component classifications: 13 accepted, 19 provisionalreject, 7 rejected
INFO     selection_nodes:dec_left_op_right:389 Step 10: left_op_right: provisionalreject if rho>20.06, else nochange
INFO     selection_utils:log_decision_tree_step:447 Step 10: left_op_right applied to 19 components. 3 True -> provisionalreject. 16 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 10: Total component classifications: 13 accepted, 19 provisionalreject, 7 rejected
INFO     selection_nodes:dec_variance_lessthan_thresholds:533 Step 11: variance_lt_thresholds: accepted if variance explained<0.1. All variance<1.0, else nochange
INFO     selection_utils:comptable_classification_changer:293 Step 11: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 11: variance_lt_thresholds applied to 19 components. 0 True -> accepted. 19 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 11: Total component classifications: 13 accepted, 19 provisionalreject, 7 rejected
INFO     selection_nodes:manual_classify:104 Step 12: manual_classify: Set provisionalaccept to accepted 
INFO     selection_utils:log_decision_tree_step:441 Step 12: manual_classify not applied because no remaining components were classified as provisionalaccept
INFO     selection_utils:log_classification_counts:492 Step 12: Total component classifications: 13 accepted, 19 provisionalreject, 7 rejected
INFO     selection_nodes:manual_classify:104 Step 13: manual_classify: Set ['provisionalreject', 'unclassified'] to rejected 
INFO     selection_utils:comptable_classification_changer:293 Step 13: No components fit criterion False to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 13: manual_classify applied to 19 components. 19 True -> rejected. 0 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 13: Total component classifications: 13 accepted, 26 rejected
INFO     io:denoise_ts:613 Variance explained by decomposition: 94.68%
INFO     io:write_split_ts:700 Writing denoised time series: /home/jovyan/Git_repositories/five-echo-dataset/tedana_processed/desc-denoised_bold.nii.gz
INFO     io:writeresults:749 Writing full ICA coefficient feature set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_processed/desc-ICA_components.nii.gz
INFO     io:writeresults:753 Writing denoised ICA coefficient feature set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_processed/desc-ICAAccepted_components.nii.gz
INFO     io:writeresults:759 Writing Z-normalized spatial component maps: /home/jovyan/Git_repositories/five-echo-dataset/tedana_processed/desc-ICAAccepted_stat-z_components.nii.gz
INFO     tedana:tedana_workflow:1116 Making figures folder with static component maps and timecourse plots.
INFO     io:denoise_ts:613 Variance explained by decomposition: 94.68%
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/tedana/io.py:904: 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)
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/tedana/io.py:904: 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)
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/tedana/io.py:904: 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)
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/nilearn/plotting/img_plotting.py:1416: 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:1172 Generating dynamic report
INFO     html_report:_update_template_bokeh:164 Checking for adaptive mask: adaptive_mask.svg, exists: True
INFO     html_report:_update_template_bokeh:204 T2* files exist: True
INFO     html_report:_update_template_bokeh:205 S0 files exist: True
INFO     html_report:_update_template_bokeh:206 RMSE files exist: True
INFO     html_report:_update_template_bokeh:212 External regressors exist: False
INFO     tedana:tedana_workflow:1175 Workflow completed
INFO     utils:log_newsletter_info:705 Don't forget to subscribe to the tedana newsletter for updates! This is a very low volume email list.
INFO     utils:log_newsletter_info:709 https://groups.google.com/g/tedana-newsletter
../_images/0f11b551e8c9208f12891d200e1543f23de84976d4dfffa5acb8c8f3d743cd99.png

Tedana report of 5 echo data#

You can explore an example of an interactive tedana report here.

The tedana report for the current dataset was generated at the following location:

# this is the path of the tedana report
url = str(os.path.abspath(dset_dir5_out + '/tedana_report.html'))
print(url)
/home/jovyan/Git_repositories/five-echo-dataset/tedana_processed/tedana_report.html

To properly view the interactive tedana html report with all figures displayed correctly, right-click the file at the path shown above and select Open in New Browser Tab.

Below, selected components from the generated tedana report are visualized.

Carpet plot#

from IPython.display import Image
from IPython.core.display import SVG

SVG(filename='five-echo-dataset/tedana_processed/figures/carpet_optcom.svg')
../_images/1bd35d559e35b39dbbce59a91c99a162592a72d8709f6aa23db823007e8f1ce3.svg

Adaptive Mask#

SVG(filename='five-echo-dataset/tedana_processed/figures/adaptive_mask.svg')
../_images/8f5e29fddda5789cc8fcabf1bcd45ce32e20c8c49c8d6323c57cf493275ae7be.svg

T2*#

t2star_brain = SVG(filename='five-echo-dataset/tedana_processed/figures/t2star_brain.svg')
t2star_histogram = SVG(filename='five-echo-dataset/tedana_processed/figures/t2star_histogram.svg')

display(t2star_brain, t2star_histogram)
../_images/56663dc00e21515e2ca11765b8e323f7a37aaf33d446da692e70407df5aecaf7.svg ../_images/19e79a087ea4d28325c766b10eb2957e83dc658030dd8504d95ea37d3bf794df.svg

S0#

s0_brain = SVG(filename='five-echo-dataset/tedana_processed/figures/s0_brain.svg')
s0_histogram = SVG(filename='five-echo-dataset/tedana_processed/figures/s0_histogram.svg')

display(s0_brain, s0_histogram)
../_images/5cfe9d5347baa2ddd706f63286077edefbed44a8454da59b405e44c029772f62.svg ../_images/6de2dd04cfd7707e8d8bc8637995839a4980dbda4ecc7026285123c163aa9dba.svg

T2* and S0 model fit (RMSE). (Scaled between 2nd and 98th percentiles)#

rmse_brain = SVG(filename='five-echo-dataset/tedana_processed/figures/rmse_brain.svg')
rmse_timeseries = SVG(filename='five-echo-dataset/tedana_processed/figures/rmse_timeseries.svg')

display(rmse_brain, rmse_timeseries)
../_images/2774691b00a0ba42f8b2254ec66a5af2369949943a076a9fc76d91e409f8fec3.svg ../_images/ebec4c857b7f80dadcbbab0b4fb79beb4cdededcc28a978060c9c30ee1d6af1a.svg

Time series generation using AFNI commands#

%%bash
# A rough CSF mask for demonstration purposes
# Segment the CSF, erode by 1 voxel, #
# and retain voxels containing 75% of the CSF mask when downsampled to EPI space
cd five-echo-dataset

3dSeg -anat SBJ01_Anatomy.nii.gz -mask AUTO \
    -classes 'CSF ; GM ; WM'  \
    -bias_classes 'GM ; WM' \
    -bias_fwhm 25 -mixfrac UNI -main_N 5 \
    -blur_meth BFT
3dcalc -a ./Segsy/Classes+tlrc -expr 'equals(a, 1)' -prefix CSF_anatresolution.nii.gz
3dmask_tool -input CSF_anatresolution.nii.gz \
    -prefix CSF_eroded.nii.gz \
    -dilate_result -1 -fill_holes 
3dfractionize -template p06.SBJ01_S09_Task11_e3.sm.nii.gz \
    -prefix CSF_mask.nii.gz \
    -input CSF_eroded.nii.gz \
    -clip 0.75

# make CSF principal components
3dpc -mask CSF_mask.nii.gz -pcsave 3  \
    -prefix CSF_timeseries \
    ./tedana_processed/desc-optcom_bold.nii.gz

# Combine all external regressors into a single file
external_regress_header="mot_x\tmot_y\tmot_z\tmot_pitch\tmot_roll\tmot_yaw\t"\
"mot_dx\tmot_dy\tmot_dz\tmot_dpitch\tmot_droll\tmot_dyaw\tcsf1\tcsf2\tcsf3\t"\
"signal_checkerboard"

1dcat -tsvout \
    SBJ01_S09_Task11_e2_Motion.demean.1D \
    SBJ01_S09_Task11_e2_Motion.demean.der.1D \
    CSF_timeseries0?.1D \
    block_task_response.1D \
    > tmp.tsv

# Convert spaces to tabs and skip the header line from 1dcat
tail -n +2 tmp.tsv | tr ' ' '\t' > tmp_clean.tsv

# Add header
(echo -e "$external_regress_header"; cat tmp_clean.tsv) > external_regressors.tsv

# Clean up
rm tmp.tsv tmp_clean.tsv
++ Compile date = Oct  1 2024 {AFNI_24.3.00:linux_ubuntu_24_64}
*+ WARNING: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*+ WARNING: ss.cp+tlrc[0] scale to shorts mean misfit error = 38.4% -- **** Red Alert ****
 + a) Numerical precision has been lost when truncating results
       from 32-bit floating point to 16-bit integers (shorts).
 + b) Consider writing datasets out in float format.
       In most AFNI programs, use the '-float' option.
 + c) This warning is a new message, but is an old issue
       that arises when storing results in an integer format.
 + d) Don't panic! These messages likely originate in peripheral
       or unimportant voxels. They mean that you must examine your output.
       "Assess the situation and keep a calm head about you,
        because it doesn't do anybody any good to panic."
++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*+ WARNING: GenPriorsOut.x+tlrc[0] scale to shorts mean misfit error = 40.0% -- ***** Purple Alert! *****
*+ WARNING: GenPriorsOut.x+tlrc[0] scale to shorts mean misfit error = 39.8% -- ***** Purple Alert! *****
*+ WARNING: GenPriorsOut.x+tlrc[0] scale to shorts mean misfit error = 39.3% -- ***** Purple Alert! *****
*+ WARNING: GenPriorsOut.x+tlrc[0] scale to shorts mean misfit error = 38.9% -- **** Red Alert ****
*+ WARNING: GenPriorsOut.x+tlrc[0] scale to shorts mean misfit error = 38.4% -- **** Red Alert ****
++ 3dcalc: AFNI version=AFNI_24.3.00 (Oct  1 2024) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./CSF_anatresolution.nii.gz
++ no -frac option: defaulting to -union
++ processing 1 input dataset(s), NN=2...
++ padding all datasets by 0 (for dilations)
++ have 1 volumes of input to combine
++ frac 0 over 1 volumes gives min count 0
++ voxel limits: 0 clipped, 135363 survived, 11398973 were zero
++ filled 0 holes (0 voxels)
++ writing result CSF_eroded.nii.gz...
++ Output dataset ./CSF_eroded.nii.gz
++ 3dfractionize: AFNI version=AFNI_24.3.00 (Oct  1 2024) [64-bit]
++ Authored by: RW Cox
-- Writing 83 nonzero mask voxels to dataset ./CSF_mask.nii.gz
++ 3dpc: AFNI version=AFNI_24.3.00 (Oct  1 2024) [64-bit]

Run workflow on 5 echo data using existing mixing matrix and external regressors#

%%time
dset_dir5_extern_out = f"{dset_dir5}tedana_external_regress_processed"
files = sorted(glob(op.join(dset_dir5, 'p06*.nii.gz')))
tes = [15.4, 29.7, 44.0, 58.3, 72.6]
tedana_workflow(files, tes, 
    tree="demo_external_regressors_motion_task_models",
    external_regressors=op.join(dset_dir5,"external_regressors.tsv"),
    mixing_file=op.join(dset_dir5,"tedana_processed", "desc-ICA_mixing.tsv"),
    out_dir=dset_dir5_extern_out
    )
(160, 39)
(160, 39)
(160, 39)
(160, 39)
CPU times: user 8min 51s, sys: 6.59 s, total: 8min 58s
Wall time: 3min 40s
INFO     tedana:tedana_workflow:608 Using output directory: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed
INFO     tedana:tedana_workflow:608 Using output directory: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed
INFO     tedana:tedana_workflow:608 Using output directory: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed
INFO     tedana:tedana_workflow:627 Initializing and validating component selection tree
INFO     tedana:tedana_workflow:627 Initializing and validating component selection tree
INFO     tedana:tedana_workflow:627 Initializing and validating component selection tree
INFO     component_selector:__init__:333 Performing component selection with demo_external_regressors_motion_task_models
INFO     component_selector:__init__:333 Performing component selection with demo_external_regressors_motion_task_models
INFO     component_selector:__init__:333 Performing component selection with demo_external_regressors_motion_task_models
INFO     component_selector:__init__:334 Demonstration based on the minimal decision tree that uses partial F stats on a model with multiple external regressors divided by category and task regressors to bias towards keeping.
INFO     component_selector:__init__:334 Demonstration based on the minimal decision tree that uses partial F stats on a model with multiple external regressors divided by category and task regressors to bias towards keeping.
INFO     component_selector:__init__:334 Demonstration based on the minimal decision tree that uses partial F stats on a model with multiple external regressors divided by category and task regressors to bias towards keeping.
INFO     tedana:tedana_workflow:630 Loading input data: ['five-echo-dataset/p06.SBJ01_S09_Task11_e1.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e2.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e3.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e4.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e5.sm.nii.gz']
INFO     tedana:tedana_workflow:630 Loading input data: ['five-echo-dataset/p06.SBJ01_S09_Task11_e1.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e2.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e3.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e4.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e5.sm.nii.gz']
INFO     tedana:tedana_workflow:630 Loading input data: ['five-echo-dataset/p06.SBJ01_S09_Task11_e1.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e2.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e3.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e4.sm.nii.gz', 'five-echo-dataset/p06.SBJ01_S09_Task11_e5.sm.nii.gz']
INFO     io:__init__:156 Generating figures directory: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/figures
INFO     io:__init__:156 Generating figures directory: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/figures
INFO     io:__init__:156 Generating figures directory: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/figures
WARNING  tedana:tedana_workflow:735 Computing EPI mask from first echo using nilearn's compute_epi_mask function. Most external pipelines include more reliable masking functions. It is strongly recommended to provide an external mask, and to visually confirm that mask accurately conforms to data boundaries.
WARNING  tedana:tedana_workflow:735 Computing EPI mask from first echo using nilearn's compute_epi_mask function. Most external pipelines include more reliable masking functions. It is strongly recommended to provide an external mask, and to visually confirm that mask accurately conforms to data boundaries.
WARNING  tedana:tedana_workflow:735 Computing EPI mask from first echo using nilearn's compute_epi_mask function. Most external pipelines include more reliable masking functions. It is strongly recommended to provide an external mask, and to visually confirm that mask accurately conforms to data boundaries.
INFO     utils:make_adaptive_mask:202 Echo-wise intensity thresholds for adaptive mask: [5853.6399821  4862.62750244 4073.26911418 3377.14188232 2800.73880819]
INFO     utils:make_adaptive_mask:202 Echo-wise intensity thresholds for adaptive mask: [5853.6399821  4862.62750244 4073.26911418 3377.14188232 2800.73880819]
INFO     utils:make_adaptive_mask:202 Echo-wise intensity thresholds for adaptive mask: [5853.6399821  4862.62750244 4073.26911418 3377.14188232 2800.73880819]
WARNING  utils:make_adaptive_mask:231 4 voxels in user-defined mask do not have good signal. Removing voxels from mask.
WARNING  utils:make_adaptive_mask:231 4 voxels in user-defined mask do not have good signal. Removing voxels from mask.
WARNING  utils:make_adaptive_mask:231 4 voxels in user-defined mask do not have good signal. Removing voxels from mask.
INFO     tedana:tedana_workflow:774 Computing T2* map
INFO     tedana:tedana_workflow:774 Computing T2* map
INFO     tedana:tedana_workflow:774 Computing T2* map
/home/jovyan/conda-environments/tedenv/lib/python3.12/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     combine:make_optcom:192 Optimally combining data with voxel-wise T2* estimates
INFO     combine:make_optcom:192 Optimally combining data with voxel-wise T2* estimates
INFO     tedana:tedana_workflow:822 Writing optimally combined data set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-optcom_bold.nii.gz
INFO     tedana:tedana_workflow:822 Writing optimally combined data set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-optcom_bold.nii.gz
INFO     tedana:tedana_workflow:822 Writing optimally combined data set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-optcom_bold.nii.gz
INFO     tedana:tedana_workflow:931 Using supplied mixing matrix from ICA
INFO     tedana:tedana_workflow:931 Using supplied mixing matrix from ICA
INFO     tedana:tedana_workflow:931 Using supplied mixing matrix from ICA
INFO     collect:generate_metrics:161 Calculating weight maps
INFO     collect:generate_metrics:161 Calculating weight maps
INFO     collect:generate_metrics:161 Calculating weight maps
INFO     collect:generate_metrics:173 Calculating parameter estimate maps for optimally combined data
INFO     collect:generate_metrics:173 Calculating parameter estimate maps for optimally combined data
INFO     collect:generate_metrics:173 Calculating parameter estimate maps for optimally combined data
INFO     collect:generate_metrics:193 Calculating z-statistic maps
INFO     collect:generate_metrics:193 Calculating z-statistic maps
INFO     collect:generate_metrics:193 Calculating z-statistic maps
INFO     collect:generate_metrics:203 Calculating F-statistic maps
INFO     collect:generate_metrics:203 Calculating F-statistic maps
INFO     collect:generate_metrics:203 Calculating F-statistic maps
INFO     collect:generate_metrics:228 Thresholding z-statistic maps
INFO     collect:generate_metrics:228 Thresholding z-statistic maps
INFO     collect:generate_metrics:228 Thresholding z-statistic maps
INFO     collect:generate_metrics:238 Calculating T2* F-statistic maps
INFO     collect:generate_metrics:238 Calculating T2* F-statistic maps
INFO     collect:generate_metrics:238 Calculating T2* F-statistic maps
INFO     collect:generate_metrics:248 Calculating S0 F-statistic maps
INFO     collect:generate_metrics:248 Calculating S0 F-statistic maps
INFO     collect:generate_metrics:248 Calculating S0 F-statistic maps
INFO     collect:generate_metrics:259 Counting significant voxels in T2* F-statistic maps
INFO     collect:generate_metrics:259 Counting significant voxels in T2* F-statistic maps
INFO     collect:generate_metrics:259 Counting significant voxels in T2* F-statistic maps
INFO     collect:generate_metrics:265 Counting significant voxels in S0 F-statistic maps
INFO     collect:generate_metrics:265 Counting significant voxels in S0 F-statistic maps
INFO     collect:generate_metrics:265 Counting significant voxels in S0 F-statistic maps
INFO     collect:generate_metrics:272 Thresholding optimal combination beta maps to match T2* F-statistic maps
INFO     collect:generate_metrics:272 Thresholding optimal combination beta maps to match T2* F-statistic maps
INFO     collect:generate_metrics:272 Thresholding optimal combination beta maps to match T2* F-statistic maps
INFO     collect:generate_metrics:281 Thresholding optimal combination beta maps to match S0 F-statistic maps
INFO     collect:generate_metrics:281 Thresholding optimal combination beta maps to match S0 F-statistic maps
INFO     collect:generate_metrics:281 Thresholding optimal combination beta maps to match S0 F-statistic maps
INFO     collect:generate_metrics:291 Calculating kappa and rho
INFO     collect:generate_metrics:291 Calculating kappa and rho
INFO     collect:generate_metrics:291 Calculating kappa and rho
INFO     collect:generate_metrics:300 Calculating variance explained
INFO     collect:generate_metrics:300 Calculating variance explained
INFO     collect:generate_metrics:300 Calculating variance explained
INFO     collect:generate_metrics:306 Calculating normalized variance explained
INFO     collect:generate_metrics:306 Calculating normalized variance explained
INFO     collect:generate_metrics:306 Calculating normalized variance explained
INFO     collect:generate_metrics:313 Calculating DSI between thresholded T2* F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:313 Calculating DSI between thresholded T2* F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:313 Calculating DSI between thresholded T2* F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:323 Calculating DSI between thresholded S0 F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:323 Calculating DSI between thresholded S0 F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:323 Calculating DSI between thresholded S0 F-statistic and optimal combination beta maps
INFO     collect:generate_metrics:334 Calculating signal-noise t-statistics
INFO     collect:generate_metrics:334 Calculating signal-noise t-statistics
INFO     collect:generate_metrics:334 Calculating signal-noise t-statistics
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/scipy/_lib/deprecation.py:234: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
  return f(*args, **kwargs)
INFO     collect:generate_metrics:393 Calculating external regressor fits. Fits all external nuisance regressors to a single model using an F statistic
INFO     collect:generate_metrics:393 Calculating external regressor fits. Fits all external nuisance regressors to a single model using an F statistic
INFO     collect:generate_metrics:393 Calculating external regressor fits. Fits all external nuisance regressors to a single model using an F statistic
INFO     collect:generate_metrics:393 Calculating external regressor fits. Fits all task regressors to a single model using an F statistic
INFO     collect:generate_metrics:393 Calculating external regressor fits. Fits all task regressors to a single model using an F statistic
INFO     collect:generate_metrics:393 Calculating external regressor fits. Fits all task regressors to a single model using an F statistic
INFO     external:fit_regressors:286 External regressors fit for nuisance includes detrending with 2 Legendre Polynomial regressors.
INFO     external:fit_regressors:286 External regressors fit for nuisance includes detrending with 2 Legendre Polynomial regressors.
INFO     external:fit_regressors:286 External regressors fit for nuisance includes detrending with 2 Legendre Polynomial regressors.
INFO     external:fit_mixing_to_regressors:380 Running fit_mixing_to_regressors for nuisance
INFO     external:fit_mixing_to_regressors:380 Running fit_mixing_to_regressors for nuisance
INFO     external:fit_mixing_to_regressors:380 Running fit_mixing_to_regressors for nuisance
INFO     external:fit_mixing_to_regressors:381 ICA matrix has 160 time points and 39 components
INFO     external:fit_mixing_to_regressors:381 ICA matrix has 160 time points and 39 components
INFO     external:fit_mixing_to_regressors:381 ICA matrix has 160 time points and 39 components
INFO     external:build_fstat_regressor_models:473 Size for base regressor model for nuisance: (160, 2)
INFO     external:build_fstat_regressor_models:473 Size for base regressor model for nuisance: (160, 2)
INFO     external:build_fstat_regressor_models:473 Size for base regressor model for nuisance: (160, 2)
INFO     external:build_fstat_regressor_models:488 Size for full regressor model for nuisance: (160, 17)
INFO     external:build_fstat_regressor_models:488 Size for full regressor model for nuisance: (160, 17)
INFO     external:build_fstat_regressor_models:488 Size for full regressor model for nuisance: (160, 17)
INFO     external:build_fstat_regressor_models:489 Regressors in full model for nuisance: ['baseline 0', 'baseline 1', 'csf1', 'csf2', 'csf3', 'mot_dpitch', 'mot_droll', 'mot_dx', 'mot_dy', 'mot_dyaw', 'mot_dz', 'mot_pitch', 'mot_roll', 'mot_x', 'mot_y', 'mot_yaw', 'mot_z']
INFO     external:build_fstat_regressor_models:489 Regressors in full model for nuisance: ['baseline 0', 'baseline 1', 'csf1', 'csf2', 'csf3', 'mot_dpitch', 'mot_droll', 'mot_dx', 'mot_dy', 'mot_dyaw', 'mot_dz', 'mot_pitch', 'mot_roll', 'mot_x', 'mot_y', 'mot_yaw', 'mot_z']
INFO     external:build_fstat_regressor_models:489 Regressors in full model for nuisance: ['baseline 0', 'baseline 1', 'csf1', 'csf2', 'csf3', 'mot_dpitch', 'mot_droll', 'mot_dx', 'mot_dy', 'mot_dyaw', 'mot_dz', 'mot_pitch', 'mot_roll', 'mot_x', 'mot_y', 'mot_yaw', 'mot_z']
INFO     external:build_fstat_regressor_models:511 Size of external regressor partial model 'no Motion': (160, 5)
INFO     external:build_fstat_regressor_models:511 Size of external regressor partial model 'no Motion': (160, 5)
INFO     external:build_fstat_regressor_models:511 Size of external regressor partial model 'no Motion': (160, 5)
INFO     external:build_fstat_regressor_models:515 Regressors in partial model (everything but regressors of interest) 'no Motion': ['baseline 0', 'baseline 1', 'csf1', 'csf2', 'csf3']
INFO     external:build_fstat_regressor_models:515 Regressors in partial model (everything but regressors of interest) 'no Motion': ['baseline 0', 'baseline 1', 'csf1', 'csf2', 'csf3']
INFO     external:build_fstat_regressor_models:515 Regressors in partial model (everything but regressors of interest) 'no Motion': ['baseline 0', 'baseline 1', 'csf1', 'csf2', 'csf3']
INFO     external:build_fstat_regressor_models:511 Size of external regressor partial model 'no CSF': (160, 14)
INFO     external:build_fstat_regressor_models:511 Size of external regressor partial model 'no CSF': (160, 14)
INFO     external:build_fstat_regressor_models:511 Size of external regressor partial model 'no CSF': (160, 14)
INFO     external:build_fstat_regressor_models:515 Regressors in partial model (everything but regressors of interest) 'no CSF': ['baseline 0', 'baseline 1', 'mot_dpitch', 'mot_droll', 'mot_dx', 'mot_dy', 'mot_dyaw', 'mot_dz', 'mot_pitch', 'mot_roll', 'mot_x', 'mot_y', 'mot_yaw', 'mot_z']
INFO     external:build_fstat_regressor_models:515 Regressors in partial model (everything but regressors of interest) 'no CSF': ['baseline 0', 'baseline 1', 'mot_dpitch', 'mot_droll', 'mot_dx', 'mot_dy', 'mot_dyaw', 'mot_dz', 'mot_pitch', 'mot_roll', 'mot_x', 'mot_y', 'mot_yaw', 'mot_z']
INFO     external:build_fstat_regressor_models:515 Regressors in partial model (everything but regressors of interest) 'no CSF': ['baseline 0', 'baseline 1', 'mot_dpitch', 'mot_droll', 'mot_dx', 'mot_dy', 'mot_dyaw', 'mot_dz', 'mot_pitch', 'mot_roll', 'mot_x', 'mot_y', 'mot_yaw', 'mot_z']
INFO     external:fit_regressors:286 External regressors fit for task includes detrending with 2 Legendre Polynomial regressors.
INFO     external:fit_regressors:286 External regressors fit for task includes detrending with 2 Legendre Polynomial regressors.
INFO     external:fit_regressors:286 External regressors fit for task includes detrending with 2 Legendre Polynomial regressors.
INFO     external:fit_mixing_to_regressors:380 Running fit_mixing_to_regressors for task
INFO     external:fit_mixing_to_regressors:380 Running fit_mixing_to_regressors for task
INFO     external:fit_mixing_to_regressors:380 Running fit_mixing_to_regressors for task
INFO     external:fit_mixing_to_regressors:381 ICA matrix has 160 time points and 39 components
INFO     external:fit_mixing_to_regressors:381 ICA matrix has 160 time points and 39 components
INFO     external:fit_mixing_to_regressors:381 ICA matrix has 160 time points and 39 components
INFO     external:build_fstat_regressor_models:473 Size for base regressor model for task: (160, 2)
INFO     external:build_fstat_regressor_models:473 Size for base regressor model for task: (160, 2)
INFO     external:build_fstat_regressor_models:473 Size for base regressor model for task: (160, 2)
INFO     external:build_fstat_regressor_models:488 Size for full regressor model for task: (160, 3)
INFO     external:build_fstat_regressor_models:488 Size for full regressor model for task: (160, 3)
INFO     external:build_fstat_regressor_models:488 Size for full regressor model for task: (160, 3)
INFO     external:build_fstat_regressor_models:489 Regressors in full model for task: ['baseline 0', 'baseline 1', 'signal_checkerboard']
INFO     external:build_fstat_regressor_models:489 Regressors in full model for task: ['baseline 0', 'baseline 1', 'signal_checkerboard']
INFO     external:build_fstat_regressor_models:489 Regressors in full model for task: ['baseline 0', 'baseline 1', 'signal_checkerboard']
INFO     tedica:automatic_selection:54 Performing ICA component selection with tree: demo_external_regressors_motion_task_models
INFO     tedica:automatic_selection:54 Performing ICA component selection with tree: demo_external_regressors_motion_task_models
INFO     tedica:automatic_selection:54 Performing ICA component selection with tree: demo_external_regressors_motion_task_models
INFO     selection_nodes:manual_classify:104 Step 0: manual_classify: Set all to unclassified 
INFO     selection_nodes:manual_classify:104 Step 0: manual_classify: Set all to unclassified 
INFO     selection_nodes:manual_classify:104 Step 0: manual_classify: Set all to unclassified 
INFO     selection_utils:comptable_classification_changer:293 Step 0: No components fit criterion False to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 0: No components fit criterion False to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 0: No components fit criterion False to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 0: manual_classify applied to 39 components. 39 True -> unclassified. 0 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 0: manual_classify applied to 39 components. 39 True -> unclassified. 0 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 0: manual_classify applied to 39 components. 39 True -> unclassified. 0 False -> nochange.
INFO     selection_nodes:manual_classify:136 Step 0: manual_classify component classification tags are cleared
INFO     selection_nodes:manual_classify:136 Step 0: manual_classify component classification tags are cleared
INFO     selection_nodes:manual_classify:136 Step 0: manual_classify component classification tags are cleared
INFO     selection_utils:log_classification_counts:492 Step 0: Total component classifications: 39 unclassified
INFO     selection_utils:log_classification_counts:492 Step 0: Total component classifications: 39 unclassified
INFO     selection_utils:log_classification_counts:492 Step 0: Total component classifications: 39 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 1: left_op_right: provisionalreject if rho>kappa, else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 1: left_op_right: provisionalreject if rho>kappa, else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 1: left_op_right: provisionalreject if rho>kappa, else nochange
INFO     selection_utils:log_decision_tree_step:447 Step 1: left_op_right applied to 39 components. 5 True -> provisionalreject. 34 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 1: left_op_right applied to 39 components. 5 True -> provisionalreject. 34 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 1: left_op_right applied to 39 components. 5 True -> provisionalreject. 34 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 1: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_utils:log_classification_counts:492 Step 1: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_utils:log_classification_counts:492 Step 1: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 2: left_op_right: provisionalreject if ['countsigFS0>countsigFT2 & countsigFT2>0'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 2: left_op_right: provisionalreject if ['countsigFS0>countsigFT2 & countsigFT2>0'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 2: left_op_right: provisionalreject if ['countsigFS0>countsigFT2 & countsigFT2>0'], else nochange
INFO     selection_utils:log_decision_tree_step:447 Step 2: left_op_right applied to 39 components. 2 True -> provisionalreject. 37 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 2: left_op_right applied to 39 components. 2 True -> provisionalreject. 37 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 2: left_op_right applied to 39 components. 2 True -> provisionalreject. 37 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 2: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_utils:log_classification_counts:492 Step 2: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_utils:log_classification_counts:492 Step 2: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_nodes:calc_median:653 Step 3: calc_median: Median(median_varex)
INFO     selection_nodes:calc_median:653 Step 3: calc_median: Median(median_varex)
INFO     selection_nodes:calc_median:653 Step 3: calc_median: Median(median_varex)
INFO     selection_utils:log_decision_tree_step:459 Step 3: calc_median calculated: median_varex=0.5929824670449555
INFO     selection_utils:log_decision_tree_step:459 Step 3: calc_median calculated: median_varex=0.5929824670449555
INFO     selection_utils:log_decision_tree_step:459 Step 3: calc_median calculated: median_varex=0.5929824670449555
INFO     selection_utils:log_classification_counts:492 Step 3: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_utils:log_classification_counts:492 Step 3: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_utils:log_classification_counts:492 Step 3: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 4: left_op_right: provisionalreject if ['dice_FS0>dice_FT2 & variance explained>0.59'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 4: left_op_right: provisionalreject if ['dice_FS0>dice_FT2 & variance explained>0.59'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 4: left_op_right: provisionalreject if ['dice_FS0>dice_FT2 & variance explained>0.59'], else nochange
INFO     selection_utils:comptable_classification_changer:293 Step 4: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 4: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 4: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 4: left_op_right applied to 39 components. 0 True -> provisionalreject. 39 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 4: left_op_right applied to 39 components. 0 True -> provisionalreject. 39 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 4: left_op_right applied to 39 components. 0 True -> provisionalreject. 39 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 4: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_utils:log_classification_counts:492 Step 4: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_utils:log_classification_counts:492 Step 4: Total component classifications: 5 provisionalreject, 34 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 5: left_op_right: provisionalreject if ['0>signal-noise_t & variance explained>0.59'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 5: left_op_right: provisionalreject if ['0>signal-noise_t & variance explained>0.59'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 5: left_op_right: provisionalreject if ['0>signal-noise_t & variance explained>0.59'], else nochange
INFO     selection_utils:log_decision_tree_step:447 Step 5: left_op_right applied to 39 components. 4 True -> provisionalreject. 35 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 5: left_op_right applied to 39 components. 4 True -> provisionalreject. 35 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 5: left_op_right applied to 39 components. 4 True -> provisionalreject. 35 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 5: Total component classifications: 7 provisionalreject, 32 unclassified
INFO     selection_utils:log_classification_counts:492 Step 5: Total component classifications: 7 provisionalreject, 32 unclassified
INFO     selection_utils:log_classification_counts:492 Step 5: Total component classifications: 7 provisionalreject, 32 unclassified
INFO     selection_nodes:calc_kappa_elbow:767 Step 6: calc_kappa_elbow: Calc Kappa Elbow
INFO     selection_nodes:calc_kappa_elbow:767 Step 6: calc_kappa_elbow: Calc Kappa Elbow
INFO     selection_nodes:calc_kappa_elbow:767 Step 6: calc_kappa_elbow: Calc Kappa Elbow
INFO     selection_utils:kappa_elbow_kundu:668 Calculating kappa elbow based on all components.
INFO     selection_utils:kappa_elbow_kundu:668 Calculating kappa elbow based on all components.
INFO     selection_utils:kappa_elbow_kundu:668 Calculating kappa elbow based on all components.
INFO     selection_utils:log_decision_tree_step:459 Step 6: calc_kappa_elbow calculated: kappa_elbow_kundu=72.03387706852455, kappa_allcomps_elbow=72.03387706852455, kappa_nonsig_elbow=None, varex_upper_p=0.7019602209370308
INFO     selection_utils:log_decision_tree_step:459 Step 6: calc_kappa_elbow calculated: kappa_elbow_kundu=72.03387706852455, kappa_allcomps_elbow=72.03387706852455, kappa_nonsig_elbow=None, varex_upper_p=0.7019602209370308
INFO     selection_utils:log_decision_tree_step:459 Step 6: calc_kappa_elbow calculated: kappa_elbow_kundu=72.03387706852455, kappa_allcomps_elbow=72.03387706852455, kappa_nonsig_elbow=None, varex_upper_p=0.7019602209370308
INFO     selection_utils:log_classification_counts:492 Step 6: Total component classifications: 7 provisionalreject, 32 unclassified
INFO     selection_utils:log_classification_counts:492 Step 6: Total component classifications: 7 provisionalreject, 32 unclassified
INFO     selection_utils:log_classification_counts:492 Step 6: Total component classifications: 7 provisionalreject, 32 unclassified
INFO     selection_nodes:calc_rho_elbow:902 Step 7: calc_rho_elbow: Calc Rho Elbow
INFO     selection_nodes:calc_rho_elbow:902 Step 7: calc_rho_elbow: Calc Rho Elbow
INFO     selection_nodes:calc_rho_elbow:902 Step 7: calc_rho_elbow: Calc Rho Elbow
INFO     selection_utils:log_decision_tree_step:459 Step 7: calc_rho_elbow calculated: rho_elbow_liberal=20.056182881490265, rho_allcomps_elbow=20.056182881490265, rho_unclassified_elbow=19.718998357066482, elbow_f05=7.708647422176786
INFO     selection_utils:log_decision_tree_step:459 Step 7: calc_rho_elbow calculated: rho_elbow_liberal=20.056182881490265, rho_allcomps_elbow=20.056182881490265, rho_unclassified_elbow=19.718998357066482, elbow_f05=7.708647422176786
INFO     selection_utils:log_decision_tree_step:459 Step 7: calc_rho_elbow calculated: rho_elbow_liberal=20.056182881490265, rho_allcomps_elbow=20.056182881490265, rho_unclassified_elbow=19.718998357066482, elbow_f05=7.708647422176786
INFO     selection_utils:log_classification_counts:492 Step 7: Total component classifications: 7 provisionalreject, 32 unclassified
INFO     selection_utils:log_classification_counts:492 Step 7: Total component classifications: 7 provisionalreject, 32 unclassified
INFO     selection_utils:log_classification_counts:492 Step 7: Total component classifications: 7 provisionalreject, 32 unclassified
INFO     selection_nodes:dec_left_op_right:389 Step 8: left_op_right: provisionalaccept if ['kappa>=72.03 & rho<20.06'], else provisionalreject
INFO     selection_nodes:dec_left_op_right:389 Step 8: left_op_right: provisionalaccept if ['kappa>=72.03 & rho<20.06'], else provisionalreject
INFO     selection_nodes:dec_left_op_right:389 Step 8: left_op_right: provisionalaccept if ['kappa>=72.03 & rho<20.06'], else provisionalreject
INFO     selection_nodes:dec_left_op_right:391 Step 8: left_op_right If kappa> kappa elbow and rho<rho elbow, provisional accept. Otherwise provisional reject
INFO     selection_nodes:dec_left_op_right:391 Step 8: left_op_right If kappa> kappa elbow and rho<rho elbow, provisional accept. Otherwise provisional reject
INFO     selection_nodes:dec_left_op_right:391 Step 8: left_op_right If kappa> kappa elbow and rho<rho elbow, provisional accept. Otherwise provisional reject
INFO     selection_utils:log_decision_tree_step:447 Step 8: left_op_right applied to 32 components. 12 True -> provisionalaccept. 20 False -> provisionalreject.
INFO     selection_utils:log_decision_tree_step:447 Step 8: left_op_right applied to 32 components. 12 True -> provisionalaccept. 20 False -> provisionalreject.
INFO     selection_utils:log_decision_tree_step:447 Step 8: left_op_right applied to 32 components. 12 True -> provisionalaccept. 20 False -> provisionalreject.
INFO     selection_utils:log_classification_counts:492 Step 8: Total component classifications: 12 provisionalaccept, 27 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 8: Total component classifications: 12 provisionalaccept, 27 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 8: Total component classifications: 12 provisionalaccept, 27 provisionalreject
INFO     selection_nodes:dec_left_op_right:389 Step 9: left_op_right: provisionalaccept if ['kappa>2*rho & kappa>72.03'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 9: left_op_right: provisionalaccept if ['kappa>2*rho & kappa>72.03'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 9: left_op_right: provisionalaccept if ['kappa>2*rho & kappa>72.03'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 9: left_op_right If kappa>elbow and kappa>2*rho accept even if rho>elbow
INFO     selection_nodes:dec_left_op_right:391 Step 9: left_op_right If kappa>elbow and kappa>2*rho accept even if rho>elbow
INFO     selection_nodes:dec_left_op_right:391 Step 9: left_op_right If kappa>elbow and kappa>2*rho accept even if rho>elbow
INFO     selection_utils:log_decision_tree_step:447 Step 9: left_op_right applied to 27 components. 1 True -> provisionalaccept. 26 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 9: left_op_right applied to 27 components. 1 True -> provisionalaccept. 26 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 9: left_op_right applied to 27 components. 1 True -> provisionalaccept. 26 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 9: Total component classifications: 13 provisionalaccept, 26 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 9: Total component classifications: 13 provisionalaccept, 26 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 9: Total component classifications: 13 provisionalaccept, 26 provisionalreject
INFO     selection_nodes:dec_left_op_right:389 Step 10: left_op_right: provisionalreject if ['pval nuisance model<0.05 & R2stat nuisance model>0.5'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 10: left_op_right: provisionalreject if ['pval nuisance model<0.05 & R2stat nuisance model>0.5'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 10: left_op_right: provisionalreject if ['pval nuisance model<0.05 & R2stat nuisance model>0.5'], else nochange
INFO     selection_nodes:dec_left_op_right:391 Step 10: left_op_right If external regressors fit with p<0.05 and model R2>0.5 of the variance, then reject.
INFO     selection_nodes:dec_left_op_right:391 Step 10: left_op_right If external regressors fit with p<0.05 and model R2>0.5 of the variance, then reject.
INFO     selection_nodes:dec_left_op_right:391 Step 10: left_op_right If external regressors fit with p<0.05 and model R2>0.5 of the variance, then reject.
INFO     selection_utils:log_decision_tree_step:447 Step 10: left_op_right applied to 39 components. 10 True -> provisionalreject. 29 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 10: left_op_right applied to 39 components. 10 True -> provisionalreject. 29 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 10: left_op_right applied to 39 components. 10 True -> provisionalreject. 29 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 10: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 10: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 10: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_nodes:dec_left_op_right:389 Step 11: left_op_right: nochange if ['pval nuisance model<0.05 & R2stat nuisance model>0.5 & pval nuisance Motion partial model<0.05'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 11: left_op_right: nochange if ['pval nuisance model<0.05 & R2stat nuisance model>0.5 & pval nuisance Motion partial model<0.05'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 11: left_op_right: nochange if ['pval nuisance model<0.05 & R2stat nuisance model>0.5 & pval nuisance Motion partial model<0.05'], else nochange
INFO     selection_utils:comptable_classification_changer:293 Step 11: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 11: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 11: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 11: left_op_right applied to 28 components. 0 True -> nochange. 28 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 11: left_op_right applied to 28 components. 0 True -> nochange. 28 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 11: left_op_right applied to 28 components. 0 True -> nochange. 28 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 11: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 11: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 11: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_nodes:dec_left_op_right:389 Step 12: left_op_right: nochange if ['pval nuisance model<0.05 & R2stat nuisance model>0.5 & pval nuisance CSF partial model<0.05'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 12: left_op_right: nochange if ['pval nuisance model<0.05 & R2stat nuisance model>0.5 & pval nuisance CSF partial model<0.05'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 12: left_op_right: nochange if ['pval nuisance model<0.05 & R2stat nuisance model>0.5 & pval nuisance CSF partial model<0.05'], else nochange
INFO     selection_utils:comptable_classification_changer:293 Step 12: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 12: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 12: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 12: left_op_right applied to 28 components. 0 True -> nochange. 28 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 12: left_op_right applied to 28 components. 0 True -> nochange. 28 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 12: left_op_right applied to 28 components. 0 True -> nochange. 28 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 12: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 12: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 12: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_nodes:dec_left_op_right:389 Step 13: left_op_right: accepted if ['pval task model<0.05 & R2stat task model>0.5 & kappa>=72.03'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 13: left_op_right: accepted if ['pval task model<0.05 & R2stat task model>0.5 & kappa>=72.03'], else nochange
INFO     selection_nodes:dec_left_op_right:389 Step 13: left_op_right: accepted if ['pval task model<0.05 & R2stat task model>0.5 & kappa>=72.03'], else nochange
INFO     selection_utils:comptable_classification_changer:293 Step 13: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 13: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 13: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 13: left_op_right applied to 28 components. 0 True -> accepted. 28 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 13: left_op_right applied to 28 components. 0 True -> accepted. 28 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 13: left_op_right applied to 28 components. 0 True -> accepted. 28 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 13: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 13: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 13: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_nodes:dec_variance_lessthan_thresholds:533 Step 14: variance_lt_thresholds: accepted if variance explained<0.1. All variance<1.0, else nochange
INFO     selection_nodes:dec_variance_lessthan_thresholds:533 Step 14: variance_lt_thresholds: accepted if variance explained<0.1. All variance<1.0, else nochange
INFO     selection_nodes:dec_variance_lessthan_thresholds:533 Step 14: variance_lt_thresholds: accepted if variance explained<0.1. All variance<1.0, else nochange
INFO     selection_utils:comptable_classification_changer:293 Step 14: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 14: No components fit criterion True to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 14: No components fit criterion True to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 14: variance_lt_thresholds applied to 28 components. 0 True -> accepted. 28 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 14: variance_lt_thresholds applied to 28 components. 0 True -> accepted. 28 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 14: variance_lt_thresholds applied to 28 components. 0 True -> accepted. 28 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 14: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 14: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 14: Total component classifications: 11 provisionalaccept, 28 provisionalreject
INFO     selection_nodes:manual_classify:104 Step 15: manual_classify: Set provisionalaccept to accepted 
INFO     selection_nodes:manual_classify:104 Step 15: manual_classify: Set provisionalaccept to accepted 
INFO     selection_nodes:manual_classify:104 Step 15: manual_classify: Set provisionalaccept to accepted 
INFO     selection_utils:comptable_classification_changer:293 Step 15: No components fit criterion False to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 15: No components fit criterion False to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 15: No components fit criterion False to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 15: manual_classify applied to 11 components. 11 True -> accepted. 0 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 15: manual_classify applied to 11 components. 11 True -> accepted. 0 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 15: manual_classify applied to 11 components. 11 True -> accepted. 0 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 15: Total component classifications: 11 accepted, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 15: Total component classifications: 11 accepted, 28 provisionalreject
INFO     selection_utils:log_classification_counts:492 Step 15: Total component classifications: 11 accepted, 28 provisionalreject
INFO     selection_nodes:manual_classify:104 Step 16: manual_classify: Set ['provisionalreject', 'unclassified'] to rejected 
INFO     selection_nodes:manual_classify:104 Step 16: manual_classify: Set ['provisionalreject', 'unclassified'] to rejected 
INFO     selection_nodes:manual_classify:104 Step 16: manual_classify: Set ['provisionalreject', 'unclassified'] to rejected 
INFO     selection_utils:comptable_classification_changer:293 Step 16: No components fit criterion False to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 16: No components fit criterion False to change classification
INFO     selection_utils:comptable_classification_changer:293 Step 16: No components fit criterion False to change classification
INFO     selection_utils:log_decision_tree_step:447 Step 16: manual_classify applied to 28 components. 28 True -> rejected. 0 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 16: manual_classify applied to 28 components. 28 True -> rejected. 0 False -> nochange.
INFO     selection_utils:log_decision_tree_step:447 Step 16: manual_classify applied to 28 components. 28 True -> rejected. 0 False -> nochange.
INFO     selection_utils:log_classification_counts:492 Step 16: Total component classifications: 11 accepted, 28 rejected
INFO     selection_utils:log_classification_counts:492 Step 16: Total component classifications: 11 accepted, 28 rejected
INFO     selection_utils:log_classification_counts:492 Step 16: Total component classifications: 11 accepted, 28 rejected
INFO     io:denoise_ts:613 Variance explained by decomposition: 94.68%
INFO     io:denoise_ts:613 Variance explained by decomposition: 94.68%
INFO     io:denoise_ts:613 Variance explained by decomposition: 94.68%
INFO     io:write_split_ts:700 Writing denoised time series: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-denoised_bold.nii.gz
INFO     io:write_split_ts:700 Writing denoised time series: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-denoised_bold.nii.gz
INFO     io:write_split_ts:700 Writing denoised time series: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-denoised_bold.nii.gz
INFO     io:writeresults:749 Writing full ICA coefficient feature set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-ICA_components.nii.gz
INFO     io:writeresults:749 Writing full ICA coefficient feature set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-ICA_components.nii.gz
INFO     io:writeresults:749 Writing full ICA coefficient feature set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-ICA_components.nii.gz
INFO     io:writeresults:753 Writing denoised ICA coefficient feature set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-ICAAccepted_components.nii.gz
INFO     io:writeresults:753 Writing denoised ICA coefficient feature set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-ICAAccepted_components.nii.gz
INFO     io:writeresults:753 Writing denoised ICA coefficient feature set: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-ICAAccepted_components.nii.gz
INFO     io:writeresults:759 Writing Z-normalized spatial component maps: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-ICAAccepted_stat-z_components.nii.gz
INFO     io:writeresults:759 Writing Z-normalized spatial component maps: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-ICAAccepted_stat-z_components.nii.gz
INFO     io:writeresults:759 Writing Z-normalized spatial component maps: /home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/desc-ICAAccepted_stat-z_components.nii.gz
INFO     tedana:tedana_workflow:1116 Making figures folder with static component maps and timecourse plots.
INFO     tedana:tedana_workflow:1116 Making figures folder with static component maps and timecourse plots.
INFO     tedana:tedana_workflow:1116 Making figures folder with static component maps and timecourse plots.
INFO     io:denoise_ts:613 Variance explained by decomposition: 94.68%
INFO     io:denoise_ts:613 Variance explained by decomposition: 94.68%
INFO     io:denoise_ts:613 Variance explained by decomposition: 94.68%
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/tedana/io.py:904: 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)
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/tedana/io.py:904: 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)
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/tedana/io.py:904: 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)
/home/jovyan/conda-environments/tedenv/lib/python3.12/site-packages/nilearn/plotting/img_plotting.py:1416: 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:1172 Generating dynamic report
INFO     tedana:tedana_workflow:1172 Generating dynamic report
INFO     tedana:tedana_workflow:1172 Generating dynamic report
INFO     html_report:_update_template_bokeh:164 Checking for adaptive mask: adaptive_mask.svg, exists: True
INFO     html_report:_update_template_bokeh:164 Checking for adaptive mask: adaptive_mask.svg, exists: True
INFO     html_report:_update_template_bokeh:164 Checking for adaptive mask: adaptive_mask.svg, exists: True
INFO     html_report:_update_template_bokeh:204 T2* files exist: True
INFO     html_report:_update_template_bokeh:204 T2* files exist: True
INFO     html_report:_update_template_bokeh:204 T2* files exist: True
INFO     html_report:_update_template_bokeh:205 S0 files exist: True
INFO     html_report:_update_template_bokeh:205 S0 files exist: True
INFO     html_report:_update_template_bokeh:205 S0 files exist: True
INFO     html_report:_update_template_bokeh:206 RMSE files exist: True
INFO     html_report:_update_template_bokeh:206 RMSE files exist: True
INFO     html_report:_update_template_bokeh:206 RMSE files exist: True
INFO     html_report:_update_template_bokeh:212 External regressors exist: True
INFO     html_report:_update_template_bokeh:212 External regressors exist: True
INFO     html_report:_update_template_bokeh:212 External regressors exist: True
INFO     tedana:tedana_workflow:1175 Workflow completed
INFO     tedana:tedana_workflow:1175 Workflow completed
INFO     tedana:tedana_workflow:1175 Workflow completed
INFO     utils:log_newsletter_info:705 Don't forget to subscribe to the tedana newsletter for updates! This is a very low volume email list.
INFO     utils:log_newsletter_info:705 Don't forget to subscribe to the tedana newsletter for updates! This is a very low volume email list.
INFO     utils:log_newsletter_info:705 Don't forget to subscribe to the tedana newsletter for updates! This is a very low volume email list.
INFO     utils:log_newsletter_info:709 https://groups.google.com/g/tedana-newsletter
INFO     utils:log_newsletter_info:709 https://groups.google.com/g/tedana-newsletter
INFO     utils:log_newsletter_info:709 https://groups.google.com/g/tedana-newsletter
../_images/0f11b551e8c9208f12891d200e1543f23de84976d4dfffa5acb8c8f3d743cd99.png ../_images/baa6a32d467fb99fd2a008090f1d706ed376b90d5cc5d153d04db5d4eb472652.png ../_images/221b0a5850db83287a9ea29ab38ab6c0ed202a1cf99e813969ceaacc262ddd94.png ../_images/97d621ab28df2081363e6bdd44d78c9b6aa075a076bb890069e3b29dfa15a005.png ../_images/c14222bf2e57fe4764d6c93a22102dc5a6b3e611c9e356aaa4f7b1e049959422.png ../_images/fa7e250d318d94cdc06b1786a713e8fdc9dae4727017c59aabbc2355baa97761.png ../_images/d9e32d0061e30560925fa6d104818b9c460fa567c6b12d23af9c3791d47823cc.png ../_images/bf9f0495eabcd650ca40db86aa45196d581fd5cd2857e55de8f575584162c2de.png

Components of the tedana report of 5 echo data with external regressors#

# Here is the path to the second TEDANA report
url = str(os.path.abspath(dset_dir5_extern_out + '/tedana_report.html'))
print(url)
/home/jovyan/Git_repositories/five-echo-dataset/tedana_external_regress_processed/tedana_report.html

To view this report with all figures displayed properly, right-click the file path and choose Open in New Browser Tab.

Carpet plot#

SVG(filename='five-echo-dataset/tedana_external_regress_processed/figures/carpet_optcom.svg')
../_images/b98bb0777ce094ce161e61f1c3bf24209b85dfc0af00d597d6c0fb16065df984.svg

Adaptive Mask#

SVG(filename='five-echo-dataset/tedana_external_regress_processed/figures/adaptive_mask.svg')
../_images/33ecac96f580fb67eca8e63b10778ec210783237e4ab0c0eff46f042c50532d4.svg

T2*#

t2star_brain = SVG(filename='five-echo-dataset/tedana_external_regress_processed/figures/t2star_brain.svg')
t2star_histogram = SVG(filename='five-echo-dataset/tedana_external_regress_processed/figures/t2star_histogram.svg')

display(t2star_brain, t2star_histogram)
../_images/1fa2851051cbcfaec8f95b985f404452c72efe7432eba248820603db0c6fcd1e.svg ../_images/7a9e49ff12b689833db0225f3227e63ce34f3a55d6d155358c0b78ba4798f904.svg

S0#

s0_brain = SVG(filename='five-echo-dataset/tedana_external_regress_processed/figures/s0_brain.svg')
s0_histogram = SVG(filename='five-echo-dataset/tedana_external_regress_processed/figures/s0_histogram.svg')

display(s0_brain, s0_histogram)
../_images/c6e41658f703a31690f9c7d2b4c982ff0e71d10dd39aeb522c8d70ad0065c0d1.svg ../_images/a9c4e54214f88e293b0342c129f6614e5615e20a9380d411a14287c9db783a7a.svg

T2* and S0 model fit (RMSE). (Scaled between 2nd and 98th percentiles)#

rmse_brain = SVG(filename='five-echo-dataset/tedana_external_regress_processed/figures/rmse_brain.svg')
rmse_timeseries = SVG(filename='five-echo-dataset/tedana_external_regress_processed/figures/rmse_timeseries.svg')

display(rmse_brain, rmse_timeseries)
../_images/73a88cfbfd8b613ba3e799ed0635595b36046db5aaa3f1afceec4d95fe863533.svg ../_images/9feb428ffcc982bfdd1f686391305c75ad08b9b4916cad6c58db9778a04cc111.svg

External regressors#

SVG(filename='five-echo-dataset/tedana_external_regress_processed/figures/confound_correlations.svg')
../_images/8549d548c06742e75ede909054d56a583580ce18f56eaa20c010cf0f31c82266.svg