xcp_d.utils.confounds.load_motion

xcp_d.utils.confounds.load_motion(confounds_df, TR, motion_filter_type=None, band_stop_min=None, band_stop_max=None, motion_filter_order=4)[source]

Load the six basic motion regressors (three rotations, three translations).

Parameters:
  • confounds_df (pandas.DataFrame) – The confounds DataFrame from which to extract the six basic motion regressors.

  • TR (float) – Repetition time of the BOLD run, in seconds.

  • motion_filter_type ({None, “lp”, “notch”}) – Type of filter to use for removing respiratory artifact from motion regressors.

    If None, no filter will be applied.

    If the filter type is set to “notch”, frequencies between band_stop_min and band_stop_max will be removed with a notch filter. In this case, both band_stop_min and band_stop_max must be defined.

    If “lp”, frequencies above band_stop_min will be removed with a Butterworth filter. In this case, only band_stop_min must be defined. If “lp” or “notch”, that filtering will be done in this function. Otherwise, no filtering will be applied.

  • band_stop_min (float or None) – Lower frequency for the motion parameter filter, in breaths-per-minute (bpm). Motion filtering is only performed if motion_filter_type is not None. If used with the “lp” motion_filter_type, this parameter essentially corresponds to a low-pass filter (the maximum allowed frequency in the filtered data). This parameter is used in conjunction with motion_filter_order and band_stop_max.

    Here is a list of recommended values, based on participant age:

    Age Range (years)

    Recommended Value

    < 1

    30

    1 - 2

    25

    2 - 6

    20

    6 - 12

    15

    12 - 18

    12

    19 - 65

    12

    65 - 80

    12

    > 80

    10

    When motion_filter_type is set to “lp” (low-pass filter), another commonly-used value for this parameter is 6 BPM (equivalent to 0.1 Hertz), based on Gratton et al.[1].

  • band_stop_max (float or None) – Upper frequency for the motion parameter filter, in breaths-per-minute (bpm). Motion filtering is only performed if motion_filter_type is not None. This parameter is only used if motion-filter-type is set to “notch”. This parameter is used in conjunction with motion_filter_order and band_stop_min.

    Here is a list of recommended values, based on participant age:

    Age Range (years)

    Recommended Value

    < 1

    60

    1 - 2

    50

    2 - 6

    35

    6 - 12

    25

    12 - 18

    20

    19 - 65

    18

    65 - 80

    28

    > 80

    30

  • motion_filter_order (int) – Number of filter coefficients for the motion parameter filter. Motion filtering is only performed if motion_filter_type is not None. This parameter is used in conjunction with band_stop_max and band_stop_min.

Returns:

motion_confounds_df – The six motion regressors. The three rotations are listed first, then the three translations.

Return type:

pandas.DataFrame

References