Skip to content

Commit bf1e7c6

Browse files
authored
📝 Document "👔 Fork on motion_estimate_filter.filters" (FCP-INDI/C-PAC#1837) (#294)
2 parents 9b978c9 + 82b1378 commit bf1e7c6

File tree

4 files changed

+55
-14
lines changed

4 files changed

+55
-14
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
@@ -66,6 +66,19 @@ @misc{Etze14
6666
year = {2014}
6767
}
6868

69+
@incollection{Eybe16,
70+
title = {Spectral {{Bands}} and {{Filter Shapes}}},
71+
booktitle = {Real-Time {{Speech}} and {{Music Classification}} by {{Large Audio Feature Space Extraction}}},
72+
author = {Eyben, Florian},
73+
year = {2016},
74+
series = {Springer {{Theses}}},
75+
pages = {xxii},
76+
publisher = {{Springer International Publishing}},
77+
address = {{Cham, Switzerland}},
78+
doi = {10.1007/978-3-319-27299-3},
79+
isbn = {978-3-319-27298-6 978-3-319-27299-3}
80+
}
81+
6982
@book{fMRI16,
7083
title = {{{fMRIPrep}}: {{A Robust Preprocessing Pipeline}} for {{fMRI Data}} \textemdash{} Fmriprep Stable Version Documentation},
7184
author = {{fMRIPrep developers}},

docs/_sources/user/func.rst

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,42 @@ Initial Preprocessing
5454
:start-at: motion_estimates_and_correction:
5555
:end-before: distortion_correction:
5656

57-
.. _motion_estimate_filter_valid_options:
58-
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:
60-
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-
======= =============== ====================== ====================== ==================== ==================== ==================
57+
.. _motion-estimate-filter-valid-options:
58+
59+
.. versionchanged:: 1.8.5
60+
Changed from single dictionary to ``filters`` list of dictionaries
61+
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:
63+
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+
.. rubric:: Note about abbreviation table
85+
86+
.. [#motion-filter-abbreviations] These abbreviations are based on :cite:`motionfilt-Eybe16` but modified to comply with :cite:`motionfilt-BIDS21`.
87+
88+
.. rubric:: References
89+
90+
.. bibliography::
91+
:cited:
92+
:keyprefix: motionfilt-
7093

7194

7295
Slice Timing Correction

0 commit comments

Comments
 (0)