Skip to content

Commit

Permalink
Add metadata for motion parameters (#3245)
Browse files Browse the repository at this point in the history
Closes #3231.

## Changes proposed in this pull request

- Add metadata, including Units, for motion parameters (6 basic
parameters and FD).
- I included FD because it might be good to log the head radius that is
used to calculate it at some point (e.g., if
nipreps/nibabies#198 moves forward)

## Documentation that should be reviewed

none

---------

Co-authored-by: Chris Markiewicz <[email protected]>
  • Loading branch information
tsalo and effigies authored Mar 4, 2024
1 parent d9f0a8e commit ad65d0b
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion fmriprep/workflows/bold/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,31 @@ def init_bold_confs_wf(
name='crowncc_metadata_fmt',
)

# Combine all confounds metadata
mrg_conf_metadata = pe.Node(
niu.Merge(3), name='merge_confound_metadata', run_without_submitting=True
niu.Merge(4), name='merge_confound_metadata', run_without_submitting=True
)
# Tissue mean time series
mrg_conf_metadata.inputs.in3 = {label: {'Method': 'Mean'} for label in signals_class_labels}
# Movement parameters
mrg_conf_metadata.inputs.in4 = {
'trans_x': {'Description': 'Translation along left-right axis.', 'Units': 'mm'},
'trans_y': {'Description': 'Translation along anterior-posterior axis.', 'Units': 'mm'},
'trans_z': {'Description': 'Translation along superior-inferior axis.', 'Units': 'mm'},
'rot_x': {
'Description': 'Rotation about left-right axis. Also known as "pitch".',
'Units': 'rad',
},
'rot_y': {
'Description': 'Rotation about anterior-posterior axis. Also known as "roll".',
'Units': 'rad',
},
'rot_z': {
'Description': 'Rotation about superior-inferior axis. Also known as "yaw".',
'Units': 'rad',
},
'framewise_displacement': {'Units': 'mm'},
}
mrg_conf_metadata2 = pe.Node(
DictMerge(), name='merge_confound_metadata2', run_without_submitting=True
)
Expand Down

0 comments on commit ad65d0b

Please sign in to comment.