Skip to content

Commit 697fd05

Browse files
committed
📝 Document FCP-INDI/C-PAC#1837
1 parent c5f97f0 commit 697fd05

File tree

4 files changed

+44
-12
lines changed

4 files changed

+44
-12
lines changed

docs/_sources/developer/schema.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
Validation Schema
55
*****************
66

7-
C-PAC uses `voluptuous <alecthomas.github.io/voluptuous/docs/_build/html>`_ to validate pipeline configurations against defined types and value restrictions. Default values should be set in :doc:`the default pipeline </user/pipelines/default>` along with comments explaining each option.
7+
C-PAC uses `voluptuous <alecthomas.github.io/voluptuous/docs/_build/html>`_ to validate pipeline configurations against defined types and value restrictions. Default values should be set in :doc:`the default pipeline </user/pipelines/default>` along with comments explaining each option.
8+
9+
.. automodule:: CPAC.pipeline.schema
10+
:members:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+

docs/_sources/references/references.bib

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ @misc{Etze14
5555
year = {2014}
5656
}
5757

58+
@incollection{Eybe16,
59+
title = {Spectral {{Bands}} and {{Filter Shapes}}},
60+
booktitle = {Real-Time {{Speech}} and {{Music Classification}} by {{Large Audio Feature Space Extraction}}},
61+
author = {Eyben, Florian},
62+
year = {2016},
63+
series = {Springer {{Theses}}},
64+
pages = {xxii},
65+
publisher = {{Springer International Publishing}},
66+
address = {{Cham, Switzerland}},
67+
doi = {10.1007/978-3-319-27299-3},
68+
isbn = {978-3-319-27298-6 978-3-319-27299-3}
69+
}
70+
5871
@book{fMRI16,
5972
title = {{{fMRIPrep}}: {{A Robust Preprocessing Pipeline}} for {{fMRI Data}} \textemdash{} Fmriprep Stable Version Documentation},
6073
author = {{fMRIPrep developers}},

docs/_sources/user/func.rst

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,34 @@ Initial Preprocessing
5454
:start-at: motion_estimates_and_correction:
5555
:end-before: distortion_correction:
5656

57-
.. _motion_estimate_filter_valid_options:
57+
.. _motion-estimate-filter-valid-options:
5858

59-
For ``motion_estimate_filter``, if ``breathing_rate_min`` and ``breathing_rate_max`` are provided, the filter design attributes (``center_frequency``, ``filter_bandwidth``, ``lowpass_cutoff``) are automatically configured. But if you provide these directly, you don't need the breathing rates. If all all parameters are provided, the filter design attributes will be ignored in favor of the ``breathing_rate_*`` attributes. A configuration must match at least one row in the following table:
59+
.. versionchanged:: 1.8.5
60+
Changed from single dictionary to ``filters`` list of dictionaries
6061

61-
======= =============== ====================== ====================== ==================== ==================== ==================
62-
``run`` ``filter_type`` ``breathing_rate_min`` ``breathing_rate_max`` ``center_frequency`` ``filter_bandwidth`` ``lowpass_cutoff``
63-
======= =============== ====================== ====================== ==================== ==================== ==================
64-
Off
65-
On notch **required** **required**
66-
On notch None None **required** **required**
67-
On lowpass **required**
68-
On lowpass None **required**
69-
======= =============== ====================== ====================== ==================== ==================== ==================
62+
For each filter in ``motion_estimate_filter.filters``, if ``breathing_rate_min`` and ``breathing_rate_max`` are provided, the filter design attributes (``center_frequency``, ``filter_bandwidth``, ``lowpass_cutoff``) are automatically configured. But if you provide these directly, you don't need the breathing rates. If all all parameters are provided, the filter design attributes will be ignored in favor of the ``breathing_rate_*`` attributes. A configuration must match at least one row in the following table:
7063

64+
======= =============== ================ ====================== ====================== ==================== ==================== ================== ============
65+
``run`` ``filter_type`` ``filter_order`` ``breathing_rate_min`` ``breathing_rate_max`` ``center_frequency`` ``filter_bandwidth`` ``lowpass_cutoff`` ``Name``
66+
======= =============== ================ ====================== ====================== ==================== ==================== ================== ============
67+
"Off"
68+
"On" "notch" **required** int **required** float **required** float optional str
69+
"On" "notch" **required** int *None* *None* **required** float **required** float optional str
70+
"On" "lowpass" **required** int **required** float optional str
71+
"On" "lowpass" **required** int *None* **required** float optional str
72+
======= =============== ================ ====================== ====================== ==================== ==================== ================== ============
73+
74+
For each filter, ``Name`` need not be provided; if ``Name`` is not provided, it will be autopopulated based on the configuration, using the keys in this table [#motion-filter-abbreviations]_:
75+
76+
====================== ====================== ==================== ==================== ==================
77+
``breathing_rate_min`` ``breathing_rate_max`` ``center_frequency`` ``filter_bandwidth`` ``lowpass_cutoff``
78+
====================== ====================== ==================== ==================== ==================
79+
``fl`` ``fu`` ``fc`` ``bw`` ``fc``
80+
====================== ====================== ==================== ==================== ==================
81+
82+
and the format ``{filterType}{filterOrder}[{key}{value}]*`` with a lowercase ``p`` replacing any decimal points. If any filters have duplicate names (given or generated), each name after the first will be suffixed with ``dup{duplicate_number}``, with ``duplicate_number`` starting at 1. See :py:func:`CPAC.pipeline.schema.name_motion_filter` for examples.
83+
84+
.. [#motion-filter-abbreviations] These abbreviations are based on :cite:`Eybe16` but modified to comply with :cite:`BIDS21`.
7185
7286
Slice Timing Correction
7387
^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)