diff --git a/nibabies/cli/parser.py b/nibabies/cli/parser.py index 926ad504..e43edd91 100644 --- a/nibabies/cli/parser.py +++ b/nibabies/cli/parser.py @@ -594,6 +594,12 @@ def _bids_filter(value): "--segmentation-atlases-dir", help="Directory containing precalculated segmentations to use for JointLabelFusion." ) + g_baby.add_argument( + "--fd-radius", + type=float, + default=45, + help="Head radius in mm for framewise displacement calculation", + ) return parser diff --git a/nibabies/config.py b/nibabies/config.py index c8ccf6a7..48aa7340 100644 --- a/nibabies/config.py +++ b/nibabies/config.py @@ -505,6 +505,8 @@ class workflow(_Config): """Generate HCP Grayordinates, accepts either ``'91k'`` (default) or ``'170k'``.""" dummy_scans = None """Set a number of initial scans to be considered nonsteady states.""" + fd_radius = 45 + """Head radius in mm for framewise displacement calculation""" fmap_bspline = None """Regularize fieldmaps with a field of B-Spline basis.""" fmap_demean = None diff --git a/nibabies/workflows/bold/base.py b/nibabies/workflows/bold/base.py index 760e9a34..912a585d 100644 --- a/nibabies/workflows/bold/base.py +++ b/nibabies/workflows/bold/base.py @@ -421,6 +421,7 @@ def init_func_preproc_wf(bold_file, has_fieldmap=False): regressors_all_comps=config.workflow.regressors_all_comps, regressors_fd_th=config.workflow.regressors_fd_th, regressors_dvars_th=config.workflow.regressors_dvars_th, + fd_radius=config.workflow.fd_radius, name='bold_confounds_wf') bold_confounds_wf.get_node('inputnode').inputs.t1_transform_flags = [False] diff --git a/nibabies/workflows/bold/confounds.py b/nibabies/workflows/bold/confounds.py index 4e604f4f..a19c4689 100644 --- a/nibabies/workflows/bold/confounds.py +++ b/nibabies/workflows/bold/confounds.py @@ -27,6 +27,8 @@ def init_bold_confs_wf( regressors_dvars_th, regressors_fd_th, freesurfer=False, + *, + fd_radius=45, name="bold_confs_wf", ): """ @@ -78,8 +80,6 @@ def init_bold_confs_wf( the FoV metadata : :obj:`dict` BIDS metadata for BOLD file - name : :obj:`str` - Name of workflow (default: ``bold_confs_wf``) regressors_all_comps : :obj:`bool` Indicates whether CompCor decompositions should return all components instead of the minimal number of components necessary @@ -88,7 +88,10 @@ def init_bold_confs_wf( Criterion for flagging DVARS outliers regressors_fd_th : :obj:`float` Criterion for flagging framewise displacement outliers - + fd_radius : :obj:`float` + Radius in mm to calculate angular FDs (default: 45) + name : :obj:`str` + Name of workflow (default: ``bold_confs_wf``) Inputs ------ bold @@ -200,7 +203,7 @@ def init_bold_confs_wf( name="dvars", mem_gb=mem_gb) # Frame displacement - fdisp = pe.Node(nac.FramewiseDisplacement(parameter_source="SPM"), + fdisp = pe.Node(nac.FramewiseDisplacement(parameter_source="SPM", radius=fd_radius), name="fdisp", mem_gb=mem_gb) # Generate aCompCor probseg maps