Skip to content

Commit

Permalink
ENH: Save metadata for T2starmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed May 13, 2022
1 parent c9e9024 commit a3d9737
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .circleci/ds210_fasttrack_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_desc-b
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_T2starmap.json
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_T2starmap.nii.gz
fmriprep/sub-02.html
/tmp/ds210/derivatives
1 change: 1 addition & 0 deletions .circleci/ds210_outputs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_desc-b
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_T2starmap.json
fmriprep/sub-02/func/sub-02_task-cuedSGT_run-01_space-MNI152NLin2009cAsym_T2starmap.nii.gz
fmriprep/sub-02.html
/tmp/ds210/derivatives
17 changes: 14 additions & 3 deletions fmriprep/workflows/bold/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ def init_func_derivatives_wf(
# BOLD series will generally be unmasked unless multiecho,
# as the optimal combination is undefined outside a bounded mask
masked = multiecho
t2star_meta = {
'Units': 's',
'EstimationReference': 'doi:10.1002/mrm.20900',
'EstimationAlgorithm': 'monoexponential decay model',
}

inputnode = pe.Node(niu.IdentityInterface(fields=[
'aroma_noise_ics', 'bold_aparc_std', 'bold_aparc_t1', 'bold_aseg_std',
Expand Down Expand Up @@ -248,13 +253,15 @@ def init_func_derivatives_wf(
if multiecho:
ds_t2star_bold = pe.Node(
DerivativesDataSink(base_directory=output_dir, space='boldref',
suffix='T2starmap', compress=True, dismiss_entities=("echo",)),
suffix='T2starmap', compress=True, dismiss_entities=("echo",),
**t2star_meta),
name='ds_t2star_bold', run_without_submitting=True,
mem_gb=DEFAULT_MEMORY_MIN_GB)

workflow.connect([
(inputnode, ds_t2star_bold, [('source_file', 'source_file'),
('t2star_bold', 'in_file')]),
(raw_sources, ds_t2star_bold, [('out', 'RawSources')]),
])

if multiecho and config.execution.me_output_echos:
Expand Down Expand Up @@ -322,13 +329,15 @@ def init_func_derivatives_wf(
if multiecho:
ds_t2star_t1 = pe.Node(
DerivativesDataSink(base_directory=output_dir, space='T1w',
suffix='T2starmap', compress=True, dismiss_entities=("echo",)),
suffix='T2starmap', compress=True, dismiss_entities=("echo",),
**t2star_meta),
name='ds_t2star_t1', run_without_submitting=True,
mem_gb=DEFAULT_MEMORY_MIN_GB)

workflow.connect([
(inputnode, ds_t2star_t1, [('source_file', 'source_file'),
('t2star_t1', 'in_file')]),
(raw_sources, ds_t2star_t1, [('out', 'RawSources')]),
])

if use_aroma:
Expand Down Expand Up @@ -457,7 +466,8 @@ def init_func_derivatives_wf(
if multiecho:
ds_t2star_std = pe.Node(
DerivativesDataSink(base_directory=output_dir, suffix='T2starmap',
compress=True, dismiss_entities=("echo",)),
compress=True, dismiss_entities=("echo",),
**t2star_meta),
name='ds_t2star_std', run_without_submitting=True,
mem_gb=DEFAULT_MEMORY_MIN_GB)

Expand All @@ -468,6 +478,7 @@ def init_func_derivatives_wf(
('cohort', 'cohort'),
('resolution', 'resolution'),
('density', 'density')]),
(raw_sources, ds_t2star_std, [('out', 'RawSources')]),
])

fs_outputs = spaces.cached.get_fs_spaces()
Expand Down

0 comments on commit a3d9737

Please sign in to comment.