nirspipe.pipeline.keep_spans#
A --keep-spans table written from condition names: one row per occurrence of each.
Module Contents#
Functions#
Every occurrence of |
API#
- nirspipe.pipeline.keep_spans.condition_spans(bids_dir: pathlib.Path, sub: str, conditions: list[str], duration: float | None = None, ses: str | None = None, task: str | None = None, run: str | None = None, validate: bool = False) list[dict[str, Any]]#
Every occurrence of
conditionsin one subject’s selected recordings, as --keep-spans rows.sub-01 task-mixed: "talk" at 20 s for 150 s, "listen" at 190 s, conditions ["talk"] -> [{"participant_id": "sub-01", "task": "mixed", "onset": 20.0, "duration": 150.0}]
Onsets are on each recording’s data axis, the axis --keep-spans reads.
durationsets every occurrence’s length; without it a zero-length occurrence is refused. A recording holding none of the conditions is refused, naming it.