Copy disabled (too large)
Download .txt
Showing preview only (34,975K chars total). Download the full file to get everything.
Repository: bids-standard/pybids
Branch: main
Commit: d76047584178
Files: 797
Total size: 33.2 MB
Directory structure:
gitextract_hu9a0df4/
├── .git-blame-ignore-revs
├── .gitattributes
├── .github/
│ ├── codespell_exclude_lines.txt
│ ├── codespell_ignore_words.txt
│ ├── dependabot.yml
│ ├── release-drafter.yml
│ └── workflows/
│ ├── build-test-deploy.yml
│ ├── codespell.yml
│ ├── docs.yml
│ └── prerelease.yml
├── .gitignore
├── .gitmodules
├── .mailmap
├── .pre-commit-config.yaml
├── .zenodo.json
├── CHANGELOG.rst
├── LICENSE
├── MANIFEST.in
├── README.md
├── codecov.yml
├── doc/
│ ├── Makefile
│ ├── _static/
│ │ └── theme_overrides.css
│ ├── _templates/
│ │ ├── class.rst
│ │ ├── function.rst
│ │ └── module.rst
│ ├── analysis/
│ │ └── index.rst
│ ├── api.rst
│ ├── conf.py
│ ├── examples/
│ │ ├── index.rst
│ │ ├── pybids_tutorial.md
│ │ ├── reports_tutorial.md
│ │ └── statsmodels_tutorial.md
│ ├── includes/
│ │ ├── big_toc_css.rst
│ │ └── bigger_toc_css.rst
│ ├── index.rst
│ ├── introduction.rst
│ ├── layout/
│ │ └── index.rst
│ ├── make.bat
│ ├── reports/
│ │ └── index.rst
│ ├── sphinxext/
│ │ ├── docscrape.py
│ │ ├── docscrape_sphinx.py
│ │ ├── github.py
│ │ ├── math_dollar.py
│ │ └── numpydoc.py
│ ├── tune_toc.rst
│ ├── user_guide.rst
│ └── whats_new.rst
├── long_description.rst
├── paper/
│ ├── paper.bib
│ └── paper.md
├── pyproject.toml
├── ruff.toml
├── schema_integration_demo.ipynb
├── setup.cfg
├── setup.py
├── src/
│ └── bids/
│ ├── __init__.py
│ ├── __main__.py
│ ├── _version.py
│ ├── cli.py
│ ├── config.py
│ ├── conftest.py
│ ├── due.py
│ ├── exceptions.py
│ ├── ext/
│ │ └── __init__.py
│ ├── external/
│ │ ├── __init__.py
│ │ └── inflect.py
│ ├── layout/
│ │ ├── README.md
│ │ ├── __init__.py
│ │ ├── config/
│ │ │ ├── bids.json
│ │ │ └── derivatives.json
│ │ ├── db.py
│ │ ├── index.py
│ │ ├── layout.py
│ │ ├── models.py
│ │ ├── tests/
│ │ │ ├── __init__.py
│ │ │ ├── conftest.py
│ │ │ ├── data/
│ │ │ │ └── sample_validation_config.json
│ │ │ ├── test_db.py
│ │ │ ├── test_layout.py
│ │ │ ├── test_layout_on_examples.py
│ │ │ ├── test_models.py
│ │ │ ├── test_path_building.py
│ │ │ ├── test_remote_bids.py
│ │ │ ├── test_rootpath.py
│ │ │ ├── test_schema_config.py
│ │ │ ├── test_schema_pattern_validation.py
│ │ │ ├── test_schema_version_differences.py
│ │ │ ├── test_schema_vs_json_config.py
│ │ │ ├── test_utils.py
│ │ │ ├── test_validation.py
│ │ │ └── test_writing.py
│ │ ├── utils.py
│ │ ├── validation.py
│ │ └── writing.py
│ ├── modeling/
│ │ ├── README.md
│ │ ├── __init__.py
│ │ ├── auto_model.py
│ │ ├── hrf.py
│ │ ├── model_spec.py
│ │ ├── report/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── report_template.jinja
│ │ │ ├── utils.py
│ │ │ └── viz.py
│ │ ├── statsmodels.py
│ │ ├── tests/
│ │ │ ├── __init__.py
│ │ │ ├── test_automodel.py
│ │ │ ├── test_hrf.py
│ │ │ ├── test_model_spec.py
│ │ │ ├── test_statsmodels.py
│ │ │ └── test_transformations.py
│ │ └── transformations/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── compute.py
│ │ └── munge.py
│ ├── reports/
│ │ ├── README.md
│ │ ├── __init__.py
│ │ ├── config/
│ │ │ └── converters.json
│ │ ├── conftest.py
│ │ ├── parameters.py
│ │ ├── parsing.py
│ │ ├── report.py
│ │ ├── tests/
│ │ │ ├── __init__.py
│ │ │ ├── test_parameters.py
│ │ │ ├── test_parsing.py
│ │ │ └── test_report.py
│ │ └── utils.py
│ ├── tests/
│ │ ├── __init__.py
│ │ ├── data/
│ │ │ └── images/
│ │ │ └── 4d.bval
│ │ ├── test_cli.py
│ │ ├── test_config.py
│ │ └── utils.py
│ ├── utils.py
│ └── variables/
│ ├── __init__.py
│ ├── collections.py
│ ├── entities.py
│ ├── io.py
│ ├── tests/
│ │ ├── __init__.py
│ │ ├── test_collections.py
│ │ ├── test_entities.py
│ │ ├── test_io.py
│ │ └── test_variables.py
│ └── variables.py
├── tests/
│ └── data/
│ ├── 7t_trt/
│ │ ├── README
│ │ ├── dataset_description.json
│ │ ├── participants.tsv
│ │ ├── sub-01/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-01_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-01_ses-1_run-2_phasediff.json
│ │ │ │ ├── func/
│ │ │ │ │ └── sub-01_ses-1_task-rest_acq-fullbrain_run-1_bold.json
│ │ │ │ └── sub-01_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-01_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-01_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-01_ses-2_scans.tsv
│ │ │ └── sub-01_sessions.tsv
│ │ ├── sub-02/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-02_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-02_ses-1_run-2_phasediff.json
│ │ │ │ └── sub-02_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-02_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-02_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-02_ses-2_scans.tsv
│ │ │ └── sub-02_sessions.tsv
│ │ ├── sub-03/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-03_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-03_ses-1_run-2_phasediff.json
│ │ │ │ └── sub-03_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-03_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-03_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-03_ses-2_scans.tsv
│ │ │ ├── sub-03-test.bval
│ │ │ └── sub-03_sessions.tsv
│ │ ├── sub-04/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-04_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-04_ses-1_run-2_phasediff.json
│ │ │ │ └── sub-04_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-04_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-04_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-04_ses-2_scans.tsv
│ │ │ └── sub-04_sessions.tsv
│ │ ├── sub-05/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-05_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-05_ses-1_run-2_phasediff.json
│ │ │ │ └── sub-05_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-05_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-05_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-05_ses-2_scans.tsv
│ │ │ └── sub-05_sessions.tsv
│ │ ├── sub-06/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-06_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-06_ses-1_run-2_phasediff.json
│ │ │ │ └── sub-06_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-06_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-06_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-06_ses-2_scans.tsv
│ │ │ └── sub-06_sessions.tsv
│ │ ├── sub-07/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-07_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-07_ses-1_run-2_phasediff.json
│ │ │ │ └── sub-07_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-07_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-07_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-07_ses-2_scans.tsv
│ │ │ └── sub-07_sessions.tsv
│ │ ├── sub-08/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-08_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-08_ses-1_run-2_phasediff.json
│ │ │ │ └── sub-08_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-08_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-08_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-08_ses-2_scans.tsv
│ │ │ └── sub-08_sessions.tsv
│ │ ├── sub-09/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-09_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-09_ses-1_run-2_phasediff.json
│ │ │ │ └── sub-09_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-09_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-09_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-09_ses-2_scans.tsv
│ │ │ └── sub-09_sessions.tsv
│ │ ├── sub-10/
│ │ │ ├── ses-1/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-10_ses-1_run-1_phasediff.json
│ │ │ │ │ └── sub-10_ses-1_run-2_phasediff.json
│ │ │ │ └── sub-10_ses-1_scans.tsv
│ │ │ ├── ses-2/
│ │ │ │ ├── fmap/
│ │ │ │ │ ├── sub-10_ses-2_run-1_phasediff.json
│ │ │ │ │ └── sub-10_ses-2_run-2_phasediff.json
│ │ │ │ └── sub-10_ses-2_scans.tsv
│ │ │ └── sub-10_sessions.tsv
│ │ ├── task-rest_acq-fullbrain_bold.json
│ │ ├── task-rest_acq-fullbrain_run-1_physio.json
│ │ ├── task-rest_acq-fullbrain_run-2_physio.json
│ │ ├── task-rest_acq-prefrontal_bold.json
│ │ ├── task-rest_acq-prefrontal_physio.json
│ │ └── test.bval
│ ├── bids_specs_with_oligarchy.json
│ ├── ds000117/
│ │ ├── .bidsignore
│ │ ├── CHANGES
│ │ ├── README
│ │ ├── acq-epi_T1w.json
│ │ ├── acq-mprage_T1w.json
│ │ ├── dataset_description.json
│ │ ├── participants.tsv
│ │ ├── run-1_echo-1_FLASH.json
│ │ ├── run-1_echo-2_FLASH.json
│ │ ├── run-1_echo-3_FLASH.json
│ │ ├── run-1_echo-4_FLASH.json
│ │ ├── run-1_echo-5_FLASH.json
│ │ ├── run-1_echo-6_FLASH.json
│ │ ├── run-1_echo-7_FLASH.json
│ │ ├── run-2_echo-1_FLASH.json
│ │ ├── run-2_echo-2_FLASH.json
│ │ ├── run-2_echo-3_FLASH.json
│ │ ├── run-2_echo-4_FLASH.json
│ │ ├── run-2_echo-5_FLASH.json
│ │ ├── run-2_echo-6_FLASH.json
│ │ ├── run-2_echo-7_FLASH.json
│ │ ├── sub-01/
│ │ │ ├── ses-meg/
│ │ │ │ ├── beh/
│ │ │ │ │ └── sub-01_ses-meg_task-facerecognition_events.tsv
│ │ │ │ ├── meg/
│ │ │ │ │ ├── sub-01_ses-meg_headshape.pos
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_proc-sss_coordsystem.json
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-01_proc-sss_events.tsv
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-01_proc-sss_meg.fif
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-02_proc-sss_events.tsv
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-02_proc-sss_meg.fif
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-03_proc-sss_events.tsv
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-03_proc-sss_meg.fif
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-04_proc-sss_events.tsv
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-04_proc-sss_meg.fif
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-05_proc-sss_events.tsv
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-05_proc-sss_meg.fif
│ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-06_proc-sss_events.tsv
│ │ │ │ │ └── sub-01_ses-meg_task-facerecognition_run-06_proc-sss_meg.fif
│ │ │ │ └── sub-01_ses-meg_scans.tsv
│ │ │ └── ses-mri/
│ │ │ ├── anat/
│ │ │ │ └── sub-01_ses-mri_acq-mprage_T1w.json
│ │ │ ├── dwi/
│ │ │ │ ├── sub-01_ses-mri_dwi.bval
│ │ │ │ ├── sub-01_ses-mri_dwi.bvec
│ │ │ │ └── sub-01_ses-mri_dwi.json
│ │ │ ├── fmap/
│ │ │ │ ├── sub-01_ses-mri_magnitude1.nii
│ │ │ │ ├── sub-01_ses-mri_magnitude2.nii
│ │ │ │ ├── sub-01_ses-mri_phasediff.json
│ │ │ │ └── sub-01_ses-mri_phasediff.nii
│ │ │ └── func/
│ │ │ ├── sub-01_ses-mri_task-facerecognition_run-01_events.tsv
│ │ │ ├── sub-01_ses-mri_task-facerecognition_run-02_events.tsv
│ │ │ ├── sub-01_ses-mri_task-facerecognition_run-03_events.tsv
│ │ │ ├── sub-01_ses-mri_task-facerecognition_run-04_events.tsv
│ │ │ ├── sub-01_ses-mri_task-facerecognition_run-05_events.tsv
│ │ │ ├── sub-01_ses-mri_task-facerecognition_run-06_events.tsv
│ │ │ ├── sub-01_ses-mri_task-facerecognition_run-07_events.tsv
│ │ │ ├── sub-01_ses-mri_task-facerecognition_run-08_events.tsv
│ │ │ └── sub-01_ses-mri_task-facerecognition_run-09_events.tsv
│ │ ├── sub-02/
│ │ │ ├── ses-meg/
│ │ │ │ ├── beh/
│ │ │ │ │ └── sub-02_ses-meg_task-facerecognition_events.tsv
│ │ │ │ ├── meg/
│ │ │ │ │ ├── sub-02_ses-meg_headshape.pos
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_coordsystem.json
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-01_events.tsv
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-01_meg.fif
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-02_events.tsv
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-02_meg.fif
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-03_events.tsv
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-03_meg.fif
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-04_events.tsv
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-04_meg.fif
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-05_events.tsv
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-05_meg.fif
│ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-06_events.tsv
│ │ │ │ │ └── sub-02_ses-meg_task-facerecognition_run-06_meg.fif
│ │ │ │ └── sub-02_ses-meg_scans.tsv
│ │ │ └── ses-mri/
│ │ │ ├── anat/
│ │ │ │ └── sub-02_ses-mri_acq-mprage_T1w.json
│ │ │ ├── dwi/
│ │ │ │ ├── sub-02_ses-mri_dwi.bval
│ │ │ │ ├── sub-02_ses-mri_dwi.bvec
│ │ │ │ └── sub-02_ses-mri_dwi.json
│ │ │ ├── fmap/
│ │ │ │ ├── sub-02_ses-mri_magnitude1.nii
│ │ │ │ ├── sub-02_ses-mri_magnitude2.nii
│ │ │ │ ├── sub-02_ses-mri_phasediff.json
│ │ │ │ └── sub-02_ses-mri_phasediff.nii
│ │ │ └── func/
│ │ │ ├── sub-02_ses-mri_task-facerecognition_run-01_events.tsv
│ │ │ ├── sub-02_ses-mri_task-facerecognition_run-02_events.tsv
│ │ │ ├── sub-02_ses-mri_task-facerecognition_run-03_events.tsv
│ │ │ ├── sub-02_ses-mri_task-facerecognition_run-04_events.tsv
│ │ │ ├── sub-02_ses-mri_task-facerecognition_run-05_events.tsv
│ │ │ ├── sub-02_ses-mri_task-facerecognition_run-06_events.tsv
│ │ │ ├── sub-02_ses-mri_task-facerecognition_run-07_events.tsv
│ │ │ ├── sub-02_ses-mri_task-facerecognition_run-08_events.tsv
│ │ │ └── sub-02_ses-mri_task-facerecognition_run-09_events.tsv
│ │ ├── sub-emptyroom/
│ │ │ ├── ses-20090409/
│ │ │ │ ├── meg/
│ │ │ │ │ └── sub-emptyroom_ses-20090409_task-noise_meg.fif
│ │ │ │ └── sub-emptyroom_ses-20090409_scans.tsv
│ │ │ ├── ses-20090506/
│ │ │ │ ├── meg/
│ │ │ │ │ └── sub-emptyroom_ses-20090506_task-noise_meg.fif
│ │ │ │ └── sub-emptyroom_ses-20090506_scans.tsv
│ │ │ ├── ses-20090511/
│ │ │ │ ├── meg/
│ │ │ │ │ └── sub-emptyroom_ses-20090511_task-noise_meg.fif
│ │ │ │ └── sub-emptyroom_ses-20090511_scans.tsv
│ │ │ ├── ses-20090515/
│ │ │ │ ├── meg/
│ │ │ │ │ └── sub-emptyroom_ses-20090515_task-noise_meg.fif
│ │ │ │ └── sub-emptyroom_ses-20090515_scans.tsv
│ │ │ ├── ses-20090518/
│ │ │ │ ├── meg/
│ │ │ │ │ └── sub-emptyroom_ses-20090518_task-noise_meg.fif
│ │ │ │ └── sub-emptyroom_ses-20090518_scans.tsv
│ │ │ ├── ses-20090601/
│ │ │ │ ├── meg/
│ │ │ │ │ └── sub-emptyroom_ses-20090601_task-noise_meg.fif
│ │ │ │ └── sub-emptyroom_ses-20090601_scans.tsv
│ │ │ ├── ses-20091126/
│ │ │ │ ├── meg/
│ │ │ │ │ └── sub-emptyroom_ses-20091126_task-noise_meg.fif
│ │ │ │ └── sub-emptyroom_ses-20091126_scans.tsv
│ │ │ └── ses-20091208/
│ │ │ ├── meg/
│ │ │ │ └── sub-emptyroom_ses-20091208_task-noise_meg.fif
│ │ │ └── sub-emptyroom_ses-20091208_scans.tsv
│ │ ├── task-facerecognition_beh.json
│ │ ├── task-facerecognition_bold.json
│ │ ├── task-facerecognition_channels.tsv
│ │ └── task-facerecognition_meg.json
│ ├── ds005/
│ │ ├── CHANGES
│ │ ├── README
│ │ ├── dataset_description.json
│ │ ├── derivatives/
│ │ │ ├── events/
│ │ │ │ ├── dataset_description.json
│ │ │ │ └── sub-01/
│ │ │ │ └── func/
│ │ │ │ └── sub-01_task-mixedgamblestask_run-01_desc-extra_events.tsv
│ │ │ └── fmriprep/
│ │ │ ├── dataset_description.json
│ │ │ ├── sub-01/
│ │ │ │ └── func/
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-01_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-02/
│ │ │ │ └── func/
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-02_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-03/
│ │ │ │ └── func/
│ │ │ │ ├── sub-03_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-03_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-03_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-03_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-03_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-03_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-03_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-03_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-03_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-04/
│ │ │ │ └── func/
│ │ │ │ ├── sub-04_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-04_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-04_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-04_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-04_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-04_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-04_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-04_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-04_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-05/
│ │ │ │ └── func/
│ │ │ │ ├── sub-05_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-05_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-05_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-05_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-05_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-05_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-05_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-05_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-05_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-06/
│ │ │ │ └── func/
│ │ │ │ ├── sub-06_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-06_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-06_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-06_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-06_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-06_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-06_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-06_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-06_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-07/
│ │ │ │ └── func/
│ │ │ │ ├── sub-07_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-07_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-07_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-07_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-07_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-07_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-07_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-07_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-07_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-08/
│ │ │ │ └── func/
│ │ │ │ ├── sub-08_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-08_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-08_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-08_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-08_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-08_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-08_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-08_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-08_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-09/
│ │ │ │ └── func/
│ │ │ │ ├── sub-09_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-09_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-09_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-09_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-09_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-09_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-09_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-09_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-09_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-10/
│ │ │ │ └── func/
│ │ │ │ ├── sub-10_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-10_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-10_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-10_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-10_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-10_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-10_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-10_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-10_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-11/
│ │ │ │ └── func/
│ │ │ │ ├── sub-11_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-11_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-11_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-11_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-11_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-11_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-11_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-11_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-11_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-12/
│ │ │ │ └── func/
│ │ │ │ ├── sub-12_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-12_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-12_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-12_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-12_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-12_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-12_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-12_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-12_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-13/
│ │ │ │ └── func/
│ │ │ │ ├── sub-13_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-13_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-13_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-13_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-13_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-13_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-13_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-13_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-13_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-14/
│ │ │ │ └── func/
│ │ │ │ ├── sub-14_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-14_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-14_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-14_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-14_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-14_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-14_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-14_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-14_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-15/
│ │ │ │ └── func/
│ │ │ │ ├── sub-15_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ │ ├── sub-15_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-15_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-15_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ │ ├── sub-15_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ │ ├── sub-15_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ │ ├── sub-15_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ │ ├── sub-15_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ │ └── sub-15_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ └── sub-16/
│ │ │ └── func/
│ │ │ ├── sub-16_task-mixedgamblestask_run-01_desc-preproc_timeseries.json
│ │ │ ├── sub-16_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv
│ │ │ ├── sub-16_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-16_task-mixedgamblestask_run-02_desc-preproc_timeseries.json
│ │ │ ├── sub-16_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv
│ │ │ ├── sub-16_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ │ ├── sub-16_task-mixedgamblestask_run-03_desc-preproc_timeseries.json
│ │ │ ├── sub-16_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv
│ │ │ └── sub-16_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json
│ │ ├── ds005_onsets.json
│ │ ├── dwi.bval
│ │ ├── dwi.bvec
│ │ ├── models/
│ │ │ ├── ds-005_type-interceptonlyrunlevel_model.json
│ │ │ ├── ds-005_type-mfx_model.json
│ │ │ ├── ds-005_type-test_intercept.json
│ │ │ ├── ds-005_type-test_model.json
│ │ │ ├── ds-005_type-testnodummy_model.json
│ │ │ └── extras/
│ │ │ └── ds-005_type-test_model.json
│ │ ├── participants.tsv
│ │ ├── sub-01/
│ │ │ ├── func/
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_events.json
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_events.tsv
│ │ │ │ ├── sub-01_task-mixedgamblestask_run-02_events.tsv
│ │ │ │ └── sub-01_task-mixedgamblestask_run-03_events.tsv
│ │ │ └── sub-01_scans.tsv
│ │ ├── sub-02/
│ │ │ ├── func/
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-01_events.tsv
│ │ │ │ ├── sub-02_task-mixedgamblestask_run-02_events.tsv
│ │ │ │ └── sub-02_task-mixedgamblestask_run-03_events.tsv
│ │ │ └── sub-02_scans.tsv
│ │ ├── sub-03/
│ │ │ └── func/
│ │ │ ├── sub-03_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-03_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-03_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-04/
│ │ │ └── func/
│ │ │ ├── sub-04_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-04_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-04_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-05/
│ │ │ └── func/
│ │ │ ├── sub-05_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-05_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-05_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-06/
│ │ │ └── func/
│ │ │ ├── sub-06_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-06_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-06_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-07/
│ │ │ └── func/
│ │ │ ├── sub-07_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-07_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-07_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-08/
│ │ │ └── func/
│ │ │ ├── sub-08_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-08_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-08_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-09/
│ │ │ └── func/
│ │ │ ├── sub-09_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-09_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-09_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-10/
│ │ │ └── func/
│ │ │ ├── sub-10_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-10_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-10_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-11/
│ │ │ ├── dwi/
│ │ │ │ └── sub-11
│ │ │ └── func/
│ │ │ ├── sub-11_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-11_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-11_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-12/
│ │ │ └── func/
│ │ │ ├── sub-12_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-12_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-12_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-13/
│ │ │ └── func/
│ │ │ ├── sub-13_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-13_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-13_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-14/
│ │ │ └── func/
│ │ │ ├── sub-14_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-14_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-14_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-15/
│ │ │ └── func/
│ │ │ ├── sub-15_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-15_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-15_task-mixedgamblestask_run-03_events.tsv
│ │ ├── sub-16/
│ │ │ └── func/
│ │ │ ├── sub-16_task-mixedgamblestask_run-01_events.tsv
│ │ │ ├── sub-16_task-mixedgamblestask_run-02_events.tsv
│ │ │ └── sub-16_task-mixedgamblestask_run-03_events.tsv
│ │ └── task-mixedgamblestask_bold.json
│ ├── ds005_conflict/
│ │ ├── dataset_description.json
│ │ └── sub-01/
│ │ └── func/
│ │ ├── sub-01_task-mixedgamblestask_run-01_events.json
│ │ ├── sub-01_task-mixedgamblestask_run-01_events.tsv
│ │ ├── sub-01_task-mixedgamblestask_run-02_events.tsv
│ │ └── sub-01_task-mixedgamblestask_run-03_events.tsv
│ ├── ds005_derivs/
│ │ ├── dummy/
│ │ │ └── dataset_description.json
│ │ ├── dummy-vx.x.x/
│ │ │ └── dataset_description.json
│ │ ├── format_errs/
│ │ │ ├── no_dataset_type/
│ │ │ │ └── dataset_description.json
│ │ │ ├── no_pipeline_description/
│ │ │ │ └── dataset_description.json
│ │ │ └── no_type_or_description/
│ │ │ └── dataset_description.json
│ │ └── other/
│ │ └── dummy/
│ │ └── dataset_description.json
│ └── synthetic/
│ ├── T1w.json
│ ├── code/
│ │ ├── create_synthetic_ds.sh
│ │ ├── dwi.bval
│ │ └── dwi.bvec
│ ├── dataset_description.json
│ ├── derivatives/
│ │ └── fmriprep/
│ │ ├── dataset_description.json
│ │ ├── sub-01/
│ │ │ ├── ses-01/
│ │ │ │ └── func/
│ │ │ │ ├── sub-01_ses-01_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-01_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-01_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-01_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-01_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-01_ses-01_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-01_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-01_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-01_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-01_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-01_ses-01_task-rest_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-01_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-01_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-01_ses-01_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ │ └── sub-01_ses-01_task-rest_space-T1w_desc-preproc_bold.nii
│ │ │ └── ses-02/
│ │ │ └── func/
│ │ │ ├── sub-01_ses-02_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ ├── sub-01_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-01_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-01_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-01_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-01_ses-02_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ ├── sub-01_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-01_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-01_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-01_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-01_ses-02_task-rest_desc-confounds_regressors.tsv
│ │ │ ├── sub-01_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-01_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-01_ses-02_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ └── sub-01_ses-02_task-rest_space-T1w_desc-preproc_bold.nii
│ │ ├── sub-02/
│ │ │ ├── ses-01/
│ │ │ │ └── func/
│ │ │ │ ├── sub-02_ses-01_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-02_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-02_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-02_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-02_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-02_ses-01_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-02_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-02_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-02_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-02_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-02_ses-01_task-rest_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-02_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-02_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-02_ses-01_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ │ └── sub-02_ses-01_task-rest_space-T1w_desc-preproc_bold.nii
│ │ │ └── ses-02/
│ │ │ └── func/
│ │ │ ├── sub-02_ses-02_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ ├── sub-02_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-02_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-02_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-02_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-02_ses-02_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ ├── sub-02_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-02_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-02_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-02_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-02_ses-02_task-rest_desc-confounds_regressors.tsv
│ │ │ ├── sub-02_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-02_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-02_ses-02_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ └── sub-02_ses-02_task-rest_space-T1w_desc-preproc_bold.nii
│ │ ├── sub-03/
│ │ │ ├── ses-01/
│ │ │ │ └── func/
│ │ │ │ ├── sub-03_ses-01_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-03_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-03_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-03_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-03_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-03_ses-01_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-03_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-03_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-03_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-03_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-03_ses-01_task-rest_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-03_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-03_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-03_ses-01_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ │ └── sub-03_ses-01_task-rest_space-T1w_desc-preproc_bold.nii
│ │ │ └── ses-02/
│ │ │ └── func/
│ │ │ ├── sub-03_ses-02_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ ├── sub-03_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-03_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-03_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-03_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-03_ses-02_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ ├── sub-03_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-03_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-03_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-03_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-03_ses-02_task-rest_desc-confounds_regressors.tsv
│ │ │ ├── sub-03_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-03_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-03_ses-02_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ └── sub-03_ses-02_task-rest_space-T1w_desc-preproc_bold.nii
│ │ ├── sub-04/
│ │ │ ├── ses-01/
│ │ │ │ └── func/
│ │ │ │ ├── sub-04_ses-01_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-04_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-04_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-04_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-04_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-04_ses-01_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-04_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-04_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-04_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-04_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-04_ses-01_task-rest_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-04_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-04_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-04_ses-01_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ │ └── sub-04_ses-01_task-rest_space-T1w_desc-preproc_bold.nii
│ │ │ └── ses-02/
│ │ │ └── func/
│ │ │ ├── sub-04_ses-02_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ ├── sub-04_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-04_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-04_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-04_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-04_ses-02_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ ├── sub-04_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-04_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-04_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-04_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-04_ses-02_task-rest_desc-confounds_regressors.tsv
│ │ │ ├── sub-04_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-04_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-04_ses-02_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ └── sub-04_ses-02_task-rest_space-T1w_desc-preproc_bold.nii
│ │ ├── sub-05/
│ │ │ ├── ses-01/
│ │ │ │ └── func/
│ │ │ │ ├── sub-05_ses-01_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-05_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-05_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-05_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-05_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-05_ses-01_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-05_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-05_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-05_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ │ ├── sub-05_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ │ ├── sub-05_ses-01_task-rest_desc-confounds_regressors.tsv
│ │ │ │ ├── sub-05_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ │ ├── sub-05_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ │ ├── sub-05_ses-01_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ │ └── sub-05_ses-01_task-rest_space-T1w_desc-preproc_bold.nii
│ │ │ └── ses-02/
│ │ │ └── func/
│ │ │ ├── sub-05_ses-02_task-nback_run-01_desc-confounds_regressors.tsv
│ │ │ ├── sub-05_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-05_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-05_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-05_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-05_ses-02_task-nback_run-02_desc-confounds_regressors.tsv
│ │ │ ├── sub-05_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-05_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-05_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii
│ │ │ ├── sub-05_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii
│ │ │ ├── sub-05_ses-02_task-rest_desc-confounds_regressors.tsv
│ │ │ ├── sub-05_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii
│ │ │ ├── sub-05_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii
│ │ │ ├── sub-05_ses-02_task-rest_space-T1w_desc-brain_mask.nii
│ │ │ └── sub-05_ses-02_task-rest_space-T1w_desc-preproc_bold.nii
│ │ ├── task-nback_bold.json
│ │ └── task-rest_bold.json
│ ├── dwi.json
│ ├── participants.tsv
│ ├── sub-01/
│ │ ├── ses-01/
│ │ │ ├── anat/
│ │ │ │ └── sub-01_ses-01_T1w.nii
│ │ │ ├── dwi/
│ │ │ │ ├── sub-01_ses-01_dwi.bval
│ │ │ │ └── sub-01_ses-01_dwi.bvec
│ │ │ ├── fmap/
│ │ │ │ └── sub-01_ses-01_phasediff.json
│ │ │ ├── func/
│ │ │ │ ├── sub-01_ses-01_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-01_ses-01_task-nback_run-02_bold.nii
│ │ │ │ └── sub-01_ses-01_task-rest_bold.nii
│ │ │ └── sub-01_ses-01_scans.tsv
│ │ ├── ses-02/
│ │ │ ├── anat/
│ │ │ │ └── sub-01_ses-02_T1w.nii
│ │ │ ├── func/
│ │ │ │ ├── sub-01_ses-02_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-01_ses-02_task-nback_run-02_bold.nii
│ │ │ │ └── sub-01_ses-02_task-rest_bold.nii
│ │ │ └── sub-01_ses-02_scans.tsv
│ │ └── sub-01_sessions.tsv
│ ├── sub-02/
│ │ ├── ses-01/
│ │ │ ├── anat/
│ │ │ │ └── sub-02_ses-01_T1w.nii
│ │ │ ├── dwi/
│ │ │ │ ├── sub-02_ses-01_dwi.bval
│ │ │ │ └── sub-02_ses-01_dwi.bvec
│ │ │ ├── fmap/
│ │ │ │ └── sub-02_ses-01_phasediff.json
│ │ │ ├── func/
│ │ │ │ ├── sub-02_ses-01_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-02_ses-01_task-nback_run-02_bold.nii
│ │ │ │ └── sub-02_ses-01_task-rest_bold.nii
│ │ │ └── sub-02_ses-01_scans.tsv
│ │ ├── ses-02/
│ │ │ ├── anat/
│ │ │ │ └── sub-02_ses-02_T1w.nii
│ │ │ ├── func/
│ │ │ │ ├── sub-02_ses-02_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-02_ses-02_task-nback_run-02_bold.nii
│ │ │ │ └── sub-02_ses-02_task-rest_bold.nii
│ │ │ └── sub-02_ses-02_scans.tsv
│ │ └── sub-02_sessions.tsv
│ ├── sub-03/
│ │ ├── ses-01/
│ │ │ ├── anat/
│ │ │ │ └── sub-03_ses-01_T1w.nii
│ │ │ ├── dwi/
│ │ │ │ ├── sub-03_ses-01_dwi.bval
│ │ │ │ └── sub-03_ses-01_dwi.bvec
│ │ │ ├── fmap/
│ │ │ │ └── sub-03_ses-01_phasediff.json
│ │ │ ├── func/
│ │ │ │ ├── sub-03_ses-01_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-03_ses-01_task-nback_run-02_bold.nii
│ │ │ │ └── sub-03_ses-01_task-rest_bold.nii
│ │ │ └── sub-03_ses-01_scans.tsv
│ │ ├── ses-02/
│ │ │ ├── anat/
│ │ │ │ └── sub-03_ses-02_T1w.nii
│ │ │ ├── func/
│ │ │ │ ├── sub-03_ses-02_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-03_ses-02_task-nback_run-02_bold.nii
│ │ │ │ └── sub-03_ses-02_task-rest_bold.nii
│ │ │ └── sub-03_ses-02_scans.tsv
│ │ └── sub-03_sessions.tsv
│ ├── sub-04/
│ │ ├── ses-01/
│ │ │ ├── anat/
│ │ │ │ └── sub-04_ses-01_T1w.nii
│ │ │ ├── dwi/
│ │ │ │ ├── sub-04_ses-01_dwi.bval
│ │ │ │ └── sub-04_ses-01_dwi.bvec
│ │ │ ├── fmap/
│ │ │ │ └── sub-04_ses-01_phasediff.json
│ │ │ ├── func/
│ │ │ │ ├── sub-04_ses-01_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-04_ses-01_task-nback_run-02_bold.nii
│ │ │ │ └── sub-04_ses-01_task-rest_bold.nii
│ │ │ └── sub-04_ses-01_scans.tsv
│ │ ├── ses-02/
│ │ │ ├── anat/
│ │ │ │ └── sub-04_ses-02_T1w.nii
│ │ │ ├── func/
│ │ │ │ ├── sub-04_ses-02_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-04_ses-02_task-nback_run-02_bold.nii
│ │ │ │ └── sub-04_ses-02_task-rest_bold.nii
│ │ │ └── sub-04_ses-02_scans.tsv
│ │ └── sub-04_sessions.tsv
│ ├── sub-05/
│ │ ├── ses-01/
│ │ │ ├── anat/
│ │ │ │ └── sub-05_ses-01_T1w.nii
│ │ │ ├── dwi/
│ │ │ │ ├── sub-05_ses-01_dwi.bval
│ │ │ │ └── sub-05_ses-01_dwi.bvec
│ │ │ ├── fmap/
│ │ │ │ └── sub-05_ses-01_phasediff.json
│ │ │ ├── func/
│ │ │ │ ├── sub-05_ses-01_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-05_ses-01_task-nback_run-02_bold.nii
│ │ │ │ └── sub-05_ses-01_task-rest_bold.nii
│ │ │ └── sub-05_ses-01_scans.tsv
│ │ ├── ses-02/
│ │ │ ├── anat/
│ │ │ │ └── sub-05_ses-02_T1w.nii
│ │ │ ├── func/
│ │ │ │ ├── sub-05_ses-02_task-nback_run-01_bold.nii
│ │ │ │ ├── sub-05_ses-02_task-nback_run-02_bold.nii
│ │ │ │ └── sub-05_ses-02_task-rest_bold.nii
│ │ │ └── sub-05_ses-02_scans.tsv
│ │ └── sub-05_sessions.tsv
│ ├── task-nback_bold.json
│ ├── task-nback_events.tsv
│ ├── task-nback_physio.json
│ ├── task-nback_stim.json
│ ├── task-rest_bold.json
│ └── task-rest_physio.json
├── tools/
│ ├── check_noqa_budget.py
│ ├── prep_zenodo.py
│ ├── update_changes.sh
│ └── update_requirements.py
└── tox.ini
================================================
FILE CONTENTS
================================================
================================================
FILE: .git-blame-ignore-revs
================================================
# 2026-03-07 14:05:31 -0500 - markiewicz@stanford.edu - sty: Clean up trailing whitespace [ignore-rev]
b1ce2c83fdc83e94ef772159d298ca7961dfe629
================================================
FILE: .gitattributes
================================================
src/bids/_version.py export-subst
================================================
FILE: .github/codespell_exclude_lines.txt
================================================
"/RADME", # wrong filename
"/CANGES", # wrong filename
"/dataset_descrption.json", # wrong filename
"/dataset_description.jon", # wrong extension
"/participants.sv", # wrong extension
"/participnts.tsv", # wrong filename
"/particpants.json" # wrong filename
"/participants.son" # wrong extension
================================================
FILE: .github/codespell_ignore_words.txt
================================================
complies
nin
nwe
te
================================================
FILE: .github/dependabot.yml
================================================
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
actions-infrastructure:
patterns:
- "actions/*"
- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: uv
directory: "/"
schedule:
interval: weekly
groups:
uv:
patterns:
- "*"
================================================
FILE: .github/release-drafter.yml
================================================
template: |
## Release Notes
## CHANGES
$CHANGES
================================================
FILE: .github/workflows/build-test-deploy.yml
================================================
name: Python
on:
push:
branches:
- main
- maint/*
tags:
- '*'
pull_request: {}
schedule:
# 8am EST / 9am EDT Mondays
- cron: '0 13 * * 1'
# Allow job to be triggered manually from GitHub interface
workflow_dispatch:
defaults:
run:
shell: bash
# Force tox and pytest to use color
env:
FORCE_COLOR: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: Build & verify package
runs-on: ubuntu-latest
permissions:
attestations: write
id-token: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
with:
attest-build-provenance-github: ${{ github.event_name != 'pull_request' }}
test:
# Check each OS, all supported Python, minimum versions and latest releases
name: Test
runs-on: ${{ matrix.os }}
needs: [build]
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
dependencies: ['full']
source: ['repo']
include:
- os: ubuntu-latest
python-version: '3.10'
dependencies: min
source: 'repo'
- os: ubuntu-latest
python-version: '3'
dependencies: full
source: 'sdist'
fail-fast: false
env:
DEPENDS: ${{ matrix.dependencies }}
steps:
- uses: actions/checkout@v6
if: matrix.source == 'repo'
with:
submodules: recursive
fetch-depth: 0
- name: Download packages built by build-and-inspect-python-package
if: matrix.source == 'sdist'
uses: actions/download-artifact@v8
with:
name: Packages
path: dist
- name: Extract sdist
if: matrix.source == 'sdist'
run: tar --strip-components=1 -xzf dist/*.tar.gz
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install tox
run: |
uv tool install tox --with=tox-uv --with=tox-gh-actions
- name: Show tox config
run: tox c
- name: Run tox
run: tox -v --exit-and-dump-after 1200
- uses: codecov/codecov-action@v6
if: ${{ always() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-publish:
name: Push package to test.pypi.org
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: [build]
permissions:
attestations: write
id-token: write
steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v8
with:
name: Packages
path: dist
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
publish:
name: Publish released package to pypi.org
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [test, test-publish]
permissions:
attestations: write
id-token: write
steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v8
with:
name: Packages
path: dist
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
================================================
FILE: .github/workflows/codespell.yml
================================================
---
name: Codespell
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: codespell-project/actions-codespell@master
================================================
FILE: .github/workflows/docs.yml
================================================
name: Documentation
on:
push:
branches:
- main
- maint/*
- rel/*
- docs/*
tags:
- '*'
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
# Force tox to use color
env:
FORCE_COLOR: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: '3.11'
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Build documentation
run: pipx run tox -e docs
- name: Upload docs as artifacts
uses: actions/upload-artifact@v7
with:
path: doc/_build/html
- name: Deploy (on tags)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/_build/html
force_orphan: true
user_name: "BIDS Maintenance"
user_email: bids-maintenance@gmail.com
================================================
FILE: .github/workflows/prerelease.yml
================================================
name: Pre-release
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# 8am EST / 9am EDT Mondays
- cron: '0 13 * * 1'
# Allow job to be triggered manually from GitHub interface
workflow_dispatch:
defaults:
run:
shell: bash
# Force tox and pytest to use color
env:
FORCE_COLOR: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: Test
if: |
github.event_name != 'pull_request'
|| contains(github.event.pull_request.labels.*.name, 'prerelease')
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: ['3.12', '3.13', '3.14']
fail-fast: false
permissions:
actions: write
env:
DEPENDS: pre
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install tox
run: |
uv tool install tox --with=tox-uv --with=tox-gh-actions
- name: Show tox config
run: tox c
- name: Run tox
run: tox -v --exit-and-dump-after 1200
- uses: codecov/codecov-action@v6
if: ${{ always() }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
================================================
FILE: .gitignore
================================================
historical/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
**/*.egg-info
.installed.cfg
*.egg
pip-wheel-metadata/
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
cov.xml
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
.ipynb
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# dotenv
.env
# virtualenv
venv/
ENV/
# Pipenv
Pipfile
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject
*.DS_Store
*.orig
# Sphinx
doc/_build/
doc/auto_examples/
doc/gen_modules/
doc/generated/
# Pytest
.pytest_cache/
# Vim
.*.sw[op]
# Emacs and others
*~
.vscode
# Ignore test sql database files
bidsdb.sqlite
fmriprep.sqlite
================================================
FILE: .gitmodules
================================================
[submodule "bids-examples"]
path = bids-examples
url = https://github.com/bids-standard/bids-examples.git
branch = master
================================================
FILE: .mailmap
================================================
Alejandro de la Vega <delavega@utexas.edu>
Alejandro de la Vega <delavega@utexas.edu> <aleph4@gmail.com>
Alejandro de la Vega <delavega@utexas.edu> <adelavega@users.noreply.github.com>
Alexander Ivanov <alexander.radievich@gmail.com>
Alexis Thual <alexisthual@gmail.com>
Ali Khan <alik@robarts.ca>
Ali Khan <alik@robarts.ca> <akhanf@users.noreply.github.com>
Ankur Sinha <sanjay.ankur@gmail.com>
Antonin Rovai <81312414+arovai@users.noreply.github.com>
Ariel Rokem <arokem@gmail.com>
Basile Pinsard <basile.pinsard@gmail.com>
Bertrand Thirion <bertrand.thirion@inria.fr>
Christopher J. Markiewicz <markiewicz@stanford.edu>
Christopher J. Markiewicz <markiewicz@stanford.edu> <effigies@gmail.com>
Christopher J. Markiewicz <markiewicz@stanford.edu> <effigies@users.noreply.github.com>
Chris Holdgraf <choldgraf@berkeley.edu>
Chris Holdgraf <choldgraf@berkeley.edu> <choldgraf@gmail.com>
Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Dylan M. Nielson <Dylan.Nielson@nih.gov>
Dylan M. Nielson <Dylan.Nielson@nih.gov> <adenosine@gmail.com>
Evgenii Kalenkovich <e.kalenkovich@gmail.com>
Gal Ben-Zvi <benzvigal@gmail.com>
Gregory Kiar <greg.kiar@mail.mcgill.ca> <gkiar07@gmail.com>
Hans Johnson <hans.j.johnson@gmail.com>
Hans Johnson <hans.j.johnson@gmail.com> <hans-johnson@uiowa.edu>
Isla Staden <islastaden@gmail.com> <islastaden@gmail.com>
James D. Kent <james-kent@uiowa.edu>
James D. Kent <james-kent@uiowa.edu> <jamesdkent21@gmail.com>
Johannes Wennberg <johanneswennberg@gmail.com>
Jon Haitz Legarreta <jon.haitz.legarreta@gmail.com>
Krzysztof J. Gorgolewski <krzysztof.gorgolewski@gmail.com>
Lee S. Tirrell <tirrell.le@gmail.com>
Lee S. Tirrell <tirrell.le@gmail.com> <ltirrell@corticometrics.com>
Mainak Jas <mainakjas@gmail.com>
Matteo Visconti di Oleggio Castello <matteo.visconti.gr@dartmouth.edu>
Mathias Goncalves <mathiasg@stanford.edu>
Mathias Goncalves <mathiasg@stanford.edu> Mathias Goncalves <goncalves.mathias@gmail.com>
Michael Philipp Notter <michaelnotter@hotmail.com>
Nick Guenther <nick.guenther@polymtl.ca>
Oscar Esteban <code@oscaresteban.es>
Philip A Cook <cookpa@pennmedicine.upenn.edu>
Satrajit Ghosh <satra@mit.edu>
Satrajit Ghosh <satra@mit.edu> <satrajit.ghosh@gmail.com>
Steven Tilley II <stilley@hollandbloorview.ca>
Steven Tilley II <stilley@hollandbloorview.ca> <steve@steventilley.com>
Tal Yarkoni <tyarkoni@gmail.com>
Taylor Salo <salot@pennmedicine.upenn.edu>
Taylor Salo <salot@pennmedicine.upenn.edu> <tsalo006@fiu.edu>
Yaroslav O. Halchenko <debian@onerussian.com>
================================================
FILE: .pre-commit-config.yaml
================================================
ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: .gitignore
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff-check
args: [ "--fix", "--show-fixes"]
- id: ruff-format
================================================
FILE: .zenodo.json
================================================
{
"title": "PyBIDS: Python tools for BIDS datasets",
"description": "PyBIDS is a Python library to centralize interactions with datasets conforming BIDS (Brain Imaging Data Structure) format. For more information about BIDS visit <a href=\"https://bids.neuroimaging.io\">bids.neuroimaging.io</a>.",
"creators": [
{
"affiliation": "University of Texas at Austin",
"name": "Yarkoni, Tal",
"orcid": "0000-0002-6558-5113"
},
{
"affiliation": "Stanford University",
"name": "Markiewicz, Christopher J.",
"orcid": "0000-0002-6533-164X"
},
{
"affiliation": "University of Texas at Austin",
"name": "de la Vega, Alejandro",
"orcid": "0000-0001-9062-3778"
},
{
"affiliation": "Department of Psychology, Stanford University",
"name": "Gorgolewski, Krzysztof J.",
"orcid": "0000-0003-3321-7583"
},
{
"affiliation": "University of Pennsylvania",
"name": "Salo, Taylor",
"orcid": "0000-0001-9813-3167"
},
{
"affiliation": "Université catholique de Louvain",
"name": "Gau, Remi",
"orcid": "0000-0002-1535-9767"
},
{
"affiliation": "Dartmouth College",
"name": "Halchenko, Yaroslav O.",
"orcid": "0000-0003-3456-2493"
},
{
"affiliation": "CEA",
"name": "Papadopoulos Orfanos, Dimitri",
"orcid": "0000-0002-1242-8990"
},
{
"affiliation": "Department of Psychology, Stanford University",
"name": "Esteban, Oscar",
"orcid": "0000-0001-8435-6191"
},
{
"affiliation": "University of Texas at Austin",
"name": "McNamara, Quinten"
},
{
"affiliation": "University of Texas at Austin",
"name": "Kent, James D.",
"orcid": "0000-0002-4892-2659"
},
{
"affiliation": "University of Oregon",
"name": "DeStasio, Krista",
"orcid": "0000-0002-3959-9060"
},
{
"affiliation": "McGill University",
"name": "Poline, Jean-Baptiste",
"orcid": "0000-0002-9794-749X"
},
{
"affiliation": "University of Iowa",
"name": "Johnson, Hans",
"orcid": "0000-0001-9513-2660"
},
{
"name": "Kalenkovich, Evgenii",
"orcid": "0000-0002-4606-4179"
},
{
"affiliation": "Institute for Problems of Information Transmission",
"name": "Petrov, Dmitry"
},
{
"affiliation": "National Institute of Mental Health",
"name": "Nielson, Dylan M.",
"orcid": "0000-0003-4613-6643"
},
{
"affiliation": "Department of Psychology, Stanford University",
"name": "Goncalves, Mathias",
"orcid": "0000-0002-7252-7771"
},
{
"affiliation": "Center for Adaptive Rationality, Max Planck Institute for Human Development, Berlin, Germany",
"name": "Appelhoff, Stefan",
"orcid": "0000-0001-8002-0877"
},
{
"affiliation": "Western University, London, ON, CA",
"name": "Van Dyken, Peter",
"orcid": "0000-0001-7357-5815"
},
{
"name": "Bansal, Shashank",
"affiliation": "Stanford University",
"orcid": "0000-0002-1252-8772 "
},
{
"affiliation": "Concordia University",
"name": "Hayot-Sasson, Valérie",
"orcid": "0000-0002-4830-4535"
},
{
"name": "Stewart, Ashley"
},
{
"affiliation": "MRC Cognition and Brain Sciences Unit",
"name": "Carlin, Johan",
"orcid": "0000-0003-0933-1239"
},
{
"affiliation": "Montreal Neurological Institute and Hospital",
"name": "Kiar, Gregory",
"orcid": "0000-0001-8915-496X"
},
{
"affiliation": "Alan Turing Institute; Department of Psychiatry, University of Cambridge",
"name": "Whitaker, Kirstie",
"orcid": "0000-0001-8498-4059"
},
{
"affiliation": "MIT, HMS",
"name": "Ghosh, Satrajit",
"orcid": "0000-0002-5312-6729"
},
{
"affiliation": "Psychoinformatics Lab, Institute of Psychology, Otto-von-Guericke University Magdeburg",
"name": "Wagner, Adina",
"orcid": "0000-0003-2917-3450"
},
{
"affiliation": "Montreal Neurological Institute and Hospital",
"name": "DuPre, Elizabeth",
"orcid": "0000-0003-1358-196X"
},
{
"name": "Khan, Ali",
"orcid": "0000-0002-0760-8647"
},
{
"name": "Janke, Andrew",
"orcid": "0000-0002-6314-9027"
},
{
"affiliation": "University of Pennsylvania",
"name": "Cook, Philip A",
"orcid": "0000-0002-1985-8475"
},
{
"name": "Ivanov, Alexander"
},
{
"affiliation": "Australian eHealth Research Centre, Commonwealth Scientific and Industrial Research Organisation; University of Queensland",
"name": "Gillman, Ashley",
"orcid": "0000-0001-9130-1092"
},
{
"affiliation": "KTH Royal Institute of Technology",
"name": "Wennberg, Johannes"
},
{
"affiliation": "CorticoMetrics LLC",
"name": "Tirrell, Lee S.",
"orcid": "0000-0001-9393-8361"
},
{
"affiliation": "Holland Bloorview Kids Rehabilitation Hospital",
"name": "Tilley II, Steven",
"orcid": "0000-0003-4853-5082"
},
{
"name": "Li, Adam",
"affiliation": "Institute for Computational Medicine, Johns Hopkins University, Baltimore, MD, USA",
"orcid": "0000-0001-8421-365X"
},
{
"affiliation": "Child Mind Institute",
"name": "Erkent, Alp",
"orcid": "0000-0002-8820-4782"
},
{
"affiliation": "University of Montréal, Montréal, Canada",
"name": "Pinsard, Basile",
"orcid": "0000-0002-4391-3075"
},
{
"affiliation": "Stanford University",
"name": "Mumford, Jeanette",
"orcid": "0000-0002-0926-3531"
},
{
"affiliation": "Université de Sherbrooke",
"name": "Legarreta, Jon Haitz",
"orcid": "0000-0002-9661-1396"
},
{
"affiliation": "Charite Universitatsmedizin Berlin, Germany",
"name": "Waller, Lea",
"orcid": "0000-0002-3239-6957"
},
{
"affiliation": "Télécom ParisTech, France",
"name": "Jas, Mainak",
"orcid": "0000-0002-3199-9027"
},
{
"affiliation": "Otto-von-Guericke-University Magdeburg, Germany",
"name": "Hanke, Michael",
"orcid": "0000-0001-6398-6370"
},
{
"affiliation": "Polytechnique Montréal",
"name": "Guenther, Nick"
},
{
"affiliation": "Stanford University",
"name": "Poldrack, Russell",
"orcid": "0000-0001-6755-0259"
},
{
"affiliation": "The University of Washington eScience Institute",
"name": "Rokem, Ariel",
"orcid": "0000-0003-0679-1985"
},
{
"affiliation": "Ottawa Hospital Research Institute",
"name": "Boulay, Chadwick",
"orcid": "0000-0003-1747-3931"
},
{
"affiliation": "CEA, Inria",
"name": "Thual, Alexis"
},
{
"affiliation": "Berkeley Institute for Data Science; University of California at Berkeley",
"name": "Holdgraf, Chris",
"orcid": "0000-0002-2391-0678"
},
{
"affiliation": "Queen Mary University London",
"name": "Staden, Isla",
"orcid": "0000-0002-0795-1154"
},
{
"name": "Staph, Jason A.",
"orcid": "0000-0002-5226-3350"
},
{
"affiliation": "Brigham and Women's Hospital",
"name": "Drew, William",
"orcid": "0000-0002-9178-8731"
},
{
"affiliation": "University College London",
"name": "Sinha, Ankur",
"orcid": "0000-0001-7568-7167"
},
{
"affiliation": "National Institutes of Health",
"name": "Galassi, Anthony",
"orcid": "0000-0001-6550-4574"
},
{
"affiliation": "Université Libre de Bruxelles - Hôpital Erasme",
"name": "Rovai, Antonin",
"orcid": "0000-0001-6781-5341"
},
{
"affiliation": "University of Pennsylvania",
"name": "Adebimpe, Azeez",
"orcid": "0000-0001-9049-0135"
},
{
"affiliation": "INRIA",
"name": "Thirion, Bertrand",
"orcid": "0000-0001-5018-7895"
},
{
"affiliation": "Univ Rennes, Inria, CNRS, Inserm",
"name": "Clénet, Boris",
"orcid": "0009-0006-7727-5100"
},
{
"affiliation": "Stanford University",
"name": "Shain, Cory",
"orcid": "0000-0002-2704-7197"
},
{
"affiliation": "Rutgers University",
"name": "Kleinschmidt, Dave F.",
"orcid": "0000-0002-7442-2762"
},
{
"name": "Ferdman, Emmanuel",
"orcid": "0009-0004-8953-0151"
},
{
"affiliation": "Centre for Addiction and Mental Health, University of Toronto, Canada",
"name": "Dickie, Erin W",
"orcid": "0000-0003-3028-9864"
},
{
"affiliation": "Institute of Neuroscience and Medicine (INM-7: Brain and Behaviour), Forschungszentrum Jülich",
"name": "Raimondo, Fede",
"orcid": "0000-0003-4087-8259"
},
{
"affiliation": "Sagol School of Neuroscience, Tel Aviv University",
"name": "Ben-Zvi, Gal",
"orcid": "0000-0002-5655-9423"
},
{
"affiliation": "NIMH IRP",
"name": "Lee, John A.",
"orcid": "0000-0001-5884-4247"
},
{
"name": "Kruper, John"
},
{
"affiliation": "UC Berkeley",
"name": "Visconti di Oleggio Castello, Matteo",
"orcid": "0000-0001-7931-5272"
},
{
"affiliation": "The Laboratory for Investigative Neurophysiology (The LINE), Department of Radiology and Department of Clinical Neurosciences, Lausanne, Switzerland; Center for Biomedical Imaging (CIBM), Lausanne, Switzerland",
"name": "Notter, Michael Philipp",
"orcid": "0000-0002-5866-047X"
},
{
"affiliation": "Sainte-Anne Hospital Center, Université Paris Descartes",
"name": "Roca, Pauline",
"orcid": "0000-0003-2089-6636"
},
{
"affiliation": "Stanford University",
"name": "Blair, Ross",
"orcid": "0000-0003-3007-1056"
},
{
"affiliation": "University of Pennsylvania",
"name": "Pati, Sarthak",
"orcid": "0000-0003-2243-8487"
},
{
"name": "Sundaravadivelu, Suganya"
},
{
"name": "Asciutto, Will"
},
{
"name": "pierre-nedelec"
}
],
"keywords": [
"BIDS",
"brain imaging data structure",
"neuroscience",
"neuroimaging",
"neuroinformatics",
"python"
],
"license": "mit-license",
"upload_type": "software"
}
================================================
FILE: CHANGELOG.rst
================================================
Changelog
=========
Version 0.22.0 (April 22, 2026)
-------------------------------
New feature release in the 0.22.x series.
This release introduces schema-based layout configurations::
from bids.layout import BIDSLayout
layout = BIDSLayout('/path/to/dataset', config='bids-schema')
This will use the version of the schema included in
the installed version of bidsschematools_.
The schema configuration will be the way to incorporate updates from
new versions of BIDS (v1.11+), and will eventually be made the default
configuration.
Please try it out and report any issues you encounter
to help us make the transition as smooth as possible.
We are particularly interested in reports from
users who supply custom configurations.
The following dependencies have been updated to new minimum versions:
* NumPy 1.25
* SciPy 1.11
* NiBabel 5.1
* ENH: Sort BIDS file name entities (#1220)
* ENH: Use BIDS schema to "drive" pybids #818 (#1163)
* DOC: Fix documentation deployment (#1224)
* MNT: Add Python 3.14 tests (#1175)
* MNT: Skip pre-release checks on unlabeled PRs (#1188)
* MNT: Format with Ruff (#1231)
* MNT: Dependabot updates (#1232, #1233, #1234, #1236, #1237, #1238, #1239, #1240, #1242)
Version 0.21.0 (October 16, 2025)
---------------------------------
New feature release in the 0.21.x series.
This release fixes compatibility with ``univeral_pathlib`` 0.3.
The following dependencies have been updated to new minimum versions:
* Python 3.10
* NumPy 1.24
* SciPy 1.10
* NiBabel 5.0
* Pandas 2.0
Merged pull requests:
* FIX: UPath protocol mismatch (#1183)
* MNT: Drop Python 3.9 support (#1184)
Version 0.20.0 (September 24, 2025)
-----------------------------------
New feature release in the 0.20.x series.
This release finalizes some deprecations that were started in the 0.7 and 0.14 series.
In particular, passing indexer arguments to ``BIDSLayout`` and disabling
``absolute_paths`` mode in ``BIDSLayout()`` or ``BIDSLayout.get()`` will now error.
To adjust indexing behavior, create an explicit ``BIDSLayoutIndexer()`` and pass
``BIDSLayout(..., indexer=indexer)``.
To access relative paths, use the ``BIDSFile.relative_path`` property on
``BIDSLayout.get()`` return values.
* FIX: Check for attribute that can be absent before assigning (#1165)
* FIX: Accommodate deprecations in the upcoming Pandas 3 release (#1173)
* FIX: Repaired convolution issue that arises when onset values are repeated (#1133)
* ENH: StatsModels: Add `invalid_inputs` parameter to allow dropping of missing data columns to run nodes (#1145)
* ENH: Add missing root-level path patterns (#1169)
* ENH: Parse ``seg-`` entities from dseg or probseg files (#1172)
* DOC: Update link to derivatives config file (#1132)
* MNT: Address warnings produced by pybids and dependencies (#1136)
* MNT: Lock test environment, update with dependabot (#1134)
Version 0.19.0 (March 05, 2025)
-------------------------------
New feature release in the 0.19.x series.
This release adds plus signs to labels and suffixes, anticipating the
release of BIDS 1.10.1 or 1.11.0 (whichever is next).
Until the BIDS specification is updated and the ``bidsschematools``
package containing the updated schema is published, files with ``+`` will
not validate, but can still be indexed with ``BIDSLayout(..., validate=False)``.
Several small fixes resolving issues with BIDS Stats Models are included,
and complex JSON metadata (lists and objects) will now play more nicely with
contexts where they need to be hashed.
* FIX: Catch StopIteration on directory walk (#1124)
* FIX: Ensure dotfiles are always filtered (#1123)
* FIX: Copy entities dict before modifying run variable type (#1120)
* FIX: Allow numpy arrays to treat PaddedInt like int (#1119)
* FIX: Make lists and dicts hashable (#1112)
* ENH: Allow plus signs in labels (#1117)
* MNT: Remove formulaic upper bound (#1121)
* MNT: Use tox-uv to ease lower bound checking, test on Python 3.13 (#1109)
Version 0.18.1 (December 05, 2024)
----------------------------------
Bug-fix release in the 0.18.x series.
0.18.0 was missing package data, which went unnoticed because the workflow
to publish to PyPI was also broken. These have been fixed, and we no longer
alter global logging state.
With thanks to Fede Raimondo for the contribution.
* FIX: Install package data (#1108)
* FIX: Remove calls to root logger basicConfig (#1106)
* MNT: Upload attested package to (test) PyPI (#1110)
Version 0.18.0 (November 12, 2024)
----------------------------------
New feature release in the 0.18.x series.
No actual new features, but this version moves test data out of the
installed distribution and ratchets its dependencies on Python and
the Scientific Python stack, justifying a minor release.
* FIX: Improve compatibility with cloud paths (#1094)
* MNT: Transition to src/ layout (#1099)
* MNT: Update minimum Python (3.9) and dependencies (SPEC 0 + 1yr) (#1092)
* MNT: Update test for BIDS-MRS (#1089)
Version 0.17.2 (September 19, 2024)
-----------------------------------
Bug-fix release in the 0.17.x series.
* BUG: symlink dirs treated as files during indexing (#1087)
Version 0.17.1 (September 06, 2024)
-----------------------------------
Bug-fix release in the 0.17.x series.
Mostly quiets down warnings generated by more recent versions of Pandas.
* FIX: Create indices with object dtype (#1084)
* MNT: Transfer validation tests to bids validator (#1081)
Version 0.17.0 (July 29, 2024)
------------------------------
Feature release in the 0.17.x series.
This release includes experimental support for MRS (BEP22) datasets
and `universal_pathlib <https://github.com/fsspec/universal_pathlib>`__.
* ENH: pathlib -> universal_pathlib to enable cloud (and other filesystem) support (#1074)
* ENH: Add MRS entities, path patterns (#1075)
* STY: No parentheses after assert (#1065)
* MNT: Bump bids-examples from `47c4da1` to `401f4cf` (#1073)
* MNT: Fix typo newly found by codespell (#1066)
Version 0.16.5 (May 22, 2024)
-----------------------------
Bug-fix release in the 0.16.x series.
This release includes minor fixes, but reworks the testing
infrastructure and resolves Python 3.12 incompatibilities.
* FIX: Handle FileNotFoundError in BIDSLayout init when is_derivative=True and validate=False (#1049)
* FIX: Add dwi root sbref, missing dwi entities to path patterns (#1059)
* ENH: Update indexer to treat .zarr as files not dirs (#1046)
* DOC: Deal with several warnings and errors in the doc build (#1061)
* TST: Add bids-examples tests to cover ieeg, eeg, dwi (#1060)
* MNT: Add Python 3.12 support (#1057)
* MNT: Use tox to simplify testing environment setup (#1055)
* MNT: Bump codecov/codecov-action from 3 to 4 (#1041)
* MNT: Bump bids-examples from `1a000d6` to `eff47f1` (#1039)
* MNT: Bump bids-examples from `b6e5234` to `1a000d6` (#1038)
* MNT: Bump actions/upload-artifact from 3 to 4 (#1037)
* MNT: Bump actions/setup-python from 4 to 5 (#1036)
Version 0.16.4 (November 30, 2023)
----------------------------------
Bug-fix release in the 0.16.x series.
This release resolves a bug likely introduced in 0.9.0
(when PyBIDS started using SQL),
in which boolean metadata fields with values of ``False`` were read in as
``True``.
* FIX: Ensure values of boolean metadata fields are preserved (#1034)
* FIX: update config for PET tracer entity (#1018)
* ENH: Clearer BIDSValidation error message (#1023)
* STY: pacify codespell (#1029)
* CI: Build(deps): Bump bids-examples from `064db11` to `b6e5234` (#1031)
* CI: Build(deps): Bump bids-examples from `d039879` to `064db11` (#1028)
* CI: Build(deps): Bump bids-examples from `bfcc5c6` to `d039879` (#1027)
* CI: Bump bids-examples from `502c917` to `bfcc5c6` (#1026)
* CI: Bump bids-examples from `1c30c6e` to `502c917` (#1025)
* CI: Bump bids-examples from `e857597` to `1c30c6e` (#1021)
* CI: Bump bids-examples from `c557d1f` to `e857597` (#1019)
* CI: Bump bids-examples from `75968b9` to `c557d1f` (#1011)
* CI: Bump actions/checkout from 3 to 4 (#1024)
Version 0.16.3 (August 16, 2023)
--------------------------------
Bug-fix release in the 0.16.x series.
This release resolves a regression introduced in 0.16.2 when JSON sidecar files
contain ``null`` values.
* FIX: Drop JSON sidecar fields with null values during metadata indexing (#1016)
Version 0.16.2 (August 11, 2023)
--------------------------------
Bug-fix and performance release in the 0.16.x series.
Notably, indexing is now significantly faster (2-2.5x).
* ENH: Speed up indexing by bulk committing to database (#1013)
* Include indexer in add_derivatives call (#1009)
* Bump bids-examples from `8550641` to `75968b9` (#1008)
* Bump bids-examples from `e96b702` to `8550641` (#1007)
* Bump bids-examples from `d8455af` to `e96b702` (#1005)
* Bump bids-examples from `bc36231` to `d8455af` (#1003)
* CI: Use OIDC publishing instead of tokens (#1001)
Version 0.16.1 (May 01, 2023)
-----------------------------
Bug-fix release in the 0.16.x series.
* FIX: Improve parsing of suffix/extension in non-BIDS files (#997)
* FIX: Support use of Query enums in filter lists (#994)
* MNT: Clean up imports in documentation scripts (#980)
* MNT: update zenodo (#995)
* CI: Update Python version for doc/sdist/wheel tests (#996)
Version 0.16.0 (April 26, 2023)
-------------------------------
New feature release in the 0.16.x series.
* FIX: Adapt to SQLAlchemy 1.4+ (#985)
* FIX: Fill na with zero for VIF (#976)
* ENH: Only warn if missing values not explicitly set (#977)
* ENH: Create run reports of whole graph / create HTML reports (#918)
* ENH: Speed up Sparse to Dense BIDSVariable conversion (#969)
* ENH: Update config to support motion and nirs modalities (#965)
* REF: Add derivative subdatasets in a less ad hoc fashion (#954)
* MNT: Update minimum dependencies, add CI job to test them (#987)
* MNT: Drop jinja2/markupsafe constraints (#986)
* MNT: Fix ruff issue E712 (#981)
* MNT: A few Python3 updates (#971)
* MNT: Drop Python 3.7 EOL (#974)
* MNT: Fix repeat-word typo (#968)
* MNT: Update vendored inflect to 5.6.2 (#961)
* MNT: Fix flake8 issues found by ruff (#955)
* MNT: Remove (large) unused PNG from doc directory (#962)
* MNT: http:// → https:// (#960)
* MNT: Update git submodules (#964)
* CI: Drop codecov PyPI package and appveyor config (#979)
* CI: Add Python 3.11 (#975)
* CI: Replace custom update_submodules action with dependabot action (#967)
* CI: fix errors caused by changes in examples (#963)
* CI: Update parameters to gh-action-pypi-publish (#957)
Version 0.15.6 (February 28, 2023)
----------------------------------
Bug-fix release in 0.15.x series.
* FIX: Exclude non-Hashables from set in .get(return_type='id') (#948)
* FIX: Broken pattern matching (#936)
* FIX: Coerce oversampling parameter in convolution to int (#929)
* FIX: Allowing custom BIDS configuration files for derivative datasets (#922)
* FIX: Address change in default pandas grouping behavior (#917)
* ENH: Speed up BIDSLayout.get(return_type='id', ...) (#942)
* ENH: Update default anat filename patterns in config (#933)
* DOC: Make clear how to ignore folders (#945)
* DOC: Fix tutorial link in README (#944)
* DOC: Mention conda installation in README (#928)
* MNT: Update git submodules (#946 + #943 + #932)
* MNT: Move package metadata to pyproject.toml, unvendor versioneer (#907)
* MNT: Bump formulaic max version constraint to include 0.5.x (#916)
Version 0.15.5 (November 07, 2022)
----------------------------------
Bug-fix release in 0.15.x series.
* FIX: Use kwargs for DataFrame.pivot() (#913)
* ENH: Add transformation history to ``BIDSStatsModelsNodeOutput`` (#905)
* ENH: Update examples, add to sphinx, and convert to .md (#908)
* ENH: More helpful __repr__ in modeling (#906)
* MNT: Update git submodules (#911)
* MNT: Bump peter-evans/create-pull-request from 3 to 4 (#904)
* CI: Automatically update GitHub Actions in the future (#903)
Version 0.15.4 (October 08, 2022)
---------------------------------
Bug-fix release in 0.15.x series.
* FIX: Use 'contrasts' in DummyContrasts, not 'condition_list' (#902)
* FIX: Transformations: sync_kwargs, for non-list arguments, listify by variable length (#901)
* CI: Update actions versions (#899)
Version 0.15.3 (September 12, 2022)
-----------------------------------
Bug-fix release in 0.15.x series.
* FIX: Test and update sync_kwargs class variable on transformations (#891)
* FIX: Filtering of DM columns (#892)
* ENH: Enable using participants.tsv, scans.tsv & session.tsv values as grouping variables (#894)
* REF: Rename incoming single contrast column to intercept (#886)
* DOC: Update references to nistats with references to nilearn in docs (#882)
* TST: some sort of QA for derivatives' default_path_patterns (#879)
* MNT: Update git submodules (#887)
* MNT: Codespell errors (#885)
* MNT: Update git submodules (#884)
* MNT: Update git submodules (#883)
* CI: Update actions versions (#897)
Version 0.15.2 (July 25, 2022)
------------------------------
Bug-fix release in 0.15.x series.
* FIX: Synchronize kwargs in transformations, e.g., in Assign (#836)
* FIX: Add HRF derivatives to variable collection when created (#838)
* FIX: Interpolate derivative pipeline name in error message (#847)
* FIX: Match only within relative path when indexer is validating (#859)
* FIX: Rename intercept in DummyContrast (#866)
* FIX: Add variables to correct Node in load_tsv_variables (#872)
* FIX: Repair variable IO so scans.tsv is found (#869)
* FIX: Restore automodel functionality (#853)
* FIX: Allow ``pybids layout --derivatives`` to be a boolean flag or accept a path (#848)
* ENH: Add default path patterns to derivatives.json (#605)
* ENH: Rename statsmodels contrasts if they cannot be uniquely identified downstream (#861)
* ENH: Make intercept-only first level models throw a NotImplementedError (#854)
* ENH: Update config to support microscopy, qMRI, PET, ASL (#840)
* TEST: Add bids-examples submodule and bids_examples pytest fixture (#842)
* TEST: Add tests for default path patterns (#846)
* TEST: Update bids-examples and remove expected failing tests (#845)
* MNT: Update git submodules (#874)
* MNT: Add workflow top automatically update submodule (#870)
* MNT: Remove deprecated no dot config (#841)
* CI: Upgrade several GitHub actions to v3 (#867)
* CI: Add cron jobs to avoid sneaky failures during low activity periods (#860)
Version 0.15.1 (April 04, 2022)
-------------------------------
Bug-fix release in the 0.15.x series.
* RF/FIX: Decompose filter construction for special queries and lists (#826)
* ENH: Relax group_by rules, allowing any entity to be used (#829)
* MNT: Replace deprecated DataFrame.append call (#833)
* DOC: Fresh rerun of entire pybids_tutorial.ipynb (#832)
Version 0.15.0 (March 28, 2022)
-------------------------------
New feature release in the 0.15.x series.
Downstream tools should be aware of a potentially breaking, albeit
long-demanded, change introduced in #819. Run indices are now stored
so that the integers that come out retain any zero-padding that was
found during parsing.
This release also introduces the ``bids.ext`` namespace package that
allows independent packages to install modules in this namespace.
This is an infrastructural change that will allow some components to
be separately managed and follow a different development pace.
* FIX: Allow grouping by run and session when entities are undefined (#822)
* FIX: Clarify exception message (#806)
* FIX: Catch UnicodeDecodeErrors along with JSONDecodeErrors for better reporting (#796)
* FIX: Accept paths/strings for layout configuration files (#799)
* FIX: Small typo: repeated word in docstring (#793)
* ENH: Retain zero-padding in run entities while preserving integer queries and comparisons (#819)
* ENH: Add bids.ext namespace package for subpackages (#820)
* ENH: Handle wildcards in model X (#810)
* ENH: Implement automatic detection of derivative data (#805)
* ENH: Add new ``Query`` for optional entities (#809)
* ENH: Add __main__ to allow ``python -m bids`` to run CLI (#794)
* REF: Improve modularization of bids.reports (#617)
* DOC: Link from sphinx documentation to notebook tutorials. (#797)
* MNT: Test on Python 3.10, various CI updates (#824)
* MNT: Avoid jinja2 v3 until nbconvert handles breakages (#823)
Version 0.14.1 (March 29, 2022)
-------------------------------
Bug-fix release in the 0.14.x series.
* RF/FIX: Decompose filter construction for special queries and lists (#826)
Includes the following back-ports from 0.15.0:
* FIX: Clarify exception message (#806)
* FIX: Catch UnicodeDecodeErrors along with JSONDecodeErrors for better reporting (#796)
* FIX: Accept paths/strings for layout configuration files (#799)
* ENH: Add __main__ to allow ``python -m bids`` to run CLI (#794)
Version 0.14.0 (November 09, 2021)
----------------------------------
New feature release in the 0.14.x series.
This release includes a significant refactor of BIDS Statistical Models,
replacing the ``bids.analysis`` module with ``bids.modeling``.
Changes to ``bids.layout`` are minimal, and we do not anticipate API breakage.
* FIX: LGTM.com warning: Implicit string concatenation in a list (#785)
* FIX: Take the intersection of variables and Model.X,
ignoring missing variables (usually contrasts) (#764)
* FIX: Associate "is_metadata" with Tag, not Entity; and only return
non-metadata entries for core Entities in ``get(return_type='id')`` (#749)
* FIX: Only include regressors if they are TSV (#752)
* FIX: ensure force_dense=True runs to_dense only on sparse variables (#745)
* FIX: get unique, with conflicting meta-data (#748)
* FIX: Clean up some deprecation and syntax warnings (#738)
* ENH: Add ``pybids upgrade`` command (#654)
* ENH: Add Lag transformation (#759)
* ENH: Use indirect transformations structure (#737)
* ENH: Add visualization for statsmodel graph (#742)
* ENH: Permit explicit intercept (1) in Contrasts and DummyContrasts (#743)
* ENH: Add meta-analysis model type (#731)
* ENH: Contrast type is now test (#733)
* REF: Use pathlib.Path internally when possible (#746)
* REF: Remove group_by from edges and add filter (#734)
* REF: Improved/refactored StatsModels module (#722)
* MNT: Make sure codespell skips .git when run locally (#787)
* MNT: LGTM.com recommendations (#786)
* MNT: Better codespell configuration (#782)
* MNT: Constrain formulaic version to 0.2.x . (#784)
* MNT: Update versioneer: 0.18 → 0.20 (#778)
* MNT: Add "codespell" tool to CI checks to catch typos sooner (#776)
* MNT: Disable bids-nodot mode (#769)
* MNT: Send codecov reports again (#766)
* MNT: Set minimum version to Python 3.6 (#739)
Version 0.13.2 (August 20, 2021)
--------------------------------
Bug-fix release in the 0.13 series.
* FIX/TEST: gunzip regressors.tsv.gz, allow timeseries.tsv as well (#767)
* FIX: run is required (#762)
* MNT: Patch 0.13.x maint branch (#763)
Version 0.13.1 (May 21, 2021)
-----------------------------
Bug-fix release in the 0.13 series.
* ENH: Improve `get` performance (#723)
* STY: Fix typos identified by codespell (#720)
* TEST: dataset-level model spec retrieval (#693)
Version 0.13 (April 14, 2021)
-----------------------------
New feature release in the 0.13 series.
* FIX: Resample to n_vols for sampling_rate == 'TR' (#713)
* FIX: Lazily load metadata, skip when missing data files are missing sidecars (#711)
* FIX: Ensure indicator matrix is boolean when indexing in Split transformation (#710)
* FIX: Correctly pair metadata file when creating association records (#699)
* FIX: Resolve side-effects of new testfile in #682 (#695)
* FIX: BIDSLayout -- TypeError: unhashable type: 'dict' (#682)
* ENH: Add res/den entities to derivatives.json (#709)
* ENH: Update datatypes (#708)
* ENH: add more informative validation error message for dataset_description.json (#705)
* ENH: Add flip, inv, mt, and part entities (#688)
* CI: Run packaging tests on main repository only (#696)
* CI: Migrate to GH actions (#691)
Version 0.12.4 (November 10, 2020)
----------------------------------
Bug-fix release in the 0.12.x series.
* FIX: Do not error when popping missing ``scan_length`` (#679)
Version 0.12.3 (October 23, 2020)
---------------------------------
* FIX: Require aligned input for logical operations (#649)
* ENH: Incremental variable loading in Step setup (#672)
Version 0.12.2 (October 09, 2020)
---------------------------------
Bug-fix release in 0.12.x series.
* FIX: Support nibabel < 3 when calculating time series length (#669)
* FIX: Sanitize single derivative Path passed to BIDSLayout (#665)
* FIX: Force UTF-8 encoding in _index_metadata (#663)
* FIX: Explicitly convert to HTML when testing tutorial (nbconvert 6.0 breakage) (#664)
Version 0.12.1 (September 09, 2020)
-----------------------------------
* FIX: drop obsolete test (#652)
* FIX: Convolve zero-duration (impulse) events when variable contains multiple events (#645)
* ENH: Add CLI to PyBIDS (#650)
* ENH: Add relpath attribute to BIDSFile and associated refactoring (#647)
* DOC: Add example for using parse_file_entities from bids.layout (#639)
* MNT: Remove deprecated database_file argument to BIDSLayout (#644)
Version 0.12.0 (August 04, 2020)
--------------------------------
New feature release for the 0.12.x series.
This release includes significant speedups for ``BIDSLayout`` creation and improves
handling of GIFTI and CIFTI-2 derivative files.
* FIX: Remove need to eager load associations (#642)
* ENH: Fetch number of time points from NIfTI, GIFTI or CIFTI-2 (#637)
* ENH: Catch any NIfTI/GIFTI (incl. CIFTI-2) files as BIDSImageFiles (#638)
Version 0.11.1 (July 02, 2020)
------------------------------
Bug-fix release in the 0.11.x series
With thanks to Mathias Goncalves for finding and fixing the issue.
* FIX: Preserve ``get`` logic when using custom config (#636)
Version 0.11.0 (June 29, 2020)
------------------------------
New feature release in the 0.11.x series.
One significant change in this PR is to add the configuration option ``extension_initial_dot``.
Setting to ``True`` will adopt the future default behavior of returning ``extension`` entities with
an initial dot (``.``).
Other notable changes include a significant refactoring of the Analysis module, and a number of
small improvements to error reporting that should add up to simpler debugging for users and
developers.
* FIX: Post-fix And and Or transformations with underscore (#628)
* FIX: made _validate_file work on Windows (#627)
* FIX: Scale transformation fails if passed constant input. (#614)
* FIX: Certain queries involving multiple layouts are very slow (#616)
* FIX: Bug in get() when passing enums as extensions (#612)
* FIX: Bug in BIDSDataFile.get_df() (#611)
* FIX: Make entity assertions Python 3.5-safe (#606)
* FIX: BIDSLayout.build_path to respect absolute_paths. (#580)
* ENH: Adds OS-level file copying instead of reading/writing via Python (#613)
* ENH: Add explicit warning message when users pass in filters as a dictionary keyword (#623)
* ENH: Introduce PyBIDS exceptions (#615)
* ENH: Add example bids and derivatives dataset_description.json strings to error messages (#620)
* ENH: Improved handling of invalid filters (#610)
* ENH: Add method to generate report from list of files (#607)
* ENH: Pass kwargs from BIDSImageFile.get_image() to nibabel.load (#601)
* ENH: Model spec module and associated utilities (#548)
* ENH: Add BIDSMetadata dictionary to report file with missing metadata (#593)
* RF: Add ``extension_initial_dot`` config option to transition to extension entity with initial dot (#629)
* MNT: Automatically deploy docs (#598)
* CI: Drop --pre check for Python 3.5 (#621)
* CI: Test on Python 3.8 (#594)
Version 0.10.2 (February 26, 2020)
----------------------------------
Bug fix release in the 0.10.x series.
* FIX: Add Replace as exception to recursive JSON conversion (#589)
Version 0.10.1 (February 10, 2020)
----------------------------------
Bug fix release in the 0.10.x series.
This release just makes available some of the latest minor fixes and improvements.
* FIX: Replace ``os.path.sep`` with ``fwdslash`` because bids validator hardcodes fwd (#582)
* FIX: Refactor of ``build_path`` and inner machinery (#574)
* FIX: Domain entity, and slow ``__repr__`` (#569)
* FIX: "strict" helptext in ``BIDSLayout.write_contents_to_file`` (#566)
* FIX: typos in helpstrings and comments (#564)
* FIX: Correct term "caret" to "angle bracket" in helpstrings (#565)
* ENH: Extend ``build_path`` to generate lists of files (#576)
* ENH: Add one parametric test of ``BIDSLayout.build_path`` (#577)
* ENH: Enable partial metadata indexing (#560)
* ENH: Upscale to collection sampling rate prior to resampling (#568)
* ENH: Calculate default sampling rate for ``SparseRunVariable.to_dense`` (#571)
* MNT: Add ``.vscode`` (for Visual Studio Code) to ``.gitignore`` (#562)
* MNT: Ignore pip-wheel-metadata (#581)
* DOC: Remove Python 2 support statement, now that v0.10.0 has dropped it (#561)
Version 0.10.0 (December 03, 2019)
----------------------------------
New feature release in the 0.10.x series.
This release removes Python 2 support.
* ENH: Helpful error for db argument mismatch, and add classmethod load_from_db (#547)
* ENH: Add Resample transformation (#373)
* ENH: Save BIDSLayout + Derivatives to folder (with init arguments) (#540)
* ENH: Adds support for NONE and ANY query Enums (#542)
* ENH: Transformation-related improvements (#541)
* ENH: FEMA contrasts (#520)
* STY: Minor PEP8 Fixes (#545)
* MNT: Various (#543)
* MNT: Remove Python 2.7 support (#524)
* CI: Configure Circle Artifact Redirector (#544)
Version 0.9.5 (November 6, 2019)
--------------------------------
Bug fix release in the 0.9.x series.
Final planned release with Python 2 support.
* FIX: Filter before downsampling (#529)
* FIX: Copy input dict in ``replace_entities``\ ; Typos in ``default_path_patterns`` (#517)
* FIX: Use string dtype for all entities when using regex search (#511)
* FIX: Update Sphinx docs for 2.2 (#507)
* ENH: Enable automatic derivative database caching (#523)
* ENH: Raise ValueError if BIDSLayout.build_path fails to match any pattern (#508)
* RF: Subclass analysis Node from object (#528)
* DOC: Unify docstring format (#499)
* DOC: Auto-generate stubs (#513)
* STY: .sql is a misleading extension to sqlite files (#531)
* STY: General cleanups (#526, #527)
Version 0.9.4 (September 20, 2019)
----------------------------------
Bug fix release in the 0.9.x series.
* FIX: Ignore ``default_ignore`` paths by default (#495)
* FIX: Filter and sort on scalar metadata in ``get_nodes()`` (#488)
* FIX: Automatically sanitize dtype of ``get()`` arguments (#492)
* FIX: Check that ``default_path_patterns`` is not ``None`` before using in ``build_path`` (#485)
* FIX: Add CBV and phase modalities to func datatype path pattern (#479)
* FIX: Drop bold suffix constraint from echo entity (#477)
* ENH: Enforce dtypes on spec-defined columns when reading in DFs (#494)
* ENH: Validate built paths (#496)
* ENH: Update contrast enhancing agent query name (ceagent) (#497)
* DOC: Add citation information to README (#493)
* DOC: Improve wording in Python notebook example comment (#484)
* DOC: Finish sentence in Python Notebook example documentation (#483)
* DOC: Add JOSS Badge (#472)
* STY: Apply syntax highlight to Python notebook example doc (#482)
* MAINT: Move setup configuration to setup.cfg (#448)
* MAINT: Additional Zenodo metadata (#470)
* MAINT/CI: Use ``extras_require`` to declare dependencies for tests (#471)
Version 0.9.3 (August 7, 2019)
------------------------------
This version includes a number of minor fixes and improvements, one of which
breaks the existing API (by renaming two entities; see #464). Changes
include:
* FIX: Avoid DB collisions for redundant entities (#468)
* FIX: Minor changes to entity names in core spec (#464)
* FIX: Make bids.reports work properly with .nii images (#463)
* CI: Execute notebook in Travis (#461)
* ENH: More sensible **repr** for Tag model (#467)
Version 0.9.2 (July 12, 2019)
-----------------------------
This version includes a number of minor fixes and improvements.
EEG files are better handled, and ``BIDSLayout`` and ``BIDSFile`` play more
nicely with ``Path``\ -like objects.
With thanks to new contributor Cecile Madjar.
* FIX: Instantiate ``ignore``\ /\ ``force_index`` after root validation (#457)
* FIX: Restore ``<entity>=None`` query returning files lacking the entity (#458)
* ENH: Add ``BIDSJSONFile`` (#444)
* ENH: Add ``BIDSFile.__fspath__`` to work with pathlib (#449)
* ENH: Add ``eeg`` datatype to layout config (#455)
* RF: Remove unused kwargs to BIDSFile (#443)
* DOC: Improve docstring consistency, style (#443)
* DOC: Address final JOSS review (#453)
* STY: PEP8 Fixes (#456)
* MAINT: Set name explicitly in setup.py (#450)
Version 0.9.1 (May 24, 2019)
----------------------------
Hotfix release:
* Fixed package deployment issues (#446)
* Updated author list (#447)
Thanks to new contributors Erin Dickie, Chadwick Boulay and Johannes Wennberg.
Version 0.9.0 (May 21, 2019)
----------------------------
Version 0.9 replaces the native Python backend with a SQLite database managed
via SQLAlchemy. The layout module has been refactored (again), but API changes
are minimal. This release also adds many new features and closes a number of
open issues.
API CHANGES/DEPRECATIONS:
* The ``extensions`` argument has now been banished forever; instead, use
``extension``\ , which is now defined as a first-class entity. The former will
continue to work until at least the 0.11 release (closes #404).
* Relatedly, values for ``extension`` should no longer include a leading ``.``\ ,
though this should also continue to work for the time being.
* The ``BIDSLayout`` init argument ``index_associated`` has been removed as the
various other filtering/indexing options mean there is longer a good reason for
users to manipulate this.
* ``bids.layout.MetadataIndex`` no longer exists. It's unlikely that anyone will
notice this.
* ``BIDSLayout.get_metadata()`` no longer takes additional entities as optional
keyword arguments (they weren't necessary for anything).
* Direct access to most ``BIDSFile`` properties is discouraged, and in one case
is broken in 0.9 (for ``.metadata``\ , which was unavoidable, because it's reserved
by SQLAlchemy). Instead, users should use getters (\ ``get_metadata``\ , ``get_image``\ ,
``get_df``\ , etc.) whenever possible.
NEW FUNCTIONALITY:
* All file and metadata indexing and querying is now supported by a
relational (SQLite) database (see #422). While this has few API implications,
the efficiency of many operations is improved, and complex user-generated
queries can now be performed via the SQLAlchemy ``.session`` stored in each
``BIDSLayout``.
* Adds ``.save()`` method to the ``BIDSLayout`` that saves the current SQLite DB
to the specified location. Conversely, passing a filename as ``database_file`` at
init will use the specified store instead of re-indexing all files. This
eliminates the need for a pickling strategy (#435).
* Related to the above, the ``BIDSLayout`` init adds a ``reset_database`` argument
that forces reindexing even if a ``database_file`` is specified.
* The ``BIDSLayout`` has a new ``index_metadata`` flag that controls whether or
not the contents of JSON metadata files are indexed.
* Added ``metadata`` flag to ``BIDSLayout.to_df()`` that controls whether or not
metadata columns are included in the returned pandas ``DataFrame`` (#232).
* Added ``get_entities()`` method to ``BIDSLayout`` that allows retrieval of all
``Entity`` instances available within a specified scope (#346).
* Adds ``drop_invalid_filters`` argument to ``BIDSLayout.get()``\ , enabling users to
(optionally) ensure that invalid filters don't clobber all search results
(#402).
* ``BIDSFile`` instances now have a ``get_associations()`` method that returns
associated files (see #431).
* The ``BIDSFile`` class has been split into a hierarchy, with ``BIDSImageFile``
and ``BIDSDataFile`` subclasses. The former adds a ``get_image()`` method (returns
a NiBabel image); the latter adds a ``get_df()`` method (returns a pandas DF).
All ``BIDSFile`` instances now also have a ``get_entities()`` method.
BUG FIXES AND OTHER MINOR CHANGES:
* Metadata key/value pairs and file entities are now treated identically,
eliminating a source of ambiguity in search (see #398).
* Metadata no longer bleeds between raw and derivatives directories unless
explicitly specified (see #383).
* ``BIDSLayout.get_collections()`` no longer drops user-added columns (#273).
* Various minor fixes/improvements/changes to tests.
* The tutorial Jupyter notebook has been fixed and updated to reflect the
latest changes.
Version 0.8.0 (February 15, 2019)
---------------------------------
Version 0.8 refactors much of the layout module. It drops the grabbit
dependency, overhauls the file indexing process, and features a number of other
improvements. However, changes to the public API are very minimal, and in the
vast majority of cases, 0.8 should be a drop-in replacement for 0.7.*.
API-BREAKING CHANGES:
* Changes to (rarely-used) BIDSLayout initialization arguments:
* ``include`` and ``exclude`` have been replaced with ``ignore`` and
``force_index``. Paths passed to ``ignore`` will be ignored from indexing;
paths passed to ``force_index`` will be forcibly indexed even if they are
otherwise BIDS-non-compliant. ``force_index`` takes precedence over ``ignore``.
* Most querying/selection methods add a new ``scope`` argument that controls
scope of querying (e.g., ``'raw'``\ , ``'derivatives'``\ , ``'all'``\ , etc.). In some
cases this replaces the more limited ``derivatives`` argument.
* No more ``domains``\ : with the grabbit removal (see below), the notion of a
``'domain'`` has been removed. This should impact few users, but those who need
to restrict indexing or querying to specific parts of a BIDS project should be
able to use the ``scope`` argument more effectively.
OTHER CHANGES:
* FIX: Path indexing issues in ``get_file()`` (#379)
* FIX: Duplicate file returns under certain conditions (#350)
* FIX: Pass new variable args as kwargs in split() (#386) @effigies
* TEST: Update naming conventions for synthetic dataset (#385) @effigies
* REF: The grabbit package is no longer a dependency; as a result, much of the
functionality from grabbit has been ported over to pybids.
* REF: Required functionality from six and inflect is now bundled with pybids
in ``bids.external``\ , minimizing external dependencies.
* REF: Core modules have been reorganized. Key data structures and containers
(e.g., ``BIDSFile``\ , ``Entity``\ , etc.) are now in a new ``bids.layout.core`` module.
* REF: A new ``Config`` class has been introduced to house the information
found in ``bids.json`` and other layout configuration files.
* REF: The file-indexing process has been completely refactored. A new
hierarchy of ``BIDSNode`` objects has been introduced. While this has no real
impact on the public API, and isn't really intended for public consumption yet,
it will in future make it easier for users to work with BIDS projects in a
tree-like way, while also laying the basis for a more sensible approach to
reading and accessing associated BIDS data (e.g., .tsv files).
* MNT: All invocations of ``pd.read_table`` have been replaced with ``read_csv``.
Version 0.7.1 (February 01, 2019)
---------------------------------
This is a bug fix release in the 0.7 series. The primary API change is improved
handling of ``Path`` objects.
* FIX: Path validation (#342)
* FIX: Ensure consistent entities at all levels (#326)
* FIX: Edge case where a resampled column was too-long-by-one (#365)
* FIX: Use BIDS metadata for TR over nii header (#357)
* FIX: Add check for ``run_info`` to be a list, pass ``run_info`` in correct position. (#353)
* FIX: If ``sampling_rate`` is ``'auto'``\ , set to first rate of ``DenseRunVariables`` (#351)
* FIX: Get the absolute path of the test data directory (#347)
* FIX: Update reports to be 0.7-compatible (#341)
* ENH: Rename ``sr`` variable to more intuitive ``interval`` (#366)
* ENH: Support ``pathlib.Path`` and other ``str``\ -castable types (#307)
* MNT: Updates link to derivative config file in notebook (#344)
* MNT: Add bids-validator dependency (#363)
* MNT: Require pandas >= 0.23.0 (#348)
* MNT: Bump grabbit version (#338)
* CI: Ignore OSX Python 3.5 failures (#372)
* CI: Build with Python 3.7 on Travis, deploy on 3.6 (#337)
Version 0.7.0 (January 10, 2019)
--------------------------------
This is a major, API-breaking release. It introduces a large number of new features, bug fixes, and improvements.
API-BREAKING CHANGES:
* A number of entities (or keywords) have been renamed to align more closely with the BIDS specification documents:
* 'type' becomes 'suffix'
* 'modality' becomes 'datatype'
* 'acq' is removed (use 'acquisition')
* 'mod' becomes 'modality'
* The following directories are no longer indexed by default: derivatives/, code/, stimuli/, models/, sourcedata/. They must be explicitly included using the 'include' initialization argument.
* The grabbids module has been renamed to layout and BIDSLayout.py and BIDSvalidator.py are now layout.py and validation.py, respectively.
* The BIDS validator is now enabled by default at layout initialization (i.e., ``validate=True``\ )
* The ``exclude`` initialization argument has been removed.
* ``BIDSLayout.parse_entities`` utility has been removed (use the more flexible ``parse_file_entities``\ ).
* Calls to ``.get()`` now return ``BIDSFile`` objects, rather than namedtuples, by default (#281). The ``BIDSFile`` API has been tweaked to ensure backwards incompatibility in nearly all cases.
* Naming conventions throughout the codebase have been updated to ensure consistency with the BIDS specs. This is most salient in the ``analysis`` module, where snake_case has been replaced with CamelCase throughout.
NEW FEATURES:
* File metadata (i.e., in JSON sidecars) is now searchable by default, and behaves just like native BIDS entities (e.g., metadata keys can be passed as arguments to ``.get()`` calls)
* A new BIDSFile wrapper provides easy access to ``.metadata`` and ``.image``
* HRF convolution is now supported via bundling of nistats' hemodynamic_models module; convolution is handled via the ``convolve_HRF`` transformation.
* Named config paths that customize how projects are processed can be added at run-time (#313)
* Preliminary support for BIDS-Derivatives RC1 (mainly core keywords)
MINOR IMPROVEMENTS AND BUG FIXES:
* Specifying 'derivatives' in a path specification now automatically includes 'bids' (#246)
* Zenodo DOIs are now minted with new releases (#308)
* Variable loading via load_variables can now be done incrementally
* Expanded and improved path-building via ``layout.build_path()``
* ``get_collections`` no longer breaks when ``merge=True`` and the list is empty (#202)
* Layout initialization no longer fails when ``validate=True`` (#222)
* The auto_contrasts field in the modeling tools now complies with the BIDS-Model spec (#234)
* Printing a ``BIDSFile`` now provides more useful information, including path (#298)
* Resample design matrix to 1/TR by default (#309)
* Fix the Sum transformation
* Ensure that resampling works properly when a sampling rate is passed to ``get_design_matrix`` (#297)
* Propagate derivative entities into top-level dynamic getters (#306)
* Deprecated ``get_header`` call in nibabel removed (#300)
* Fix bug in entity indexing for ``BIDSVariableCollection`` (#319)
* Exclude modules with heavy dependencies from root namespace for performance reasons (#321)
* Fix bug that caused in-place updating of input selectors in ``Analysis`` objects (#323)
* Add a DropNA transformation (#325)
* Add a ``get_tr()`` method to ``BIDSLayout`` (#327)
* Add entity hints when calling ``get()`` with a ``target`` argument (#328)
* Improved test coverage
Version 0.6.5 (August 21, 2018)
-------------------------------
* FIX: Do not drop rows of NaNs (#217) @adelavega
* FIX: Declare run as having integer type (#236) @effigies
* ENH: MEG support (#229) @jasmainak
* REF: rename grabbids to layout, closes #228 (#230) @ltirrell
* DOC: add .get_collection examples to tutorial (#219) @Shotgunosine
* DOC: Fix link in README to point to documentation (#223) @KirstieJane
* DOC: Add binder link for tutorial (#225) @KirstieJane
* MAINT: Restore "analysis" installation extra (#218) @yarikoptic
* MAINT: Do not import tests in __init__.py (#226) @tyarkoni
Version 0.5.1 (March 9, 2018)
-----------------------------
Hotfix release:
* Includes data files omitted from 0.5.0 release.
* Improves testing of installation.
Version 0.5.0 (March 6, 2018)
-----------------------------
This is a major release that introduces the following features:
* A new ``bids.variables`` module that adds the following submodules:
* ``bids.variables.entities.py``\ : Classes for representing BIDS hierarchies as a graph-like structure.
* ``bids.variables.variables.py``\ : Classes and functions for representing and manipulating non-imaging data read from BIDS projects (e.g., fMRI events, densely-sampled physiological measures, etc.).
* ``bids.variables.io.py``\ : Tools for loading variable data from BIDS projects.
* ``bids.variables.collections``\ : Containers that facilitate aggregation and manipulation of ``Variable`` classes.
* Extensions to the ``BIDSLayout`` class that make it easy to retrieve data/variables from the project (i.e., ``Layout.get_collections``\ )
* A new ``auto_model`` utility that generates simple BIDS-Model specifications from BIDS projects (thanks to @Shotgunosine)
* A new ``reports`` module that generates methods sections from metadata in BIDS projects (thanks to @tsalo)
* Experimental support for copying/writing out files in a BIDS-compliant way
* Expand ``bids.json`` config file to include missing entity definitions
* Ability to parse files without updating the Layout index
* Updated grabbids module to reflect grabbit changes that now allow many-to-many mapping of configurations to folders
* Too many other minor improvements and bug fixes to list (when you're very lazy, even a small amount of work is too much)
Version 0.4.2 (November 16, 2017)
---------------------------------
We did some minor stuff, but we were drunk again and couldn't read our handwriting on the napkin the next morning.
Version 0.4.1 (November 3, 2017)
--------------------------------
We did some minor stuff, and we didn't think it was important enough to document.
Version 0.4.0 (November 1, 2017)
--------------------------------
We did some stuff, but other stuff was happening in the news, and we were too distracted to write things down.
Version 0.3.0 (August 11, 2017)
-------------------------------
We did some stuff, but we were drunk and forgot to write it down.
Version 0.2.1 (June 8, 2017)
----------------------------
History as we know it begins here.
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015-2016, Ariel Rokem, The University of Washington eScience Institute.
Copyright (c) 2016--, PyBIDS developers, Planet Earth
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: MANIFEST.in
================================================
graft src
graft tests
graft doc
include tox.ini
# Include uv.lock so that tox can run from sdist
include uv.lock
recursive-exclude src README.md
================================================
FILE: README.md
================================================
# PyBIDS
[](https://doi.org/10.21105/joss.01294)
[](https://doi.org/10.5281/zenodo.2537312)
[](https://mybinder.org/v2/gh/bids-standard/pybids/main)
[](https://badge.fury.io/py/pybids)
[](https://anaconda.org/conda-forge/pybids)
PyBIDS is a Python library to centralize interactions with datasets conforming
BIDS (Brain Imaging Data Structure) format. For more information about BIDS
visit https://bids.neuroimaging.io.
PyBIDS currently supports Python 3 on POSIX operating systems (including Mac OS). Windows is not officially supported, though most PyBIDS functionality will probably work fine.
## Installation
PyBIDS is most easily installed from pip. To install the latest official release:
> pip install pybids
Or, alternatively via conda:
> conda install -c conda-forge pybids
If you want to live on the bleeding edge, you can install from main:
> pip install git+https://github.com/bids-standard/pybids.git
### Dependencies
PyBIDS has a number of dependencies. The core querying functionality requires only the `BIDS-Validator` package. However, most other modules require the core Python neuroimaging stack: `numpy`, `scipy`, `pandas`, and `nibabel`. The `reports` module additionally requires `num2words`. By default, all dependencies will be installed with pybids (if they aren't already available).
## Usage
Get started by checking out [the documentation](https://bids-standard.github.io/pybids)!
Or you can start at [our tutorial](https://bids-standard.github.io/pybids/examples/pybids_tutorial.html)! You can run it interactively without installing anything via [binder](https://mybinder.org/v2/gh/bids-standard/pybids/main). Click on the link and then navigate to `doc/examples/pybids_tutorial.md` to explore.
## Development and testing
PyBIDS uses [tox](https://tox.wiki/) to manage testing environments and ensure that the same
commands can easily be run locally and in CI.
Install tox with:
```
pip install tox
```
To run tests with standard, minimal, or pre-release dependencies, use:
```
tox run -e [full|min|pre]
```
To run with a specific version, also specify `py3X`:
```
tox run -e py311-full
```
See `tox` documentation for more detail.
## How to cite
To credit PyBIDS in your work, please cite both the [JOSS paper](https://joss.theoj.org/papers/10.21105/joss.01294) and the [Zenodo archive](https://zenodo.org/record/3363985). The former provides a high level description of the package, and the latter points to a permanent record of all PyBIDS versions (we encourage you to cite the specific version you used). Example citations (for PyBIDS 0.9.3):
Yarkoni et al., (2019). PyBIDS: Python tools for BIDS datasets. Journal of Open Source Software, 4(40), 1294, https://doi.org/10.21105/joss.01294
Yarkoni, Tal, Markiewicz, Christopher J., de la Vega, Alejandro, Gorgolewski, Krzysztof J., Halchenko, Yaroslav O., Salo, Taylor, … Blair, Ross. (2019, August 8). bids-standard/pybids: 0.9.3 (Version 0.9.3). Zenodo. https://doi.org/10.5281/zenodo.3363985
## Community guidelines
Bug reports, feedback, and other contributions to PyBIDS are welcome. To report a bug, request a feature, or raise a technical (non-usage-related) question for discussion, please [open an issue on GitHub](https://github.com/bids-standard/pybids/issues). Requests for support and questions about usage (where no bug is suspected) should be posted on the [NeuroStars](https://neurostars.org) forum. For questions about the [BIDS specification](https://github.com/bids-standard/bids-specification) or [BIDS-Validator](https://github.com/bids-standard/bids-validator), please see the corresponding repositories. For general BIDS-related discussion, see the [bids-discussion](https://groups.google.com/forum/#!forum/bids-discussion) mailing list.
Pull requests are always welcome. If you have any doubts about the suitability of a PR, or want to discuss implementation-related issues, feel free to open an issue for discussion.
================================================
FILE: codecov.yml
================================================
coverage:
range: "0...100"
status:
patch:
default:
target: 0
threshold: 100
project:
default:
target: 0
threshold: 100
patch:
target: 0
threshold: 100
unittests:
target: 0
threshold: 100
flags:
- "unittests"
smoketests:
target: 0
threshold: 100
flags:
- "smoketests"
ignore: # files and folders that will be removed during processing
- "doc"
================================================
FILE: doc/Makefile
================================================
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help clean Makefile
clean:
rm -rf $(BUILDDIR)/*
rm -rf generated/*
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
================================================
FILE: doc/_static/theme_overrides.css
================================================
/* override table width restrictions */
@media screen and (min-width: 767px) {
.wy-table-responsive table td {
/* !important prevents the common CSS stylesheets from overriding
this as on RTD they are loaded after this stylesheet */
white-space: normal !important;
}
.wy-table-responsive {
overflow: visible !important;
}
}
================================================
FILE: doc/_templates/class.rst
================================================
:mod:`{{module}}`.{{objname}}
{{ underline }}==============
.. currentmodule:: {{ module }}
.. autoclass:: {{ objname }}
{% block methods %}
{% endblock %}
.. include:: {{module}}.{{objname}}.examples
.. raw:: html
<div class="clearer"></div>
================================================
FILE: doc/_templates/function.rst
================================================
:mod:`{{module}}`.{{objname}}
{{ underline }}====================
.. currentmodule:: {{ module }}
.. autofunction:: {{ objname }}
.. include:: {{module}}.{{objname}}.examples
.. raw:: html
<div class="clearer"></div>
================================================
FILE: doc/_templates/module.rst
================================================
{{ fullname }}
{{ underline }}
.. automodule:: {{ fullname }}
{% block functions %}
{% if functions %}
.. rubric:: Functions
.. autosummary::
:toctree:
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{% block classes %}
{% if classes %}
.. rubric:: Classes
.. autosummary::
:toctree:
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{% block exceptions %}
{% if exceptions %}
.. rubric:: Exceptions
.. autosummary::
:toctree:
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
================================================
FILE: doc/analysis/index.rst
================================================
.. _analysis:
=====================================================
``analysis``: Model specification for BIDS datasets
=====================================================
.. contents:: **Contents**
:local:
:depth: 1
|
.. currentmodule:: pybids.modeling
.. _overview:
An overview of the analysis module
==================================
.. topic:: **BIDS models**
The `BIDS Models specification`_ is an extension to the BIDS standard for
describing and organizing general linear models (GLMs) or similar models
fitted to BIDS datasets.
A GLM can be concisely described with a json file, regardless of the software
used to fit the model (e.g., `nilearn`_, `AfNI`_, `FSL`_, `SPM`_).
The PyBIDS analysis module provides high-level model specification functionality
for BIDS datasets. It assumes that model information is represented in line with
the (upcoming) BIDS-Model specification.
Note that, at present, pybids.modeling does not provide a one-stop model-fitting
solution. You will need to call some other package (e.g., `nilearn`_, or a
non-Python package like `FSL`_ or `SPM`_ via `Nipype`_) to handle model estimation.
What pybids.modeling will do for you is automatically handle the loading and
transformation of all variables, and the construction of design matrices and
contrasts.
.. _BIDS Models specification: https://bids-standard.github.io/model-zoo/
.. _nilearn: https://nilearn.github.io
.. _AfNI: https://afni.nimh.nih.gov
.. _FSL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/
.. _SPM: https://www.fil.ion.ucl.ac.uk/spm/
.. _Nipype: https://nipype.readthedocs.io
Quickstart
==========
A simple example of standard usage follows. We assume that we have a root folder
containing a BIDS-compliant project in ``/bidsproject``, as well as a BIDS-Models
JSON specification in ``model.json``.
>>> from bids.modeling import BIDSStatsModelsGraph
>>> # Initialize the BIDSStatsModelsGraph
>>> analysis = BIDSStatsModelsGraph('/bidsproject', 'model1.json')
>>> # Setup constructs all the design matrices
>>> analysis.setup()
>>> # Sample query: retrieve first-level design matrix for one run
>>> dm = analysis[0].get_design_matrix(subject='01', run=1, task='taskA')
>>> # Sample query: retrieve session-level contrast matrix
>>> cm = analysis[1].get_contrasts(subject='01', session='retest')
.. note::
For a more detailed example, please refer to the Tutorial: :doc:`/examples/statsmodels_tutorial`
================================================
FILE: doc/api.rst
================================================
API Reference
==============
.. _base_ref:
:mod:`bids.layout`: Querying BIDS datasets
------------------------------------------
.. autosummary:: bids.layout
:toctree: generated/
bids.layout.BIDSLayout
bids.layout.BIDSValidator
bids.layout.BIDSFile
bids.layout.BIDSDataFile
bids.layout.BIDSJSONFile
bids.layout.Config
bids.layout.Entity
bids.layout.Tag
bids.layout.parse_file_entities
bids.layout.add_config_paths
bids.layout.index.BIDSLayoutIndexer
bids.layout.writing
.. currentmodule:: bids
:mod:`bids.modeling`: Model specification for BIDS datasets
------------------------------------------------------------
.. autosummary:: bids.modeling
:toctree: generated/
bids.modeling.statsmodels
bids.modeling.auto_model
bids.modeling.statsmodels.BIDSStatsModelsGraph
bids.modeling.statsmodels.BIDSStatsModelsNode
.. currentmodule:: bids
.. _calibration_ref:
:mod:`bids.reports`: Data acquisition report generation
--------------------------------------------------------
.. autosummary:: bids.reports
:toctree: generated/
bids.reports.BIDSReport
bids.reports.parsing
bids.reports.parameters
bids.reports.utils
.. currentmodule:: bids
:mod:`bids.variables`: Variables
--------------------------------------------------
.. autosummary:: bids.variables
:toctree: generated/
bids.variables.SimpleVariable
bids.variables.SparseRunVariable
bids.variables.DenseRunVariable
bids.variables.BIDSVariableCollection
bids.variables.BIDSRunVariableCollection
bids.variables.merge_collections
bids.variables.load_variables
bids.variables.merge_variables
bids.variables.io
bids.variables.entities
bids.variables.collections
bids.variables.variables
.. currentmodule:: bids
:mod:`bids.config`: PyBIDS Configuration utilities
--------------------------------------------------
.. autosummary:: bids.config
:toctree: generated/
bids.config.set_option
bids.config.set_options
bids.config.get_option
bids.config.from_file
bids.config.reset_options
.. currentmodule:: bids
:mod:`bids.utils`: Utility functions
--------------------------------------------------
.. autosummary:: bids.utils
:toctree: generated/
bids.utils.listify
bids.utils.matches_entities
bids.utils.convert_JSON
bids.utils.make_bidsfile
.. currentmodule:: bids
================================================
FILE: doc/conf.py
================================================
# Configuration file for the Sphinx documentation builder. # noqa: D100, EXE002
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
from datetime import date
import sphinx_rtd_theme
import bids
sys.path.insert(0, os.path.abspath('../'))
# -- Project information -----------------------------------------------------
project = 'PyBIDS'
copyright = f'2015-{date.today().year}, Developers of PyBIDS' # noqa: A001, DTZ011
author = 'Developers of PyBIDS'
currentdir = os.path.abspath(os.path.dirname(__file__))
currentdir = os.path.abspath(os.path.dirname(__file__))
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.autosectionlabel',
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon',
'numpydoc',
'myst_nb',
]
intersphinx_mapping = {
'python': ('https://docs.python.org/3.5', None),
'numpy': ('https://docs.scipy.org/doc/numpy', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
'matplotlib': ('https://matplotlib.org/', None),
'scikit-learn': ('https://scikit-learn.org/0.17', None),
'nibabel': ('https://nipy.org/nibabel/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'neurosynth': ('https://neurosynth.readthedocs.io/en/latest/', None),
}
intersphinx_timeout = 5
# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '6.2.0'
# Generate stubs
autosummary_generate = True
autodoc_default_flags = ['members', 'inherited-members']
add_module_names = False
numpydoc_class_members_toctree = False
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = ['.rst', '.md']
# The master toctree document.
master_doc = 'index'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The short X.Y version.
version = bids.__version__
# The full version, including alpha/beta/rc tags.
release = version
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If false, no module index is generated.
html_domain_indices = False
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [('index', 'bids', 'bids Documentation', [author], 1)]
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
'index',
'bids',
'bids Documentation',
author,
'bids',
'One line description of project.',
'Miscellaneous',
),
]
# If false, no module index is generated.
texinfo_domain_indices = False
nb_custom_formats = {
'.md': ['jupytext.reads', {'fmt': 'mystnb'}],
}
================================================
FILE: doc/examples/index.rst
================================================
.. tutorials:
Tutorials
==========
The following executable examples are available.
Note that all of these tutorials are in the MyST format (`md`), and can downloaded and opened as a Jupyter Notebook in Jupyter Lab if Jupytext is installed. See `this guide <https://jupytext.readthedocs.io/en/latest/paired-notebooks.html>`_ to enable.
.. toctree::
:maxdepth: 1
pybids_tutorial.md
reports_tutorial.md
statsmodels_tutorial.md
================================================
FILE: doc/examples/pybids_tutorial.md
================================================
---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.14.1
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---
# Introduction to `pybids`
[`pybids`](https://github.com/bids-standard/pybids) is a tool to query, summarize and manipulate data using the BIDS standard.
In this tutorial we will use a `pybids` test dataset to illustrate some of the functionality of `pybids.layout`
```{code-cell} ipython3
from bids import BIDSLayout
from bids.tests import get_test_data_path
import os
```
## The `BIDSLayout`
At the core of pybids is the `BIDSLayout` object. A `BIDSLayout` is a lightweight Python class that represents a BIDS project file tree and provides a variety of helpful methods for querying and manipulating BIDS files. While the `BIDSLayout` initializer has a large number of arguments you can use to control the way files are indexed and accessed, you will most commonly initialize a `BIDSLayout` by passing in the BIDS dataset root location as a single argument:
```{code-cell} ipython3
# Here we're using an example BIDS dataset that's bundled with the pybids tests
data_path = os.path.join(get_test_data_path(), '7t_trt')
# Initialize the layout
layout = BIDSLayout(data_path)
# Print some basic information about the layout
layout
```
### Querying the `BIDSLayout`
When we initialize a `BIDSLayout`, all of the files and metadata found under the specified root folder are indexed. This can take a few seconds (or, for very large datasets, a minute or two). Once initialization is complete, we can start querying the `BIDSLayout` in various ways. The workhorse method is [`.get()`](https://bids-standard.github.io/pybids/generated/bids.grabbids.BIDSLayout.html#bids.grabbids.BIDSLayout.get). If we call `.get()` with no additional arguments, we get back a list of all the BIDS files in our dataset:
```{code-cell} ipython3
all_files = layout.get()
print("There are {} files in the layout.".format(len(all_files)))
print("\nThe first 10 files are:")
all_files[:10]
```
The returned object is a Python list. By default, each element in the list is a `BIDSFile` object. We discuss the `BIDSFile` object in much more detail below. For now, let's simplify things and work with just filenames:
```{code-cell} ipython3
layout.get(return_type='filename')[:10]
```
This time, we get back only the names of the files.
### Filtering files by entities
The utility of the `BIDSLayout` would be pretty limited if all we could do was retrieve a list of all files in the dataset. Fortunately, the `.get()` method accepts all kinds of arguments that allow us to filter the result set based on specified criteria. In fact, we can pass *any* BIDS-defined keywords (or, as they're called in PyBIDS, *entities*) as constraints. For example, here's how we would retrieve all BOLD runs with `.nii.gz` extensions for subject `'01'`:
```{code-cell} ipython3
# Retrieve filenames of all BOLD runs for subject 01
layout.get(subject='01', extension='nii.gz', suffix='bold', return_type='filename')
```
If you're wondering what entities you can pass in as filtering arguments, the answer is contained in the `.json` configuration files [housed here](https://github.com/bids-standard/pybids/tree/main/src/bids/layout/config). To save you the trouble, here are a few of the most common entities:
* `suffix`: The part of a BIDS filename just before the extension (e.g., `'bold'`, `'events'`, `'physio'`, etc.).
* `subject`: The subject label
* `session`: The session label
* `run`: The run index
* `task`: The task name
New entities are continually being defined as the spec grows, and in principle (though not always in practice), PyBIDS should be aware of all entities that are defined in the BIDS specification.
### Filtering by metadata
All of the entities listed above are found in the names of BIDS files. But sometimes we want to search for files based not just on their names, but also based on metadata defined (per the BIDS spec) in JSON files. Fortunately for us, when we initialize a `BIDSLayout`, all metadata files associated with BIDS files are automatically indexed. This means we can pass any key that occurs in any JSON file in our project as an argument to `.get()`. We can combine these with any number of core BIDS entities (like `subject`, `run`, etc.).
For example, say we want to retrieve all files where (a) the value of `SamplingFrequency` (a metadata key) is `100`, (b) the `acquisition` type is `'prefrontal'`, and (c) the subject is `'01'` or `'02'`. Here's how we can do that:
```{code-cell} ipython3
# Retrieve all files where SamplingFrequency (a metadata key) = 100
# and acquisition = prefrontal, for the first two subjects
layout.get(subject=['01', '02'], SamplingFrequency=100, acquisition="prefrontal")
```
Notice that we passed a list in for `subject` rather than just a string. This principle applies to all filters: you can always pass in a list instead of a single value, and this will be interpreted as a logical disjunction (i.e., a file must match any one of the provided values).
### Other `return_type` values
While we'll typically want to work with either `BIDSFile` objects or filenames, we can also ask `get()` to return unique values (or ids) of particular entities. For example, say we want to know which subjects have at least one `T1w` file. We can request that information by setting `return_type='id'`. When using this option, we also need to specify a target entity (or metadata keyword) called `target`. This combination tells the `BIDSLayout` to return the unique values for the specified `target` entity. For example, in the next example, we ask for all of the unique subject IDs that have at least one file with a `T1w` suffix:
```{code-cell} ipython3
# Ask get() to return the ids of subjects that have T1w files
layout.get(return_type='id', target='subject', suffix='T1w')
```
If our `target` is a BIDS entity that corresponds to a particular directory in the BIDS spec (e.g., `subject` or `session`) we can also use `return_type='dir'` to get all matching subdirectories:
```{code-cell} ipython3
layout.get(return_type='dir', target='subject')
```
### Other `get()` options
The `.get()` method has a number of other useful arguments that control its behavior. We won't discuss these in detail here, but briefly, here are a couple worth knowing about:
* `regex_search`: If you set this to `True`, string filter argument values will be interpreted as regular expressions.
* `scope`: If your BIDS dataset contains BIDS-derivatives sub-datasets, you can specify the scope (e.g., `derivatives`, or a BIDS-Derivatives pipeline name) of the search space.
+++
## The `BIDSFile`
When you call `.get()` on a `BIDSLayout`, the default returned values are objects of class `BIDSFile`. A `BIDSFile` is a lightweight container for individual files in a BIDS dataset. It provides easy access to a variety of useful attributes and methods. Let's take a closer look. First, let's pick a random file from our existing `layout`.
```{code-cell} ipython3
# Pick the 15th file in the dataset
bf = layout.get()[15]
# Print it
bf
```
Here are some of the attributes and methods available to us in a `BIDSFile` (note that some of these are only available for certain subclasses of `BIDSFile`; e.g., you can't call `get_image()` on a `BIDSFile` that doesn't correspond to an image file!):
* `.path`: The full path of the associated file
* `.filename`: The associated file's filename (without directory)
* `.dirname`: The directory containing the file
* `.get_entities()`: Returns information about entities associated with this `BIDSFile` (optionally including metadata)
* `.get_image()`: Returns the file contents as a nibabel image (only works for image files)
* `.get_df()`: Get file contents as a pandas DataFrame (only works for TSV files)
* `.get_metadata()`: Returns a dictionary of all metadata found in associated JSON files
* `.get_associations()`: Returns a list of all files associated with this one in some way
Let's see some of these in action.
```{code-cell} ipython3
# Print all the entities associated with this file, and their values
bf.get_entities()
```
```{code-cell} ipython3
# Print all the metadata associated with this file
bf.get_metadata()
```
```{code-cell} ipython3
# We can the union of both of the above in one shot like this
bf.get_entities(metadata='all')
```
Here are all the files associated with our target file in some way. Notice how we get back both the JSON sidecar for our target file, and the BOLD run that our target file contains physiological recordings for.
```{code-cell} ipython3
bf.get_associations()
```
+++ {"slideshow": {"slide_type": "slide"}}
In cases where a file has a `.tsv.gz` or `.tsv` extension, it will automatically be created as a `BIDSDataFile`, and we can easily grab the contents as a pandas `DataFrame`:
```{code-cell} ipython3
# Use a different test dataset--one that contains physio recording files
data_path = os.path.join(get_test_data_path(), 'synthetic')
layout2 = BIDSLayout(data_path)
# Get the first physiological recording file
recfile = layout2.get(suffix='physio')[0]
# Get contents as a DataFrame and show the first few rows
df = recfile.get_df()
df.head()
```
While it would have been easy enough to read the contents of the file ourselves with pandas' `read_csv()` method, notice that in the above example, `get_df()` saved us the trouble of having to read the physiological recording file's metadata, pull out the column names and sampling rate, and add timing information.
Mind you, if we don't *want* the timing information, we can ignore it:
```{code-cell} ipython3
recfile.get_df(include_timing=False).head()
```
## Other utilities
### Filename parsing
Say you have a filename, and you want to manually extract BIDS entities from it. The `parse_file_entities` method provides the facility:
```{code-cell} ipython3
path = "/a/fake/path/to/a/BIDS/file/sub-01_run-1_T2w.nii.gz"
layout.parse_file_entities(path)
```
A version of this utility independent of a specific layout is available at `bids.layout` ([doc](https://bids-standard.github.io/pybids/generated/bids.layout.parse_file_entities.html#bids.layout.parse_file_entities)) -
```{code-cell} ipython3
from bids.layout import parse_file_entities
path = "/a/fake/path/to/a/BIDS/file/sub-01_run-1_T2w.nii.gz"
parse_file_entities(path)
```
### Path construction
You may want to create valid BIDS filenames for files that are new or hypothetical that would sit within your BIDS project. This is useful when you know what entity values you need to write out to, but don't want to deal with looking up the precise BIDS file-naming syntax. In the example below, imagine we've created a new file containing stimulus presentation information, and we want to save it to a `.tsv.gz` file, per the BIDS naming conventions. All we need to do is define a dictionary with the name components, and `build_path` takes care of the rest (including injecting sub-directories!):
```{code-cell} ipython3
entities = {
'subject': '01',
'run': 2,
'task': 'nback',
'suffix': 'bold'
}
layout.build_path(entities)
```
You can also use `build_path` in more sophisticated ways—for example, by defining your own set of matching templates that cover cases not supported by BIDS out of the box. For example, suppose you want to create a template for naming a new z-stat file. You could do something like:
```{code-cell} ipython3
# Define the pattern to build out of the components passed in the dictionary
pattern = "sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_rec-{reconstruction}][_run-{run}][_echo-{echo}]_{suffix<z>}.nii.gz",
entities = {
'subject': '01',
'run': 2,
'task': 'nback',
'suffix': 'z'
}
# Notice we pass the new pattern as the second argument
layout.build_path(entities, pattern, validate=False)
```
Note that in the above example, we set `validate=False` to ensure that the standard BIDS file validator doesn't run (because the pattern we defined isn't actually compliant with the BIDS specification).
+++
### Loading derivatives
By default, `BIDSLayout` objects are initialized without scanning contained `derivatives/` directories. But you can easily ensure that all derivatives files are loaded and endowed with the extra structure specified in the [derivatives config file](https://github.com/bids-standard/pybids/blob/main/src/bids/layout/config/derivatives.json):
```{code-cell} ipython3
# Define paths to root and derivatives folders
root = os.path.join(get_test_data_path(), 'synthetic')
layout2 = BIDSLayout(root, derivatives=True)
layout2
```
The `scope` argument to `get()` specifies which part of the project to look in. By default, valid values are `'bids'` (for the "raw" BIDS project that excludes derivatives) and `'derivatives'` (for all BIDS-derivatives files). You can also pass the names of individual derivatives pipelines (e.g., passing `'fmriprep'` would search only in a `/derivatives/fmriprep` folder). Either a string or a list of strings can be passed.
The following call returns the filenames of all derivatives files.
```{code-cell} ipython3
# Get all files in derivatives
layout2.get(scope='derivatives', return_type='file')
```
### Exporting a `BIDSLayout` to a pandas `Dataframe`
If you want a summary of all the files in your `BIDSLayout`, but don't want to have to iterate `BIDSFile` objects and extract their entities, you can get a nice bird's-eye view of your dataset using the `to_df()` method.
```{code-cell} ipython3
# Convert the layout to a pandas dataframe
df = layout.to_df()
df.head()
```
We can also include metadata in the result if we like (which may blow up our `DataFrame` if we have a large dataset). Note that in this case, most of our cells will have missing values.
```{code-cell} ipython3
layout.to_df(metadata=True).head()
```
## Retrieving BIDS variables
BIDS variables are stored in .tsv files at the run, session, subject, or dataset level. You can retrieve these variables with `layout.get_collections()`. The resulting objects can be converted to dataframes and merged with the layout to associate the variables with corresponding scans.
In the following example, we request all subject-level variable data available anywhere in the BIDS project, and merge the results into a single `DataFrame` (by default, we'll get back a single `BIDSVariableCollection` object for each subject).
```{code-cell} ipython3
# Get subject variables as a dataframe and merge them back in with the layout
subj_df = layout.get_collections(level='subject', merge=True).to_df()
subj_df.head()
```
## BIDSValidator
`pybids` implicitly imports a `BIDSValidator` class from the separate [`bids-validator`](https://github.com/bids-standard/bids-validator) package. You can use the `BIDSValidator` to determine whether a filepath is a valid BIDS filepath, as well as answering questions about what kind of data it represents. Note, however, that this implementation of the BIDS validator is *not* necessarily up-to-date with the JavaScript version available online. Moreover, the Python validator only tests individual files, and is currently unable to validate entire BIDS datasets. For that, you should use the [online BIDS validator](https://bids-standard.github.io/bids-validator/).
```{code-cell} ipython3
from bids import BIDSValidator
# Note that when using the bids validator, the filepath MUST be relative to the top level bids directory
validator = BIDSValidator()
validator.is_bids('/sub-02/ses-01/anat/sub-02_ses-01_T2w.nii.gz')
```
```{code-cell} ipython3
# Can decide if a filepath represents a file part of the specification
validator.is_file('/sub-02/ses-01/anat/sub-02_ses-01_T2w.json')
```
```{code-cell} ipython3
# Can check if a file is at the top level of the dataset
validator.is_top_level('/dataset_description.json')
```
```{code-cell} ipython3
# or subject (or session) level
validator.is_subject_level('/dataset_description.json')
```
```{code-cell} ipython3
validator.is_session_level('/sub-02/ses-01/sub-02_ses-01_scans.json')
```
```{code-cell} ipython3
# Can decide if a filepath represents phenotypic data
validator.is_phenotypic('/sub-02/ses-01/anat/sub-02_ses-01_T2w.nii.gz')
```
================================================
FILE: doc/examples/reports_tutorial.md
================================================
---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.14.1
kernelspec:
display_name: Python 3
language: python
name: python3
---
# Writing methods reports with `pybids.reports`
This tutorial
```{code-cell} ipython3
%load_ext autoreload
%autoreload 2
from bids import BIDSLayout
from bids.reports import BIDSReport
from bids.tests import get_test_data_path
import os
```
```{code-cell} ipython3
dataset = "synthetic"
# Here we're using an example BIDS dataset that's bundled with the pybids tests
data_path = os.path.join(get_test_data_path(), dataset)
# Load the BIDS dataset
layout = BIDSLayout(data_path)
```
```{code-cell} ipython3
# Initialize a report for the dataset
report = BIDSReport(layout)
```
```{code-cell} ipython3
# Method generate returns a Counter of unique descriptions across subjects
descriptions = report.generate()
```
```{code-cell} ipython3
# For datasets containing a single study design, all but the most common
# description most likely reflect random missing data.
pub_description = descriptions.most_common()[0][0]
print(pub_description)
```
================================================
FILE: doc/examples/statsmodels_tutorial.md
================================================
---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.14.1
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---
# Executing and inspecting StatsModels with `pybids.modeling`
A minimalistic tutorial illustrating usage of the tools in the `bids.modeling` module—most notably, `BIDSStatsModelsGraph` and its various components.
```{code-cell} ipython3
%load_ext autoreload
%autoreload 2
import pandas as pd
import numpy as np
from bids.modeling import BIDSStatsModelsGraph
from bids.layout import BIDSLayout
from bids.tests import get_test_data_path
from os.path import join
import json
```
## Load BIDSLayout
Standard stuff: load the `BIDSLayout` object (we'll use the ds005 dataset bundled with PyBIDS tests) and read in one of the included model files (`ds005/models/ds-005_type-test_model.json`).
```{code-cell} ipython3
layout_path = join(get_test_data_path(), 'ds005')
layout = BIDSLayout(layout_path)
json_file = join(layout_path, 'models', 'ds-005_type-test_model.json')
spec = json.load(open(json_file, 'r'))
```
## Initialize the graph
The `BIDSStatsModelsGraph` is the primary interface to design data, model constructions, etc. We build it from a `BIDSLayout` and the contents of a JSON model file.
```{code-cell} ipython3
graph = BIDSStatsModelsGraph(layout, spec)
```
## Load variables from BIDS dataset
We will typically want to load variables into BIDS "collections" from the BIDS project. The `scan_length` argument is only necessary here because the test dataset doesn't actually include nifti image headers, so duration of scans can't be inferred. In typical use, you can call this without arguments.
```{code-cell} ipython3
graph.load_collections(scan_length=480)
```
## Access specific nodes
Now that the graph is loaded, we can start interacting with its nodes. We'll typically start with the root node, which will usually contain the run-level model information. We can either access the `.root_node`, or use `get_node()` to get the node by its unique name (defined in the JSON file).
```{code-cell} ipython3
# Equivalent to calling graph.get_node('run') in this case.
root_node = graph.root_node
```
## Inspect `BIDSVariableCollection`
+++
We can take a look at the original variables available for each node prior to running the node (i.e. applying any transformations)
```{code-cell} ipython3
colls = root_node.get_collections()
first_sub = colls[0] # Collection for the first subject / run
```
```{code-cell} ipython3
first_sub.to_df(entities=False)
```
Note that by default `to_df` combines both sparse and dense variables.
We can take a look at the individual variable objects as well:
```{code-cell} ipython3
first_sub.variables
```
## Executing a node
We can "run" each node to produce design matrices for each unique combination of entities/inputs we want. This is determined by the grouping structure. When working with the API directly, this is indicated via the `group_by` argument to a `.run()` method. In this case, we're indicating that the design information should be set up separately for every unique combination of `run` and `subject`.
Note that we need to include `subject` even though this is a strictly run-level model, because if we only pass `['run']`, there will only be 3 separate analyses conducted: one for run 1, one for run 2, and one for run 3. Whereas what we actually want is for the procedure to be done separately for each unique combination of the 3 runs and 16 subjects (i.e., 48 times).
```{code-cell} ipython3
# force_dense controls whether the output for run-level design matrices
# will be resampled to a uniform "dense" representation, or left alone
# as a sparse representation if possible.
outputs = root_node.run(group_by=['run', 'subject'], force_dense=False, transformation_history=True)
```
## Node outputs
+++
The result is a list of objects of type `BIDSStatsModelsNodeOutput`. This is a lightweight container that stores design information and various other useful pieces of information. There should one element in the list for each unique combination of the grouping variables (in this case, run and subject):
```{code-cell} ipython3
len(outputs)
```
```{code-cell} ipython3
# The first 10 `BIDSStatsModelsNodeOutput` objects
outputs[:10]
```
Let's take a closer look at the `BIDSStatsModelsNodeOutput`. First, we have an `.entities` attribute that tells us what levels of the grouping variables this output corresponds to:
```{code-cell} ipython3
outputs[0].entities
```
Next, we can get the design matrix itself via the `.X` attribute:
```{code-cell} ipython3
outputs[0].X
```
Here we have a column for each of the contrasts specified in the model (with the same name as the contrast). We can access the contrasts too, via—you guessed it—`.contrasts`:
```{code-cell} ipython3
outputs[0].contrasts
```
Each `ContrastInfo` is a named tuple with fields that map directly on the definition of contrasts in the BIDS-StatsModels specification. The only addition is the inclusion of an `.entities` field that stores a dictionary of the entities that identify what subset of our data the contrast applies to.
One thing you might be puzzled by, looking at the output of the `.X` call above, is the absence of any timing information. `.X` is supposed to give us a design matrix, but how come the output only has the actual values for each column, and no information about event timing? How are we supposed to know what the onsets, durations, etc. of each event are?
The answer is that `.X` contains *only* the actual values that go into the design matrix, and not any metadata—no matter how important. Fortunately, that metadata is available to us. It's conveniently stored in a `.metadata` attribute on the `BIDSStatsModelsNodeOutput` object.
```{code-cell} ipython3
outputs[0].metadata
```
There's a 1-to-1 mapping from rows in `.X` to rows in `.metadata`. This means you can, if you like, simply concatenate the two along the column axis to get one big DataFrame with everything. But by maintaining a default separation, it's made very clear to us which columns are properly a part of the design, and which contain additional metadata.
+++
## Transformation History
+++
To generate the final design matrix, pybids applies all transformations specified in the model for that given run.
However, it's often useful to look at the intermediary outputs from each transformation to perform sanity checks, such as previewing the variable prior to convolution.
Optionally, you can run the `Node` with `transformation_history=True`, and the `BIDSStatsModelsNodeOutput` object will have a `trans_hist` attribute which is a list of intermediary outputs after every transformation
```{code-cell} ipython3
ts = outputs[0].trans_hist
ts
```
The first item (index=0), is the original collection. We can access the `BIDSRunVariableCollection` using the output attribute:
```{code-cell} ipython3
ts[0].output
```
We can examine the full collection at each step using either a combined dataframe:
```{code-cell} ipython3
ts[1].output.to_df(entities=False)
```
Or examine individual variables in their native representation (e.g. `SparseRunVariable` or `DenseRunVariable`)
```{code-cell} ipython3
ts[1].output.variables
```
```{code-cell} ipython3
ts[1].output.variables['RT'].to_df(entities=False)
```
## Traversing the graph
So far we've executed the root node, which by definition required no inputs from any previous node. But in typical workflows, we'll be passing outputs from one node in as inputs to another. For example, we often want to take the run-level parameter estimates and pass them to a subject-level model that does nothing but average over runs within each subject. This requires us to somehow traverse the graph based on the edges specified in the BIDS-StatsModel document. We can do that by taking advantage of each node's `.children` attribute, which contains a list of `BIDSStatsModelsEdge` named tuples that specify an edge between two nodes.
```{code-cell} ipython3
root_node.children
```
In this case the root node connects to only one other node. We can directly access that node by following the `.destination` property of the edge:
```{code-cell} ipython3
next_node = root_node.children[0].destination
next_node.level, next_node.name
```
We assign the first connected node to `next_node`, and print out its `level` and `name` for inspection (both are session).
## Passing in inputs
Armed with that, we can run the session node and proceed and before. However, there's a twist: whereas the root node only needs to know about variables loaded directly from the `BIDSLayout` (which we achieved with that `.load_collections()` call earlier), the session node can't get the inputs it needs from the `BIDSLayout`, because there aren't any (at least in this particular dataset). What we want to do at the session level is average over our run-level estimates within-session. But to do that, we need to actually pass in information about those runs!
The way we do this is to pass, as the first argument to `.run()`, a list of `ContrastInfo` objects informing our node about what inputs it should use to construct its design matrices. The typical use pattern is to pass one concatenated list containing *all* of the outputs from the previous level that we want to pass on. Note that we may not want to pass *all* of the outputs forward. For example, suppose that 2 out of 48 run-level models failed during the estimation process. We might not want to keep passing information about those 2 runs forward, as we can't compute them. So we can always filter the list of `ContrastInfo` objects we received from the previous node before we pass them on to the next node. (We could also do other things, like rename each `ContrastInfo` to use whatever naming scheme our software prefers; modifying the entities; and so on. But we won't do any of that here.)
Let's concatenate the 48 outputs we got from the previous level and drop the last 2, in preparation for passing them forward to our `next_node`:
```{code-cell} ipython3
from itertools import chain
contrasts = list(chain(*[s.contrasts for s in outputs[:-2]]))
len(contrasts)
```
Notice that we're left we're 138 individual `ContrastInfo` objects. Why 138? Because we have ((3 runs x 16 subjects) - 2) * 3 contrasts. Recall that we're dropping the last two of the 48 outputs from the previous level. But each of those lists contains *three* `ContrastInfo` objects (one per contrast—`RT`, `gain`, and the `RT:gain` interaction). Hence, 138.
Now we can call `.run()` on our session-level node, passing in the contrasts as inputs. We want the model specification (i.e., the part in the `"Model"` section of the node) to be applied separately to each unique combination of `contrast`, `session`, and `subject`.
```{code-cell} ipython3
sess_outputs = next_node.run(contrasts, group_by=['subject', 'contrast'])
len(sess_outputs)
```
Again we get back a list of `BIDSStatsModelsNodeOutput` objects. And again we have 48 of them. It might seem odd that we have the same number of outputs from a subject-level node as we had from the run-level node, but there's actually a difference. In the run-level case, our 48 results reflected 16 subjects x 3 runs. In the subject-level case, we *have* successfully aggregated over runs within each subject, but we now have 3 sets of contrasts producing outputs (i.e., 16 subjects x 3 contrasts).
This becomes clearer if we inspect the same attributes we looked at earlier:
```{code-cell} ipython3
sess_outputs[0].contrasts
```
```{code-cell} ipython3
# Concatenate the X and metadata DFs for easy reading.
# Note that only the first column is actually part of the
# design matrix; the others are just metadata.
pd.concat([sess_outputs[0].X, sess_outputs[0].metadata], axis=1)
```
Notice how the entities differ: the run-level node grouped on `run` and `subject`; the subject-level node groups on `subject` and `contrast`. The number of outputs is identical in both cases, but this is just an (un)happy accident, not a general principle. You can verify this for yourself by re-running the subject-level node with a different grouping (e.g., only `['subject']`).
================================================
FILE: doc/includes/big_toc_css.rst
================================================
..
File to ..include in a document with a big table of content, to give
it 'style'
:orphan:
.. raw:: html
<style type="text/css">
div.bodywrapper blockquote {
margin: 0 ;
}
div.toctree-wrapper ul {
margin-top: 0 ;
margin-bottom: 0 ;
padding-left: 10px ;
}
li.toctree-l1 {
padding: 0 0 0.5em 0 ;
list-style-type: none;
font-size: 150% ;
font-weight: bold;
}
li.toctree-l1 ul {
padding-left: 40px ;
}
li.toctree-l2 {
font-size: 75% ;
list-style-type: square;
font-weight: normal;
}
li.toctree-l3 {
font-size: 85% ;
list-style-type: circle;
font-weight: normal;
}
</style>
================================================
FILE: doc/includes/bigger_toc_css.rst
================================================
..
File to ..include in a document with a very big table of content, to
give it 'style'
:orphan:
.. raw:: html
<style type="text/css">
div.bodywrapper blockquote {
margin: 0 ;
}
div.toctree-wrapper ul {
margin: 0 ;
padding-left: 0px ;
}
li.toctree-l1 {
padding: 0 ;
list-style-type: none;
font-size: 150% ;
font-family: Arial, sans-serif;
background-color: #BED4EB;
font-weight: normal;
color: #212224;
margin-left : 0;
font-weight: bold;
}
li.toctree-l1 a {
padding: 0 0 0 10px ;
}
li.toctree-l2 {
padding: 0.25em 0 0.25em 0 ;
list-style-type: none;
background-color: #FFFFFF;
font-size: 90% ;
font-weight: bold;
}
li.toctree-l2 ul {
padding-left: 40px ;
}
li.toctree-l3 {
font-size: 70% ;
list-style-type: none;
font-weight: normal;
}
li.toctree-l4 {
font-size: 85% ;
list-style-type: none;
font-weight: normal;
}
</style>
================================================
FILE: doc/index.rst
================================================
.. bids
Welcome to pybids's documentation!
====================================
``pybids`` is a set of tools for working with Brain Imaging Data Structure (BIDS) datasets.
For more information about BIDS, please visit the `BIDS website`_.
.. _BIDS website: https://bids.neuroimaging.io
Contents
==========
.. toctree::
:maxdepth: 2
user_guide.rst
examples/index.rst
api.rst
whats_new.rst
Citing pybids
=============
To credit PyBIDS in your work, please cite both the `JOSS paper <https://joss.theoj.org/papers/10.21105/joss.01294>`_ and the `Zenodo archive <https://zenodo.org/record/3363985>`_. The former provides a high level description of the package, and the latter points to a permanent record of all PyBIDS versions (we encourage you to cite the specific version you used). Example citations (for PyBIDS 0.9.3):
Yarkoni et al., (2019). PyBIDS: Python tools for BIDS datasets. Journal of Open Source Software, 4(40), 1294, https://doi.org/10.21105/joss.01294
Yarkoni, Tal, Markiewicz, Christopher J., de la Vega, Alejandro, Gorgolewski, Krzysztof J., Halchenko, Yaroslav O., Salo, Taylor, … Blair, Ross. (2019, August 8). bids-standard/pybids: 0.9.3 (Version 0.9.3). Zenodo. https://doi.org/10.5281/zenodo.3363985
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
================================================
FILE: doc/introduction.rst
================================================
.. _introduction:
=====================================================
Introduction: What is pybids?
=====================================================
.. contents:: **Contents**
:local:
:depth: 1
What is BIDS and why should you use it?
========================================
.. topic:: **Why use BIDS?**
The Brain Imaging Data Structure provides a standard for organizing, naming, and
describing neuroimaging datasets. By organizing your data in this manner, you can
make sure of a number of tools that are designed to work with BIDS datasets out
of the box. Moreover, many open datasets are provided in BIDS format, which
means that being familiar with this structure will make it easier for you to
analyze public data as well as your own.
For more information on the Brain Imaging Data Structure (BIDS), visit https://bids.neuroimaging.io.
What is pybids and why should you use it?
==========================================
.. topic:: **Why use pybids?**
Pybids makes it easier for neuroimagers who utilize the BIDS standard to query,
summarize, and manipulate their data. A number of Python packages for analyzing
neuroimaging data, including `Nipype`_ and `nilearn`_, are optimized to
work with BIDS datasets.
Installing pybids
=================
Pybids is easy to install.
To install the most recent release, use pip::
>>> pip install pybids
If you want the "bleeding-edge" version of pybids, you can install directly from
the GitHub repository::
>>> pip install git+https://github.com/bids-standard/pybids.git
Finding help
==============
:Mailing lists and forums:
* Don't hesitate to ask questions about pybids on `NeuroStars
<https://neurostars.org/tags/pybids>`_.
* You can find help with neuroimaging in Python (file I/O,
neuroimaging-specific questions) via the nipy user group:
https://groups.google.com/forum/?fromgroups#!forum/nipy-user
* If you notice a bug in the pybids code, please `open an issue`_ in the
pybids repository.
.. _nilearn: https://nilearn.github.io
.. _Nipype: https://nipype.readthedocs.io
.. _open an issue: https://github.com/bids-standard/pybids/issues
================================================
FILE: doc/layout/index.rst
================================================
.. _layout:
=====================================================
``layout``: Querying BIDS datasets
=====================================================
.. contents:: **Contents**
:local:
:depth: 1
|
.. currentmodule:: pybids.layout
.. _loading_datasets:
Loading BIDS datasets
===========================================
The :obj:`bids.layout.BIDSLayout` class requires the path to a valid BIDS dataset::
>>> from os.path import join
>>> from bids import BIDSLayout
>>> from bids.tests import get_test_data_path
>>> layout = BIDSLayout(join(get_test_data_path(), 'synthetic'))
The ``BIDSLayout`` instance is a lightweight container for all of the files in the
BIDS project directory. It automatically detects any BIDS entities found in the
file paths, and allows us to perform simple but relatively powerful queries over
the file tree. By default, defined BIDS entities include things like "subject",
"session", "run", and "type".
.. hint::
To exclude folders from indexing (e.g. only index a subset of subjects to save time),
you can pass a list of folder names, or a regex pattern to the ``ignore`` argument.
For example, to ignore all subjects except "25":
>>> BIDSLayout(bids_dir, ignore=[re.compile(r"(sub-(?!25)\d*/)")])
.. _querying_datasets:
Querying datasets
===========================================
Pybids layouts can be queried according to a number of parameters, using
grabbit's ``get`` functionality.
For example, if we want to get a list of subjects in the dataset::
>>> layout.get_subjects()
['01', '02', '03', '04', '05']
We can also get a list of all available sessions::
>>> layout.get_sessions()
['01', '02']
Or a list of tasks::
>>> layout.get_tasks()
['nback', 'rest']
.. extracting_metadata:
Extracting metadata
====================
A number of ``BIDSLayout`` methods extract metadata associated with files.
For example, if we want event (task timing) information for a given fMRI scan, we can use ``get_events``::
>>> f = layout.get(task='nback', run=1, extension='nii.gz')[0].filename
>>> layout.get_events(f)
We can also extract metadata from the json files associated with a scan file::
>>> f = layout.get(task='nback', run=1, extension='nii.gz')[0].filename
>>> layout.get_metadata(f)
.. note::
For a more detailed set of examples, please refer to the Tutorial: :doc:`/examples/pybids_tutorial`
================================================
FILE: doc/make.bat
================================================
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
================================================
FILE: doc/reports/index.rst
================================================
.. _reports:
=====================================================
``reports``: Data acquisition report generation
=====================================================
.. contents:: **Contents**
:local:
:depth: 1
|
.. currentmodule:: pybids.reports
.. _initializing_reports:
Initializing reports
===========================================
The :obj:`bids.reports.BIDSReport` class requires a :obj:`bids.BIDSLayout` object as an argument::
>>> from os.path import join
>>> from bids import BIDSLayout
>>> from bids.reports import BIDSReport
>>> from bids.tests import get_test_data_path
>>> layout = BIDSLayout(join(get_test_data_path(), 'synthetic'))
>>> report = BIDSReport(layout)
.. _generating_reports:
Generating reports
===========================================
Pybids reports are then generated with the ``generate`` method, which returns a
:obj:`collections.Counter` of reports::
>>> counter = report.generate()
>>> main_report = counter.most_common()[0][0]
>>> print(main_report)
r"""
For session 01:
MR data were acquired using a UNKNOWN-Tesla MANUFACTURER MODEL MRI scanner.
Ten runs of N-Back UNKNOWN-echo fMRI data were collected (64 slices; repetition time, TR=2500ms;
echo time, TE=UNKNOWNms; flip angle, FA=UNKNOWN<deg>; field of view, FOV=128x128mm;
matrix size=64x64; voxel size=2x2x2mm). Each run was 2:40 minutes in length, during
which 64 functional volumes were acquired.
Five runs of Rest UNKNOWN-echo fMRI data were collected (64 slices; repetition time, TR=2500ms;
echo time, TE=UNKNOWNms; flip angle, FA=UNKNOWN<deg>; field of view, FOV=128x128mm;
matrix size=64x64; voxel size=2x2x2mm). Each run was 2:40 minutes in length, during
which 64 functional volumes were acquired.
For session 02:
MR data were acquired using a UNKNOWN-Tesla MANUFACTURER MODEL MRI scanner.
Ten runs of N-Back UNKNOWN-echo fMRI data were collected (64 slices; repetition time, TR=2500ms;
echo time, TE=UNKNOWNms; flip angle, FA=UNKNOWN<deg>; field of view, FOV=128x128mm;
matrix size=64x64; voxel size=2x2x2mm). Each run was 2:40 minutes in length, during
which 64 functional volumes were acquired.
Five runs of Rest UNKNOWN-echo fMRI data were collected (64 slices; repetition time, TR=2500ms;
echo time, TE=UNKNOWNms; flip angle, FA=UNKNOWN<deg>; field of view, FOV=128x128mm;
matrix size=64x64; voxel size=2x2x2mm). Each run was 2:40 minutes in length, during
which 64 functional volumes were acquired.
Dicoms were converted to NIfTI-1 format. This section was (in part) generated
automatically using pybids (0.5)."""
.. _generating_subreports:
Generating reports on subsets of the data
-------------------------------------------
The ``generate`` method allows for keyword restrictions, just like
:obj:`bids.BIDSLayout`'s ``get`` method. For example, to
generate a report only for ``nback`` task data in session ``01``::
>>> counter = report.generate(session='01', task='nback')
>>> main_report = counter.most_common()[0][0]
>>> print(main_report)
r"""
For session 01:
MR data were acquired using a UNKNOWN-Tesla MANUFACTURER MODEL MRI scanner.
Ten runs of N-Back fMRI data were collected (64 slices; repetition time,
TR=2500ms; echo time, TE=UNKNOWNms; flip angle, FA=UNKNOWN<deg>; field of
view, FOV=128x128mm; matrix size=64x64; voxel size=2x2x2mm). Each run was
2:40 minutes in length, during which 64 functional volumes were acquired.
Dicoms were converted to NIfTI-1 format. This section was (in part)
generated automatically using pybids (0.5)."""
.. note::
For a more detailed set of examples, please refer to the Tutorial: :doc:`/examples/reports_tutorial`.
================================================
FILE: doc/sphinxext/docscrape.py
================================================
# ruff: noqa: D301
"""Extract reference documentation from the NumPy source tree."""
import collections
import inspect
import pydoc
import re
import textwrap
from warnings import warn
class Reader:
"""A line-based string reader."""
def __init__(self, data):
"""Parameters # noqa: D301
----------
data : str
String with lines separated by '\n'.
"""
if isinstance(data, list):
self._str = data
else:
self._str = data.split('\n') # store string as list of lines
self.reset()
def __getitem__(self, n):
return self._str[n]
def reset(self): # noqa: D102
self._l = 0 # current line nr
def read(self): # noqa: D102
if not self.eof():
out = self[self._l]
self._l += 1
return out
else:
return ''
def seek_next_non_empty_line(self): # noqa: D102
for l in self[self._l :]: # noqa: E741
if l.strip():
break
else:
self._l += 1
def eof(self): # noqa: D102
return self._l >= len(self._str)
def read_to_condition(self, condition_func): # noqa: D102
start = self._l
for line in self[start:]:
if condition_func(line):
return self[start : self._l]
self._l += 1
if self.eof():
return self[start : self._l + 1]
return []
def read_to_next_empty_line(self): # noqa: D102
self.seek_next_non_empty_line()
def is_empty(line):
return not line.strip()
return self.read_to_condition(is_empty)
def read_to_next_unindented_line(self): # noqa: D102
def is_unindented(line):
return line.strip() and (len(line.lstrip()) == len(line))
return self.read_to_condition(is_unindented)
def peek(self, n=0): # noqa: D102
if self._l + n < len(self._str):
return self[self._l + n]
else:
return ''
def is_empty(self): # noqa: D102
return not ''.join(self._str).strip()
class NumpyDocString(collections.abc.Mapping): # noqa: D101
def __init__(self, docstring, config={}): # noqa: B006
docstring = textwrap.dedent(docstring).split('\n')
self._doc = Reader(docstring)
self._parsed_data = {
'Signature': '',
'Summary': [''],
'Extended Summary': [],
'Parameters': [],
'Returns': [],
'Yields': [],
'Raises': [],
'Warns': [],
'Other Parameters': [],
'Attributes': [],
'Methods': [],
'See Also': [],
'Notes': [],
'Warnings': [],
'References': '',
'Examples': '',
'index': {},
}
self._parse()
def __getitem__(self, key):
return self._parsed_data[key]
def __setitem__(self, key, val):
if key not in self._parsed_data:
warn('Unknown section %s' % key) # noqa: B028, UP031
else:
self._parsed_data[key] = val
def __iter__(self):
return iter(self._parsed_data)
def __len__(self):
return len(self._parsed_data)
def _is_at_section(self):
self._doc.seek_next_non_empty_line()
if self._doc.eof():
return False
l1 = self._doc.peek().strip() # e.g. Parameters
if l1.startswith('.. index::'):
return True
l2 = self._doc.peek(1).strip() # ---------- or ==========
return l2.startswith('-' * len(l1)) or l2.startswith('=' * len(l1))
def _strip(self, doc):
i = 0
j = 0
for i, line in enumerate(doc): # noqa: B007
if line.strip():
break
for j, line in enumerate(doc[::-1]): # noqa: B007
if line.strip():
break
return doc[i : len(doc) - j]
def _read_to_next_section(self):
section = self._doc.read_to_next_empty_line()
while not self._is_at_section() and not self._doc.eof():
if not self._doc.peek(-1).strip(): # previous line was empty
section += ['']
section += self._doc.read_to_next_empty_line()
return section
def _read_sections(self):
while not self._doc.eof():
data = self._read_to_next_section()
name = data[0].strip()
if name.startswith('..'): # index section
yield name, data[1:]
elif len(data) < 2:
yield StopIteration
else:
yield name, self._strip(data[2:])
def _parse_param_list(self, content):
r = Reader(content)
params = []
while not r.eof():
header = r.read().strip()
if ' : ' in header:
arg_name, arg_type = header.split(' : ')[:2]
else:
arg_name, arg_type = header, ''
desc = r.read_to_next_unindented_line()
desc = dedent_lines(desc)
params.append((arg_name, arg_type, desc))
return params
_name_rgx = re.compile(
r'^\s*(:(?P<role>\w+):`(?P<name>[a-zA-Z0-9_.-]+)`|'
r' (?P<name2>[a-zA-Z0-9_.-]+))\s*',
re.X,
)
def _parse_see_also(self, content):
"""func_name : Descriptive text
continued text
another_func_name : Descriptive text
func_name1, func_name2, :meth:`func_name`, func_name3
"""
items = []
def parse_item_name(text):
"""Match ':role:`name`' or 'name'"""
m = self._name_rgx.match(text)
if m:
g = m.groups()
if g[1] is None:
return g[3], None
else:
return g[2], g[1]
raise ValueError('%s is not a item name' % text) # noqa: UP031
def push_item(name, rest):
if not name:
return
name, role = parse_item_name(name)
items.append((name, list(rest), role))
del rest[:]
current_func = None
rest = []
for line in content:
if not line.strip():
continue
m = self._name_rgx.match(line)
if m and line[m.end() :].strip().startswith(':'):
push_item(current_func, rest)
current_func, line = line[: m.end()], line[m.end() :]
rest = [line.split(':', 1)[1].strip()]
if not rest[0]:
rest = []
elif not line.startswith(' '):
push_item(current_func, rest)
current_func = None
if ',' in line:
for func in line.split(','):
if func.strip():
push_item(func, [])
elif line.strip():
current_func = line
elif current_func is not None:
rest.append(line.strip())
push_item(current_func, rest)
return items
def _parse_index(self, section, content):
""".. index: default
:refguide: something, else, and more
"""
def strip_each_in(lst):
return [s.strip() for s in lst]
out = {}
section = section.split('::')
if len(section) > 1:
out['default'] = strip_each_in(section[1].split(','))[0]
for line in content:
line = line.split(':')
if len(line) > 2:
out[line[1]] = strip_each_in(line[2].split(','))
return out
def _parse_summary(self):
"""Grab signature (if given) and summary"""
if self._is_at_section():
return
# If several signatures present, take the last one
while True:
summary = self._doc.read_to_next_empty_line()
summary_str = ' '.join([s.strip() for s in summary]).strip()
if re.compile(r'^([\w., ]+=)?\s*[\w\.]+\(.*\)$').match(summary_str):
self['Signature'] = summary_str
if not self._is_at_section():
continue
break
if summary is not None:
self['Summary'] = summary
if not self._is_at_section():
self['Extended Summary'] = self._read_to_next_section()
def _parse(self):
self._doc.reset()
self._parse_summary()
sections = list(self._read_sections())
section_names = set([section for section, content in sections]) # noqa: C403
has_returns = 'Returns' in section_names
has_yields = 'Yields' in section_names
# We could do more tests, but we are not. Arbitrarily.
if has_returns and has_yields:
msg = 'Docstring contains both a Returns and Yields section.'
raise ValueError(msg)
for section, content in sections:
if not section.startswith('..'):
section = (s.capitalize() for s in section.split(' '))
section = ' '.join(section)
if section in (
'Parameters',
'Returns',
'Yields',
'Raises',
'Warns',
'Other Parameters',
'Attributes',
'Methods',
):
self[section] = self._parse_param_list(content)
elif section.startswith('.. index::'):
self['index'] = self._parse_index(section, content)
elif section == 'See Also':
self['See Also'] = self._parse_see_also(content)
else:
self[section] = content
# string conversion routines
def _str_header(self, name, symbol='-'):
return [name, len(name) * symbol]
def _str_indent(self, doc, indent=4):
out = []
for line in doc:
out += [' ' * indent + line]
return out
def _str_signature(self):
if self['Signature']:
return [self['Signature'].replace('*', r'\*')] + ['']
else:
return ['']
def _str_summary(self):
if self['Summary']:
return self['Summary'] + ['']
else:
return []
def _str_extended_summary(self):
if self['Extended Summary']:
return self['Extended Summary'] + ['']
else:
return []
def _str_param_list(self, name):
out = []
if self[name]:
out += self._str_header(name)
for param, param_type, desc in self[name]:
if param_type:
out += ['%s : %s' % (param, param_type)] # noqa: UP031
else:
out += [param]
out += self._str_indent(desc)
out += ['']
return out
def _str_section(self, name):
out = []
if self[name]:
out += self._str_header(name)
out += self[name]
out += ['']
return out
def _str_see_also(self, func_role):
if not self['See Also']:
return []
out = []
out += self._str_header('See Also')
last_had_desc = True
for func, desc, role in self['See Also']:
if role:
link = ':%s:`%s`' % (role, func) # noqa: UP031
elif func_role:
link = ':%s:`%s`' % (func_role, func) # noqa: UP031
else:
link = '`%s`_' % func # noqa: UP031
if desc or last_had_desc:
out += ['']
out += [link]
else:
out[-1] += ', %s' % link # noqa: UP031
if desc:
out += self._str_indent([' '.join(desc)])
last_had_desc = True
else:
last_had_desc = False
out += ['']
return out
def _str_index(self):
idx = self['index']
out = []
out += ['.. index:: %s' % idx.get('default', '')] # noqa: UP031
for section, references in idx.items():
if section == 'default':
continue
out += [' :%s: %s' % (section, ', '.join(references))] # noqa: UP031
return out
def __str__(self, func_role=''):
out = []
out += self._str_signature()
out += self._str_summary()
out += self._str_extended_summary()
for param_list in (
'Parameters',
'Returns',
'Yields',
'Other Parameters',
'Raises',
'Warns',
):
out += self._str_param_list(param_list)
out += self._str_section('Warnings')
out += self._str_see_also(func_role)
for s in ('Notes', 'References', 'Examples'):
out += self._str_section(s)
for param_list in ('Attributes', 'Methods'):
out += self._str_param_list(param_list)
out += self._str_index()
return '\n'.join(out)
def indent(str, indent=4): # noqa: A002, D103
indent_str = ' ' * indent
if str is None:
return indent_str
lines = str.split('\n')
return '\n'.join(indent_str + l for l in lines) # noqa: E741
def dedent_lines(lines):
"""Deindent a list of lines maximally"""
return textwrap.dedent('\n'.join(lines)).split('\n')
def header(text, style='-'): # noqa: D103
return text + '\n' + style * len(text) + '\n'
class FunctionDoc(NumpyDocString): # noqa: D101
def __init__(self, func, role='func', doc=None, config={}): # noqa: B006
self._f = func
self._role = role # e.g. "func" or "meth"
if doc is None:
if func is None:
raise ValueError('No function or docstring given')
doc = inspect.getdoc(func) or ''
NumpyDocString.__init__(self, doc)
if not self['Signature'] and func is not None:
func, func_name = self.get_func()
try:
# try to read signature
argspec = inspect.getfullargspec(func)
argspec = inspect.formatargspec(*argspec)
argspec = argspec.replace('*', r'\*')
signature = '%s%s' % (func_name, argspec) # noqa: UP031
except TypeError:
signature = '%s()' % func_name # noqa: UP031
self['Signature'] = signature
def get_func(self): # noqa: D102
func_name = getattr(self._f, '__name__', self.__class__.__name__)
if inspect.isclass(self._f):
func = getattr(self._f, '__call__', self._f.__init__) # noqa: B004
else:
func = self._f
return func, func_name
def __str__(self):
out = ''
func, func_name = self.get_func()
signature = self['Signature'].replace('*', r'\*') # noqa: F841
roles = {'func': 'function', 'meth': 'method'}
if self._role:
if self._role not in roles:
print('Warning: invalid role %s' % self._role) # noqa: UP031
out += '.. %s:: %s\n \n\n' % (roles.get(self._role, ''), func_name) # noqa: UP031
out += super().__str__(func_role=self._role)
return out
class ClassDoc(NumpyDocString): # noqa: D101
extra_public_methods = ['__call__']
def __init__(self, cls, doc=None, modulename='', func_doc=FunctionDoc, config={}): # noqa: B006
if not inspect.isclass(cls) and cls is not None:
raise ValueError('Expected a class or None, but got %r' % cls) # noqa: UP031
self._cls = cls
self.show_inherited_members = config.get('show_inherited_class_members', True)
if modulename and not modulename.endswith('.'):
modulename += '.'
self._mod = modulename
if doc is None:
if cls is None:
raise ValueError('No class or documentation string given')
doc = pydoc.getdoc(cls)
NumpyDocString.__init__(self, doc)
if config.get('show_class_members', True):
def splitlines_x(s):
if not s:
return []
else:
return s.splitlines()
for field, items in [('Methods', self.methods), ('Attributes', self.properties)]:
if not self[field]:
doc_list = []
for name in sorted(items):
try:
doc_item = pydoc.getdoc(getattr(self._cls, name))
doc_list.append((name, '', splitlines_x(doc_item)))
except AttributeError:
pass # method doesn't exist
self[field] = doc_list
@property
def methods(self): # noqa: D102
if self._cls is None:
return []
return [
name
for name, func in inspect.getmembers(self._cls)
if (
(not name.startswith('_') or name in self.extra_public_methods)
and isinstance(func, collections.abc.Callable)
and self._is_show_member(name)
)
]
@property
def properties(self): # noqa: D102
if self._cls is None:
return []
return [
name
for name, func in inspect.getmembers(self._cls)
if (
not name.startswith('_')
and (
func is None or isinstance(func, property) or inspect.isgetsetdescriptor(func)
)
and self._is_show_member(name)
)
]
def _is_show_member(self, name):
if self.show_inherited_members:
return True # show all class members
if name not in self._cls.__dict__:
return False # class member is inherited, we do not show it
return True
================================================
FILE: doc/sphinxext/docscrape_sphinx.py
================================================
import inspect # noqa: D100
import pydoc
import re
import textwrap
import sphinx
from docscrape import ClassDoc, FunctionDoc, NumpyDocString
class SphinxDocString(NumpyDocString): # noqa: D101
def __init__(self, docstring, config={}): # noqa: B006
self.use_plots = config.get('use_plots', False)
NumpyDocString.__init__(self, docstring, config=config)
# string conversion routines
def _str_header(self, name, symbol='`'):
return ['.. rubric:: ' + name, '']
def _str_field_list(self, name):
return [':' + name + ':']
def _str_indent(self, doc, indent=4):
out = []
for line in doc:
out += [' ' * indent + line]
return out
def _str_signature(self):
return ['']
if self['Signature']:
return ['``%s``' % self['Signature']] + [''] # noqa: UP031
else:
return ['']
def _str_summary(self):
return self['Summary'] + ['']
def _str_extended_summary(self):
return self['Extended Summary'] + ['']
def _str_param_list(self, name):
out = []
if self[name]:
out += self._str_field_list(name)
out += ['']
for param, param_type, desc in self[name]:
out += self._str_indent(['**%s** : %s' % (param.strip(), param_type)]) # noqa: UP031
out += ['']
out += self._str_indent(desc, 8)
out += ['']
return out
@property
def _obj(self):
if hasattr(self, '_cls'):
return self._cls
elif hasattr(self, '_f'):
return self._f
return None
def _str_member_list(self, name):
"""Generate a member listing, autosummary:: table where possible,
and a table where not.
"""
out = []
if self[name]:
out += ['.. rubric:: %s' % name, ''] # noqa: UP031
prefix = getattr(self, '_name', '')
if prefix:
prefix = '~%s.' % prefix # noqa: UP031
autosum = []
others = []
for param, param_type, desc in self[name]:
param = param.strip()
if not self._obj or hasattr(self._obj, param):
autosum += [' %s%s' % (prefix, param)] # noqa: UP031
else:
others.append((param, param_type, desc))
if autosum:
out += ['.. autosummary::', ' :toctree:', '']
out += autosum
if others:
maxlen_0 = max([len(x[0]) for x in others])
maxlen_1 = max([len(x[1]) for x in others])
hdr = '=' * maxlen_0 + ' ' + '=' * maxlen_1 + ' ' + '=' * 10
fmt = '%%%ds %%%ds ' % (maxlen_0, maxlen_1) # noqa: UP031
n_indent = maxlen_0 + maxlen_1 + 4
out += [hdr]
for param, param_type, desc in others:
out += [fmt % (param.strip(), param_type)]
out += self._str_indent(desc, n_indent)
out += [hdr]
out += ['']
return out
def _str_section(self, name):
out = []
if self[name]:
out += self._str_header(name)
out += ['']
content = textwrap.dedent('\n'.join(self[name])).split('\n')
out += content
out += ['']
return out
def _str_see_also(self, func_role):
out = []
if self['See Also']:
see_also = super()._str_see_also(func_role)
out = ['.. seealso::', '']
out += self._str_indent(see_also[2:])
return out
def _str_warnings(self):
out = []
if self['Warnings']:
out = ['.. warning::', '']
out += self._str_indent(self['Warnings'])
return out
def _str_index(self):
idx = self['index']
out = []
if len(idx) == 0:
return out
out += ['.. index:: %s' % idx.get('default', '')] # noqa: UP031
for section, references in idx.iteritems():
if section == 'default':
continue
elif section == 'refguide':
out += [' single: %s' % (', '.join(references))] # noqa: UP031
else:
out += [' %s: %s' % (section, ','.join(references))] # noqa: UP031
return out
def _str_references(self):
out = []
if self['References']:
out += self._str_header('References')
if isinstance(self['References'], str):
self['References'] = [self['References']]
out.extend(self['References'])
out += ['']
# Latex collects all references to a separate bibliography,
# so we need to insert links to it
if sphinx.__version__ >= '0.6':
out += ['.. only:: latex', '']
else:
out += ['.. latexonly::', '']
items = []
for line in self['References']:
m = re.match(r'.. \[([a-z0-9._-]+)\]', line, re.I)
if m:
items.append(m.group(1))
out += [' ' + ', '.join(['[%s]_' % item for item in items]), ''] # noqa: UP031
return out
def _str_examples(self):
examples_str = '\n'.join(self['Examples'])
if self.use_plots and 'import matplotlib' in examples_str and 'plot::' not in examples_str:
out = []
out += self._str_header('Examples')
out += ['.. plot::', '']
out += self._str_indent(self['Examples'])
out += ['']
return out
else:
return self._str_section('Examples')
def __str__(self, indent=0, func_role='obj'):
out = []
out += self._str_signature()
out += self._str_index() + ['']
out += self._str_summary()
out += self._str_extended_summary()
for param_list in ('Parameters', 'Returns', 'Other Parameters', 'Raises', 'Warns'):
out += self._str_param_list(param_list)
out += self._str_warnings()
out += self._str_see_also(func_role)
out += self._str_section('Notes')
out += self._str_references()
out += self._str_examples()
for param_list in ('Attributes', 'Methods'):
out += self._str_member_list(param_list)
out = self._str_indent(out, indent)
return '\n'.join(out)
class SphinxFunctionDoc(SphinxDocString, FunctionDoc): # noqa: D101
def __init__(self, obj, doc=None, config={}): # noqa: B006
self.use_plots = config.get('use_plots', False)
FunctionDoc.__init__(self, obj, doc=doc, config=config)
class SphinxClassDoc(SphinxDocString, ClassDoc): # noqa: D101
def __init__(self, obj, doc=None, func_doc=None, config={}): # noqa: B006
self.use_plots = config.get('use_plots', False)
ClassDoc.__init__(self, obj, doc=doc, func_doc=None, config=config)
class SphinxObjDoc(SphinxDocString): # noqa: D101
def __init__(self, obj, doc=None, config={}): # noqa: B006
self._f = obj
SphinxDocString.__init__(self, doc, config=config)
def get_doc_object(obj, what=None, doc=None, config={}): # noqa: B006, D103
if what is None:
if inspect.isclass(obj):
what = 'class'
elif inspect.ismodule(obj):
what = 'module'
elif callable(obj):
what = 'function'
else:
what = 'object'
if what == 'class':
return SphinxClassDoc(obj, func_doc=SphinxFunctionDoc, doc=doc, config=config)
elif what in ('function', 'method'):
return SphinxFunctionDoc(obj, doc=doc, config=config)
else:
if doc is None:
doc = pydoc.getdoc(obj)
return SphinxObjDoc(obj, doc, config=config)
================================================
FILE: doc/sphinxext/github.py
================================================
"""Define text roles for GitHub
* ghissue - Issue
* ghpull - Pull Request
* ghuser - User
Adapted from bitbucket example here:
https://bitbucket.org/birkenfeld/sphinx-contrib/src/tip/bitbucket/sphinxcontrib/bitbucket.py
Authors
-------
* Doug Hellmann
* Min RK
"""
#
# Original Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
from docutils import nodes, utils
from docutils.parsers.rst.roles import set_classes
def make_link_node(rawtext, app, type, slug, options): # noqa: A002
"""Create a link to a github resource.
:param rawtext: Text being replaced with link node.
:param app: Sphinx application context
:param type: Link type (issues, changeset, etc.)
:param slug: ID of the thing to link to
:param options: Options dictionary passed to role func.
"""
try:
base = app.config.github_project_url
if not base:
raise AttributeError
if not base.endswith('/'):
base += '/'
except AttributeError as err:
raise ValueError('github_project_url configuration value is not set (%s)' % str(err)) # noqa: B904, UP031
ref = base + type + '/' + slug + '/'
set_classes(options)
prefix = '#'
if type == 'pull':
prefix = 'PR ' + prefix
node = nodes.reference(rawtext, prefix + utils.unescape(slug), refuri=ref, **options)
return node
def ghissue_role(name, rawtext, text, lineno, inliner, options={}, content=[]): # noqa: B006
"""Link to a GitHub issue.
Returns 2 part tuple containing list of nodes to insert into the
document and a list of system messages. Both are allowed to be
empty.
:param name: The role name used in the document.
:param rawtext: The entire markup snippet, with role.
:param text: The text marked with the role.
:param lineno: The line number where rawtext appears in the input.
:param inliner: The inliner instance that called us.
:param options: Directive options for customization.
:param content: The directive content for customization.
"""
try:
issue_num = int(text)
if issue_num <= 0:
raise ValueError
except ValueError:
msg = inliner.reporter.error(
'GitHub issue number must be a number greater than or equal to 1; ' # noqa: UP031
'"%s" is invalid.' % text,
line=lineno,
)
prb = inliner.problematic(rawtext, rawtext, msg)
return [prb], [msg]
app = inliner.document.settings.env.app
# app.info('issue %r' % text)
if 'pull' in name.lower():
category = 'pull'
elif 'issue' in name.lower():
category = 'issues'
else:
msg = inliner.reporter.error(
'GitHub roles include "ghpull" and "ghissue", "%s" is invalid.' % name, line=lineno # noqa: UP031
)
prb = inliner.problematic(rawtext, rawtext, msg)
return [prb], [msg]
node = make_link_node(rawtext, app, category, str(issue_num), options)
return [node], []
def ghuser_role(name, rawtext, text, lineno, inliner, options={}, content=[]): # noqa: B006
"""Link to a GitHub user.
Returns 2 part tuple containing list of nodes to insert into the
document and a list of system messages. Both are allowed to be
empty.
:param name: The role name used in the document.
:param rawtext: The entire markup snippet, with role.
:param text: The text marked with the role.
:param lineno: The line number where rawtext appears in the input.
:param inliner: The inliner instance that called us.
:param options: Directive options for customization.
:param content: The directive content for customization.
"""
app = inliner.document.settings.env.app # noqa: F841
# app.info('user link %r' % text)
ref = 'https://www.github.com/' + text
node = nodes.reference(rawtext, text, refuri=ref, **options)
return [node], []
def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, content=[]): # noqa: B006
"""Link to a GitHub commit.
Returns 2 part tuple containing list of nodes to insert into the
document and a list of system messages. Both are allowed to be
empty.
:param name: The role name used in the document.
:param rawtext: The entire markup snippet, with role.
:param text: The text marked with the role.
:param lineno: The line number where rawtext appears in the input.
:param inliner: The inliner instance that called us.
:param options: Directive options for customization.
:param content: The directive content for customization.
"""
app = inliner.document.settings.env.app
# app.info('user link %r' % text)
try:
base = app.config.github_project_url
if not base:
raise AttributeError
if not base.endswith('/'):
base += '/'
except AttributeError as err:
raise ValueError('github_project_url configuration value is not set (%s)' % str(err)) # noqa: B904, UP031
ref = base + text
node = nodes.reference(rawtext, text[:6], refuri=ref, **options)
return [node], []
def setup(app):
"""Install the plugin.
:param app: Sphinx application context.
"""
app.info('Initializing GitHub plugin')
app.add_role('ghissue', ghissue_role)
app.add_role('ghpull', ghissue_role)
app.add_role('ghuser', ghuser_role)
app.add_role('ghcommit', ghcommit_role)
app.add_config_value('github_project_url', None, 'env')
return
================================================
FILE: doc/sphinxext/math_dollar.py
================================================
import re # noqa: D100
def dollars_to_math(source):
r"""Replace dollar signs with backticks.
More precisely, do a regular expression search. Replace a plain
dollar sign ($) by a backtick (`). Replace an escaped dollar sign
(\$) by a dollar sign ($). Don't change a dollar sign preceded or
followed by a backtick (`$ or $`), because of strings like
"``$HOME``". Don't make any changes on lines starting with
spaces, because those are indented and hence part of a block of
code or examples.
This also doesn't replaces dollar signs enclosed in curly braces,
to avoid nested math environments, such as ::
$f(n) = 0 \text{ if $n$ is prime}$
Thus the above line would get changed to
`f(n) = 0 \text{ if $n$ is prime}`
"""
s = '\n'.join(source)
if s.find('$') == -1:
return
# This searches for "$blah$" inside a pair of curly braces --
# don't change these, since they're probably coming from a nested
# math environment. So for each match, we replace it with a temporary
# string, and later on we substitute the original back.
global _data
_data = {}
def repl(matchobj):
global _data
s = matchobj.group(0)
t = '___XXX_REPL_%d___' % len(_data) # noqa: UP031
_data[t] = s
return t
s = re.sub(r'({[^{}$]*\$[^{}$]*\$[^{}]*})', repl, s)
# matches $...$
dollars = re.compile(r'(?<!\$)(?<!\\)\$([^\$]+?)\$')
# regular expression for \$
slashdollar = re.compile(r'\\\$')
s = dollars.sub(r':math:`\1`', s)
s = slashdollar.sub(r'$', s)
# change the original {...} things in:
for r in _data:
s = s.replace(r, _data[r])
# now save results in "source"
source[:] = [s]
def process_dollars(app, docname, source): # noqa: D103
dollars_to_math(source)
def mathdollar_docstrings(app, what, name, obj, options, lines): # noqa: D103
dollars_to_math(lines)
def setup(app): # noqa: D103
app.connect('source-read', process_dollars)
app.connect('autodoc-process-docstring', mathdollar_docstrings)
================================================
FILE: doc/sphinxext/numpydoc.py
================================================
"""========
numpydoc
========
Sphinx extension that handles docstrings in the Numpy standard format. [1]
It will:
- Convert Parameters etc. sections to field lists.
- Convert See Also section to a See also entry.
- Renumber references.
- Extract the signature from the docstring, if it can't be determined
otherwise.
.. [1] https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
"""
import collections
import inspect
import pydoc
import re
import sphinx
if sphinx.__version__ < '1.0.1':
raise RuntimeError('Sphinx 1.0.1 or newer is required')
from docscrape_sphinx import SphinxDocString, get_doc_object
def mangle_docstrings(app, what, name, obj, options, lines, reference_offset=[0]): # noqa: B006, D103
cfg = {
'use_plots': app.config.numpydoc_use_plots,
'show_class_members': app.config.numpydoc_show_class_members,
'show_inherited_class_members': app.config.numpydoc_show_inherited_class_members,
'class_members_toctree': app.config.numpydoc_class_members_toctree,
}
u_NL = '\n'
if what == 'module':
# Strip top title
pattern = '^\\s*[#*=]{4,}\\n[a-z0-9 -]+\\n[#*=]{4,}\\s*'
title_re = re.compile(pattern, re.I | re.S)
lines[:] = title_re.sub('', u_NL.join(lines)).split(u_NL)
else:
doc = str(get_doc_object(obj, what, u_NL.join(lines), config=cfg))
lines[:] = doc.split(u_NL)
if app.config.numpydoc_edit_link and hasattr(obj, '__name__') and obj.__name__:
if hasattr(obj, '__module__'):
v = dict(full_name='%s.%s' % (obj.__module__, obj.__name__)) # noqa: C408, UP031
else:
v = dict(full_name=obj.__name__) # noqa: C408
lines += ['', '.. htmlonly::', '']
lines += [' %s' % x for x in (app.config.numpydoc_edit_link % v).split('\n')] # noqa: UP031
# replace reference numbers so that there are no duplicates
references = []
for line in lines:
line = line.strip()
m = re.match('^.. \\[([a-z0-9_.-])\\]', line, re.I)
if m:
references.append(m.group(1))
# start renaming from the longest string, to avoid overwriting parts
references.sort(key=lambda x: -len(x))
if references:
for i, line in enumerate(lines): # noqa: B007
for r in references:
if re.match('^\\d+$', r):
new_r = 'R%d' % (reference_offset[0] + int(r)) # noqa: UP031
else:
new_r = '%s%d' % (r, reference_offset[0]) # noqa: UP031
lines[i] = lines[i].replace('[%s]_' % r, '[%s]_' % new_r) # noqa: UP031
lines[i] = lines[i].replace('.. [%s]' % r, '.. [%s]' % new_r) # noqa: UP031
reference_offset[0] += len(references)
def mangle_signature(app, what, name, obj, options, sig, retann): # noqa: D103
# Do not try to inspect classes that don't define `__init__`
if inspect.isclass(obj) and (
not hasattr(obj, '__init__') or 'initializes x; see ' in pydoc.getdoc(obj.__init__)
):
return '', ''
if not (isinstance(obj, collections.abc.Callable) or hasattr(obj, '__argspec_is_invalid_')):
return
if not hasattr(obj, '__doc__'):
return
doc = SphinxDocString(pydoc.getdoc(obj))
if doc['Signature']:
sig = re.sub('^[^(]*', '', doc['Signature'])
return sig, ''
def setup(app, get_doc_object_=get_doc_object): # noqa: D103
if not hasattr(app, 'add_config_value'):
return # probably called by nose, better bail out
global get_doc_object
get_doc_object = get_doc_object_
app.connect('autodoc-process-docstring', mangle_docstrings)
app.connect('autodoc-process-signature', mangle_signature)
app.add_config_value('numpydoc_edit_link', None, False)
app.add_config_value('numpydoc_use_plots', None, False)
app.add_config_value('numpydoc_show_class_members', True, True)
app.add_config_value('numpydoc_show_inherited_class_members', True, True)
app.add_config_value('numpydoc_class_members_toctree', True, True)
# Extra mangling domains
app.add_domain(NumpyPythonDomain)
app.add_domain(NumpyCDomain)
# ------------------------------------------------------------------------------
# Docstring-mangling domains
# ------------------------------------------------------------------------------
from docutils.statemachine import ViewList # noqa: E402
from sphinx.domains.c import CDomain # noqa: E402
from sphinx.domains.python import PythonDomain # noqa: E402
class ManglingDomainBase: # noqa: D101
directive_mangling_map = {}
def __init__(self, *a, **kw):
super().__init__(*a, **kw)
self.wrap_mangling_directives()
def wrap_mangling_directives(self): # noqa: D102
for name, objtype in list(self.directive_mangling_map.items()):
self.directives[name] = wrap_mangling_directive(self.directives[name], objtype)
class NumpyPythonDomain(ManglingDomainBase, PythonDomain): # noqa: D101
name = 'np'
directive_mangling_map = {
'function': 'function',
'class': 'class',
'exception': 'class',
'method': 'function',
'classmethod': 'function',
'staticmethod': 'function',
'attribute': 'attribute',
}
indices = []
class NumpyCDomain(ManglingDomainBase, CDomain): # noqa: D101
name = 'np-c'
directive_mangling_map = {
'function': 'function',
'member': 'attribute',
'macro': 'function',
'type': 'class',
'var': 'object',
}
def wrap_mangling_directive(base_directive, objtype): # noqa: D103
class directive(base_directive):
def run(self):
env = self.state.document.settings.env
name = None
if self.arguments:
m = re.match(r'^(.*\s+)?(.*?)(\(.*)?', self.arguments[0])
name = m.group(2).strip()
if not name:
name = self.arguments[0]
lines = list(self.content)
mangle_docstrings(env.app, objtype, name, None, None, lines)
self.content = ViewList(lines, self.content.parent)
return base_directive.run(self)
return directive
================================================
FILE: doc/tune_toc.rst
================================================
:orphan:
.. raw:: html
<SCRIPT>
//Function to make the index toctree collapsible
$(function () {
$('.toctree-l2')
.click(function(event){
if (event.target.tagName.toLowerCase() != "a") {
if ($(this).children('ul').length > 0) {
$(this).attr('data-content',
(!$(this).children('ul').is(':hidden')) ? '\u25ba' : '\u25bc');
$(this).children('ul').toggle();
}
return true; //Makes links clickable
}
})
.mousedown(function(event){ return false; }) //Firefox highlighting fix
.children('ul').hide();
// Initialize the values
$('li.toctree-l2:not(:has(ul))').attr('data-content', '-');
$('li.toctree-l2:has(ul)').attr('data-content', '\u25ba');
$('li.toctree-l2:has(ul)').css('cursor', 'pointer');
$('.toctree-l2').hover(
function () {
if ($(this).children('ul').length > 0) {
$(this).css('background-color', '#D0D0D0').children('ul').css('background-color', '#F0F0F0');
$(this).attr('data-content',
(!$(this).children('ul').is(':hidden')) ? '\u25bc' : '\u25ba');
}
else {
$(this).css('background-color', '#F9F9F9');
}
},
function () {
$(this).css('background-color', 'white').children('ul').css('background-color', 'white');
if ($(this).children('ul').length > 0) {
$(this).attr('data-content',
(!$(this).children('ul').is(':hidden')) ? '\u25bc' : '\u25ba');
}
}
);
});
</SCRIPT>
<style type="text/css">
div.bodywrapper blockquote {
margin: 0 ;
}
div.toctree-wrapper ul {
margin: 0 ;
padding-left: 0px ;
}
li, ul {
transition-duration: 0.2s;
}
li.toctree-l1 {
padding: 5px 0 0;
list-style-type: none;
font-size: 150% ;
font-family: Arial, sans-serif;
background-color: #f2f2f2;
font-weight: normal;
color: #20435c;
margin-left: 0;
margin-bottom: 1.2em;
font-weight: bold;
}
li.toctree-l1 a {
padding: 0 0 0 10px ;
color: #314F64 ;
}
li.toctree-l2 {
padding: 0.25em 0 0.25em 0 ;
list-style-type: none;
background-color: #FFFFFF;
font-size: 85% ;
font-weight: normal;
}
li.toctree-l2 ul {
padding-left: 40px ;
}
li.toctree-l2:before {
content: attr(data-content) ;
font-size: 85% ;
color: #777 ;
display: inline-block;
width: 10px;
}
li.toctree-l3 {
font-size: 88% ;
list-style-type: square;
font-weight: normal;
}
li.toctree-l4 {
font-size: 93% ;
list-style-type: circle;
font-weight: normal;
}
div.topic li.toctree-l1 {
font-size: 100% ;
font-weight: bold;
background-color: transparent;
margin-bottom: 0;
margin-left: 1.5em;
display:inline;
}
div.topic p {
font-size: 90% ;
margin: 0.4ex;
}
div.topic p.topic-title {
display:inline;
font-size: 100% ;
margin-bottom: 0;
}
div.sidebar {
width: 25ex ;
}
</style>
================================================
FILE: doc/user_guide.rst
================================================
.. _user_guide:
User guide
==========
.. sidebar:: **Download for offline viewing**
Download the `user guide and examples
<https://github.com/bids-standard/pybids/archive/gh-pages.zip>`_.
.. toctree::
:numbered:
introduction.rst
layout/index.rst
analysis/index.rst
reports/index.rst
================================================
FILE: doc/whats_new.rst
================================================
.. include:: ../CHANGELOG.rst
================================================
FILE: long_description.rst
================================================
PyBIDS
======
PyBIDS is a Python module to interface with datasets conforming BIDS.
See BIDS paper_ and https://bids.neuroimaging.io website for more information.
.. _paper: https://www.nature.com/articles/sdata201644
License
=======
``pybids`` is licensed under the terms of the MIT license. See the file
"LICENSE" for information on the history of this software, terms & conditions
for usage, and a DISCLAIMER OF ALL WARRANTIES.
All trademarks referenced herein are property of their respective holders.
Copyright (c) 2016--, PyBIDS developers, Planet Earth
================================================
FILE: paper/paper.bib
================================================
@article{Gorgolewski2016-sk,
title = "A Practical Guide for Improving Transparency and Reproducibility
in Neuroimaging Research",
author = {Gorgolewski, Krzysztof J and
Poldrack, Russell A},
abstract = "Recent years have seen an increase in alarming signals regarding
the lack of replicability in neuroscience, psychology, and other
related fields. To avoid a widespread crisis in neuroimaging
research and consequent loss of credibility in the public eye, we
need to improve how we do science. This article aims to be a
practical guide for researchers at any stage of their careers
that will help them make their research more reproducible and
transparent while minimizing the additional effort that this
might require. The guide covers three major topics in open
science (data, code, and publications) and offers practical
advice as well as highlighting advantages of adopting more open
research practices that go beyond improved transparency and
reproducibility.",
journal = "PLOS Biology",
volume = 14,
number = 7,
pages = "e1002506",
month = jul,
year = 2016,
doi = {10.1371/journal.pbio.1002506},
language = "en"
}
@article{Gorgolewski2016-nw,
title = "The brain imaging data structure, a format for organizing and
describing outputs of neuroimaging experiments",
author = {Gorgolewski, Krzysztof J and
Auer, Tibor and
Calhoun, Vince D and
Craddock, R Cameron and
Das, Samir and
Duff, Eugene P and
Flandin, Guillaume and
Ghosh, Satrajit S and
Glatard, Tristan and
Halchenko, Yaroslav O and
Handwerker, Daniel A and
Hanke, Michael and
Keator, David and
Li, Xiangrui and
Michael, Zachary and
Maumet, Camille and
Nichols, B Nolan and
Nichols, Thomas E and
Pellman, John and
Poline, Jean-Baptiste and
Rokem, Ariel and
Schaefer, Gunnar and
Sochat, Vanessa and
Triplett, William and
Turner, Jessica A and
Varoquaux, Ga{\"e}l and
Poldrack, Russell A},
abstract = "The development of magnetic resonance imaging (MRI) techniques
has defined modern neuroimaging. Since its inception, tens of
thousands of studies using techniques such as functional MRI and
diffusion weighted imaging have allowed for the non-invasive
study of the brain. Despite the fact that MRI is routinely used
to obtain data for neuroscience research, there has been no
widely adopted standard for organizing and describing the data
collected in an imaging experiment. This renders sharing and
reusing data (within or between labs) difficult if not impossible
and unnecessarily complicates the application of automatic
pipelines and quality assurance protocols. To solve this problem,
we have developed the Brain Imaging Data Structure (BIDS), a
standard for organizing and describing MRI datasets. The BIDS
standard uses file formats compatible with existing software,
unifies the majority of practices already common in the field,
and captures the metadata necessary for most common data
processing operations.",
journal = "Scientific Data",
volume = 3,
pages = "160044",
month = jun,
year = 2016,
doi = {10.1038/sdata.2016.44},
language = "en"
}
@article{Gorgolewski2017-cz,
title = "{BIDS} apps: Improving ease of use, accessibility, and
reproducibility of neuroimaging data analysis methods",
author = {Gorgolewski, Krzysztof J and
Alfaro-Almagro, Fidel and
Auer, Tibor and
Bellec, Pierre and
Capot{\u a}, Mihai and
Chakravarty, M Mallar and
Churchill, Nathan W and
Cohen, Alexander Li and
Craddock, R Cameron and
Devenyi, Gabriel A and
Eklund, Anders and
Esteban, Oscar and
Flandin, Guillaume and
Ghosh, Satrajit S and
Guntupalli, J Swaroop and
Jenkinson, Mark and
Keshavan, Anisha and
Kiar, Gregory and
Liem, Franziskus and
Raamana, Pradeep Reddy and
Raffelt, David and
Steele, Christopher J and
Quirion, Pierre-Olivier and
Smith, Robert E and
Strother, Stephen C and
Varoquaux, Ga{\"e}l and
Wang, Yida and
Yarkoni, Tal and
Poldrack, Russell A},
abstract = "The rate of progress in human neurosciences is limited by the
inability to easily apply a wide range of analysis methods to the
plethora of different datasets acquired in labs around the world.
In this work, we introduce a framework for creating, testing,
versioning and archiving portable applications for analyzing
neuroimaging data organized and described in compliance with the
Brain Imaging Data Structure (BIDS). The portability of these
applications (BIDS Apps) is achieved by using container
technologies that encapsulate all binary and other dependencies
in one convenient package. BIDS Apps run on all three major
operating systems with no need for complex setup and
configuration and thanks to the comprehensiveness of the BIDS
standard they require little manual user input. Previous
containerized data processing solutions were limited to single
user environments and not compatible with most multi-tenant High
Performance Computing systems. BIDS Apps overcome this limitation
by taking advantage of the Singularity container technology. As a
proof of concept, this work is accompanied by 22 ready to use
BIDS Apps, packaging a diverse set of commonly used neuroimaging
algorithms.",
journal = "PLOS Computational Biology",
volume = 13,
number = 3,
pages = "e1005209",
month = mar,
year = 2017,
doi = {10.1371/journal.pcbi.1005209},
language = "en"
}
@article{Poldrack2017-gz,
title = "Scanning the horizon: towards transparent and reproducible
neuroimaging research",
author = {Poldrack, Russell A and
Baker, Chris I and
Durnez, Joke and
Gorgolewski, Krzysztof J and
Matthews, Paul M and
Munaf{\`o}, Marcus R and
Nichols, Thomas E and
Poline, Jean-Baptiste and
Vul, Edward and
Yarkoni, Tal},
abstract = "Functional neuroimaging techniques have transformed our ability
to probe the neurobiological basis of behaviour and are
increasingly being applied by the wider neuroscience community.
However, concerns have recently been raised that the conclusions
that are drawn from some human neuroimaging studies are either
spurious or not generalizable. Problems such as low statistical
power, flexibility in data analysis, software errors and a lack
of direct replication apply to many fields, but perhaps
particularly to functional MRI. Here, we discuss these problems,
outline current and suggested best practices, and describe how we
think the field should evolve to produce the most meaningful and
reliable answers to neuroscientific questions.",
journal = "Nature Reviews Neuroscience",
volume = 18,
number = 2,
pages = "115--126",
month = feb,
year = 2017,
doi = {10.1038/nrn.2016.167},
language = "en"
}
@article{mriqc,
title={MRIQC: Advancing the automatic prediction of image quality in {MRI} from unseen sites},
author={Esteban, Oscar and
Birman, Daniel and
Schaer, Marie and
Koyejo, Oluwasanmi O and
Poldrack, Russell A and
Gorgolewski, Krzysztof J},
journal={PLOS One},
volume={12},
number={9},
pages={e0184661},
year={2017},
doi={10.1371/journal.pone.0184661},
publisher={Public Library of Science}
}
@article{fmriprep,
title={FMRIPrep: a robust preprocessing pipeline for functional {MRI}},
author={Esteban, Oscar and
Markiewicz, Christopher J and
Blair, Ross W and
Moodie, Craig A and
Isik, A Ilkay and
Erramuzpe, Asier and
Kent, James D and
Goncalves, Mathias and
DuPre, Elizabeth and
Snyder, Madeleine and
Oya, Hiroyuki and
Ghosh, Satrajit S and
Wright, Jessey and
Durnez, Joke and
Poldrack, Russell A and
Gorgolewski, Krzysztof J},
journal={Nature Methods},
volume={16},
number={1},
pages={111},
year={2019},
doi={10.1038/s41592-018-0235-4},
publisher={Nature Publishing Group}
}
================================================
FILE: paper/paper.md
================================================
---
title: 'PyBIDS: Python tools for BIDS datasets'
tags:
- Python
- BIDS
- neuroimaging
authors:
- affiliation: 1
name: Tal Yarkoni
orcid: 0000-0002-6558-5113
- affiliation: 2
name: Christopher J Markiewicz
orcid: 0000-0002-6533-164X
- affiliation: 1
name: Alejandro de la Vega
orcid: 0000-0001-9062-3778
- affiliation: 2
name: Krzysztof J Gorgolewski
orcid: 0000-0003-3321-7583
- affiliation: 3
name: Taylor Salo
orcid: 0000-0001-9813-3167
- affiliation: 4
name: Yaroslav O Halchenko
orcid: 0000-0003-3456-2493
- affiliation: 1
name: Quinten McNamara
- affiliation: 5
name: Krista DeStasio
orcid: 0000-0002-3959-9060
- affiliation: 6
name: Jean-Baptiste Poline
orcid: 0000-0002-9794-749X
- affiliation: 7
name: Dmitry Petrov
- affiliation: 8
name: Valérie Hayot-Sasson
orcid: 0000-0002-4830-4535
- affiliation: 9
name: Dylan M Nielson
orcid: 0000-0003-4613-6643
- affiliation: 10
name: Johan Carlin
orcid: 0000-0003-0933-1239
- affiliation: 11
name: Gregory Kiar
orcid: 0000-0001-8915-496X
- affiliation: 12
name: Kirstie Whitaker
orcid: 0000-0001-8498-4059
- affiliation: 11
name: Elizabeth DuPre
orcid: 0000-0003-1358-196X
- affiliation: 13
name: Adina Wagner
orcid: 0000-0003-2917-3450
- affiliation: 14
name: Lee S Tirrell
orcid: 0000-0001-9393-8361
- affiliation: 15
name: Mainak Jas
orcid: 0000-0002-3199-9027
- affiliation: 13
name: Michael Hanke
orcid: 0000-0001-6398-6370
- affiliation: 2
name: Russell A Poldrack
orcid: 0000-0001-6755-0259
- affiliation: 2
name: Oscar Esteban
orcid: 0000-0001-8435-6191
- affiliation: 16
name: Stefan Appelhoff
orcid: 0000-0001-8002-0877
- affiliation: 17
name: Chris Holdgraf
orcid: 0000-0002-2391-0678
- affiliation: 18
name: Isla Staden
orcid: 0000-0002-0795-1154
- affiliation: 19
name: Bertrand Thirion
orcid: 0000-0001-5018-7895
- affiliation: 20
name: Dave F Kleinschmidt
orcid: 0000-0002-7442-2762
- affiliation: 9
name: John A Lee
orcid: 0000-0001-5884-4247
- affiliation: 17
name: Matteo Visconti di Oleggio Castello
orcid: 0000-0001-7931-5272
- affiliation: 21
name: Michael P Notter
orcid: 0000-0002-5866-047X
- affiliation: 2
name: Ross Blair
orcid: 0000-0003-3007-1056
affiliations:
- index: 1
name: University of Texas at Austin
- index: 2
name: Stanford University
- index: 3
name: Florida International University
- index: 4
name: Dartmouth College
- index: 5
name: University of Oregon
- index: 6
name: McGill University
- index: 7
name: University of Southern California
- index: 8
name: Concordia University
- index: 9
name: National Institute of Mental Health
- index: 10
name: MRC Cognition and Brain Sciences Unit
- index: 11
name: Montreal Neurological Institute and Hospital
- index: 12
name: Alan Turing Institute
- index: 13
name: Otto-von-Guericke University Magdeburg
- index: 14
name: CorticoMetrics LLC
- index: 15
name: Télécom ParisTech, France
- index: 16
name: Max Planck Institute for Human Development, Berlin, Germany
- index: 17
name: University of California at Berkeley
- index: 18
name: Queen Mary University London
- index: 19
name: INRIA
- index: 20
name: Rutgers University
- index: 21
name: University of Lausanne
date: 19 February 2019
bibliography: paper.bib
---
# Summary
Brain imaging researchers regularly work with large, heterogeneous,
high-dimensional datasets. Historically, researchers have dealt with this
complexity idiosyncratically, with every lab or individual implementing their
own preprocessing and analysis procedures. The resulting lack of field-wide
standards has severely limited reproducibility and data sharing and reuse.
To address this problem, we and others recently introduced the Brain Imaging
Data Standard (``BIDS``; [@Gorgolewski2016-nw]), a specification meant to
standardize the process of representing brain imaging data. BIDS is
deliberately designed with adoption in mind; it adheres to a user-focused
philosophy that prioritizes common use cases and discourages complexity. By
successfully encouraging a large and ever-growing subset of the community to
adopt a common standard for naming and organizing files, BIDS has made it much
easier for researchers to share, reuse, and process their data
[@Gorgolewski2017-cz].
The ability to efficiently develop high-quality spec-compliant applications
itself depends to a large extent on the availability of good tooling.
Because many operations recur widely across diverse contexts—for example,
almost every tool designed to work with BIDS datasets involves regular
file-filtering operations—there is a strong incentive to develop utility
libraries that provide common functionality via a standardized, simple API.
``PyBIDS`` is a Python package that makes it easier to work with BIDS
datasets. In principle, its scope includes virtually any functionality that is
likely to be of general use when working with BIDS datasets (*i.e.*, that is not
specific to one narrow context). At present, its core and most widely used
module supports simple and flexible querying and manipulation of BIDS datasets.
PyBIDS makes it easy for researchers and developers working in Python to search
for BIDS files by keywords and/or metadata; to consolidate and retrieve
file-associated metadata spread out across multiple levels of a BIDS hierarchy;
to construct BIDS-valid path names for new files; and to validate projects
against the BIDS specification, among other applications.
In addition to this core functionality, PyBIDS also contains an ever-growing
set of modules that support additional capabilities meant to keep up with the
evolution and expansion of the BIDS specification itself. Currently, PyBIDS
includes tools for (1) reading and manipulating data contained in various
BIDS-defined files (*e.g.*, physiological recordings, event files, or
participant-level variables); (2) constructing design matrices and contrasts
that support the new ``BIDS-StatsModel`` specification (for machine-readable
representation of fMRI statistical models); and (3) automated generation of
partial Methods sections for inclusion in publications.
PyBIDS can be easily installed on all platforms via pip (``pip install
pybids``), though currently it is not officially supported on Windows. The
package has few dependencies outside of standard Python numerical and image
analysis libraries (*i.e.*, numpy, scipy, pandas, and NiBabel). The core API
is deliberately kept minimalistic: nearly all interactions with PyBIDS
functionality occur through a core ``BIDSLayout`` object initialized by passing
in a path to a BIDS dataset. For most applications, no custom configuration
should be required.
Although technically still in alpha release, PyBIDS is already being used both
as a dependency in dozens of other open-source brain imaging packages --
*e.g.*, fMRIPrep [@fmriprep], MRIQC [@mriqc], datalad-neuroimaging
(https://github.com/datalad/datalad-neuroimaging), and fitlins
(https://github.com/poldracklab/fitlins) -- and directly in many researchers'
custom Python workflows. Development is extremely active, with bug fixes and
new features continually being added (https://github.com/bids-standard/pybids),
and major releases occurring approximately every 6 months. As of this writing,
29 people have contributed code to PyBIDS, and many more have provided feedback
and testing. The API is relatively stable, and documentation and testing
standards follow established norms for open-source scientific software. We
encourage members of the brain imaging community currently working in Python to
try using PyBIDS, and welcome new contributions.
# Acknowledgements
PyBIDS development is partly supported by NIH awards R01MH109682 (PI: Yarkoni),
R24MH114705 (PI: Poldrack), R01EB020740 (PI: Ghosh), and P41EB019936 (PI:
Kennedy), and NSF award 1429999 (PI: Halchenko).
# References
================================================
FILE: pyproject.toml
================================================
[build-system]
requires = ["setuptools", "versioneer[toml]"]
build-backend = "setuptools.build_meta"
[project]
name = "pybids"
description = "bids: interface with datasets conforming to BIDS"
readme = "README.md"
requires-python = ">=3.10"
license = { file="LICENSE" }
authors = [
{ name = "PyBIDS Developers", email = "bids-discussion@googlegroups.com" },
]
keywords = ["BIDS", "neuroimaging"]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
]
dependencies = [
"numpy >=1.25", # SPEC 0 + 1yr (3yr)
"scipy >=1.11", # SPEC 0 + 1yr (3yr)
"nibabel >=5.1", # SPEC 0 + 1yr (3yr)
"pandas >=2.0", # SPEC 0 + 1yr (3yr)
"formulaic >=0.3",
"sqlalchemy >=1.4.31",
"bids-validator>=1.14.7", # Keep up-to-date to ensure support for recent modalities
"bidsschematools>=1.1.0", # Required for schema-based configs
"num2words >=0.5.10",
"click >=8.0",
"universal_pathlib >=0.2.2",
"frozendict >=2.3",
]
dynamic = ["version"]
[project.optional-dependencies]
doc = [
"sphinx >=6.2",
"numpydoc",
"sphinx_rtd_theme",
"myst_nb",
"jupytext",
]
plotting = ["graphviz"]
test = [
"pytest >= 8",
"pytest-cov >= 7",
"bsmschema >= 0.1",
"coverage[toml] >= 7",
"altair >= 5",
"pytest-xdist >= 3.8",
"s3fs >= 2025" #for testing remote uri
]
model_reports = [
"jinja2",
"altair"
]
tutorial = [
"nbconvert",
"jinja2",
"markupsafe",
"jupyter_client",
"ipykernel",
]
# Aliases
docs = ["pybids[doc]"]
tests = ["pybids[test]"]
ci_tests = ["pybids[test]"]
dev = ["pybids[doc,test,plotting]"]
[project.urls]
Homepage = "https://github.com/bids-standard/pybids"
"Bug Tracker" = "https://github.com/bids-standard/pybids/issues"
[project.scripts]
pybids = "bids.cli:cli"
[tool.setuptools.package-data]
"*" = ["data/*", "data/*/*"]
"bids.layout.config" = ["*.json"]
[tool.versioneer]
VCS = "git"
style = "pep440-pre"
versionfile_source = "src/bids/_version.py"
versionfile_build = "bids/_version.py"
[tool.coverage.run]
branch = true
source = ["src/", "tests/"]
omit = [
"*/setup.py",
"*/external/*",
"*/due.py",
"*/*version.py",
]
[tool.coverage.paths]
source = [
"src/bids",
"**/site-packages/bids",
]
[tool.coverage.report]
include = ["src/*", "tests/*"]
================================================
FILE: ruff.toml
================================================
line-length = 99
extend-exclude = [
"_version.py", # Auto-generated
"tests/data", # Submodules
"bids-examples",
".cursor",
".vscode",
".venv",
"paper",
"scripts/",
"tools/",
"*tests/*",
"*.ipynb",
"src/bids/external/",
]
[format]
quote-style = "single"
line-ending = "lf"
docstring-code-format = true
[lint]
extend-select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"D", # pydocstyle
"UP", # pyupgrade
"YTT", # flake8-2020
"S", # bandit
"BLE", # blind-except
"B", # bugbear
"A", # builtins
"C4", # comprehensions
"DTZ", # datetimez
"T10", # debugger
# "EM", # errmsg
"EXE", # executable
"ISC", # implicit-str-concat
"ICN", # import-conventions
"PT", # pytest-style
"Q", # quotes
]
ignore = [
"D105", # undocumented-magic-method
"D107", # undocumented __init__
"D203", # blank line before class docstring
"D213", # multi-line-summary-first-line
"PT022", # useless-yield-fixture; yield keeps fixtures/sessions alive
"Q000", # double quotes
"Q003", # avoidable-escaped-quote
# --- Fix one group at a time; remove from ignore when done ---
# 1. Docstrings (D*)
"D205", # blank line between summary and description
"D400", # ends with period
"D401", # imperative mood
"D415", # ends with period/question/exclamation
]
[lint.extend-per-file-ignores]
"setup.py" = ["D"]
"src/bids/external/__init__.py" = ["D104"]
"src/bids/modeling/report/__init__.py" = ["D104"]
"*/test_*.py" = [
"S101", # assert
"D",
]
================================================
FILE: schema_integration_demo.ipynb
================================================
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# BIDS Schema Integration Demo\n",
"\n",
"This notebook demonstrates the new BIDS schema integration features in PyBIDS, showing how the new schema-based configuration compares to the legacy JSO
gitextract_hu9a0df4/ ├── .git-blame-ignore-revs ├── .gitattributes ├── .github/ │ ├── codespell_exclude_lines.txt │ ├── codespell_ignore_words.txt │ ├── dependabot.yml │ ├── release-drafter.yml │ └── workflows/ │ ├── build-test-deploy.yml │ ├── codespell.yml │ ├── docs.yml │ └── prerelease.yml ├── .gitignore ├── .gitmodules ├── .mailmap ├── .pre-commit-config.yaml ├── .zenodo.json ├── CHANGELOG.rst ├── LICENSE ├── MANIFEST.in ├── README.md ├── codecov.yml ├── doc/ │ ├── Makefile │ ├── _static/ │ │ └── theme_overrides.css │ ├── _templates/ │ │ ├── class.rst │ │ ├── function.rst │ │ └── module.rst │ ├── analysis/ │ │ └── index.rst │ ├── api.rst │ ├── conf.py │ ├── examples/ │ │ ├── index.rst │ │ ├── pybids_tutorial.md │ │ ├── reports_tutorial.md │ │ └── statsmodels_tutorial.md │ ├── includes/ │ │ ├── big_toc_css.rst │ │ └── bigger_toc_css.rst │ ├── index.rst │ ├── introduction.rst │ ├── layout/ │ │ └── index.rst │ ├── make.bat │ ├── reports/ │ │ └── index.rst │ ├── sphinxext/ │ │ ├── docscrape.py │ │ ├── docscrape_sphinx.py │ │ ├── github.py │ │ ├── math_dollar.py │ │ └── numpydoc.py │ ├── tune_toc.rst │ ├── user_guide.rst │ └── whats_new.rst ├── long_description.rst ├── paper/ │ ├── paper.bib │ └── paper.md ├── pyproject.toml ├── ruff.toml ├── schema_integration_demo.ipynb ├── setup.cfg ├── setup.py ├── src/ │ └── bids/ │ ├── __init__.py │ ├── __main__.py │ ├── _version.py │ ├── cli.py │ ├── config.py │ ├── conftest.py │ ├── due.py │ ├── exceptions.py │ ├── ext/ │ │ └── __init__.py │ ├── external/ │ │ ├── __init__.py │ │ └── inflect.py │ ├── layout/ │ │ ├── README.md │ │ ├── __init__.py │ │ ├── config/ │ │ │ ├── bids.json │ │ │ └── derivatives.json │ │ ├── db.py │ │ ├── index.py │ │ ├── layout.py │ │ ├── models.py │ │ ├── tests/ │ │ │ ├── __init__.py │ │ │ ├── conftest.py │ │ │ ├── data/ │ │ │ │ └── sample_validation_config.json │ │ │ ├── test_db.py │ │ │ ├── test_layout.py │ │ │ ├── test_layout_on_examples.py │ │ │ ├── test_models.py │ │ │ ├── test_path_building.py │ │ │ ├── test_remote_bids.py │ │ │ ├── test_rootpath.py │ │ │ ├── test_schema_config.py │ │ │ ├── test_schema_pattern_validation.py │ │ │ ├── test_schema_version_differences.py │ │ │ ├── test_schema_vs_json_config.py │ │ │ ├── test_utils.py │ │ │ ├── test_validation.py │ │ │ └── test_writing.py │ │ ├── utils.py │ │ ├── validation.py │ │ └── writing.py │ ├── modeling/ │ │ ├── README.md │ │ ├── __init__.py │ │ ├── auto_model.py │ │ ├── hrf.py │ │ ├── model_spec.py │ │ ├── report/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── report_template.jinja │ │ │ ├── utils.py │ │ │ └── viz.py │ │ ├── statsmodels.py │ │ ├── tests/ │ │ │ ├── __init__.py │ │ │ ├── test_automodel.py │ │ │ ├── test_hrf.py │ │ │ ├── test_model_spec.py │ │ │ ├── test_statsmodels.py │ │ │ └── test_transformations.py │ │ └── transformations/ │ │ ├── __init__.py │ │ ├── base.py │ │ ├── compute.py │ │ └── munge.py │ ├── reports/ │ │ ├── README.md │ │ ├── __init__.py │ │ ├── config/ │ │ │ └── converters.json │ │ ├── conftest.py │ │ ├── parameters.py │ │ ├── parsing.py │ │ ├── report.py │ │ ├── tests/ │ │ │ ├── __init__.py │ │ │ ├── test_parameters.py │ │ │ ├── test_parsing.py │ │ │ └── test_report.py │ │ └── utils.py │ ├── tests/ │ │ ├── __init__.py │ │ ├── data/ │ │ │ └── images/ │ │ │ └── 4d.bval │ │ ├── test_cli.py │ │ ├── test_config.py │ │ └── utils.py │ ├── utils.py │ └── variables/ │ ├── __init__.py │ ├── collections.py │ ├── entities.py │ ├── io.py │ ├── tests/ │ │ ├── __init__.py │ │ ├── test_collections.py │ │ ├── test_entities.py │ │ ├── test_io.py │ │ └── test_variables.py │ └── variables.py ├── tests/ │ └── data/ │ ├── 7t_trt/ │ │ ├── README │ │ ├── dataset_description.json │ │ ├── participants.tsv │ │ ├── sub-01/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-01_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-01_ses-1_run-2_phasediff.json │ │ │ │ ├── func/ │ │ │ │ │ └── sub-01_ses-1_task-rest_acq-fullbrain_run-1_bold.json │ │ │ │ └── sub-01_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-01_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-01_ses-2_run-2_phasediff.json │ │ │ │ └── sub-01_ses-2_scans.tsv │ │ │ └── sub-01_sessions.tsv │ │ ├── sub-02/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-02_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-02_ses-1_run-2_phasediff.json │ │ │ │ └── sub-02_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-02_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-02_ses-2_run-2_phasediff.json │ │ │ │ └── sub-02_ses-2_scans.tsv │ │ │ └── sub-02_sessions.tsv │ │ ├── sub-03/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-03_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-03_ses-1_run-2_phasediff.json │ │ │ │ └── sub-03_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-03_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-03_ses-2_run-2_phasediff.json │ │ │ │ └── sub-03_ses-2_scans.tsv │ │ │ ├── sub-03-test.bval │ │ │ └── sub-03_sessions.tsv │ │ ├── sub-04/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-04_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-04_ses-1_run-2_phasediff.json │ │ │ │ └── sub-04_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-04_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-04_ses-2_run-2_phasediff.json │ │ │ │ └── sub-04_ses-2_scans.tsv │ │ │ └── sub-04_sessions.tsv │ │ ├── sub-05/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-05_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-05_ses-1_run-2_phasediff.json │ │ │ │ └── sub-05_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-05_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-05_ses-2_run-2_phasediff.json │ │ │ │ └── sub-05_ses-2_scans.tsv │ │ │ └── sub-05_sessions.tsv │ │ ├── sub-06/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-06_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-06_ses-1_run-2_phasediff.json │ │ │ │ └── sub-06_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-06_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-06_ses-2_run-2_phasediff.json │ │ │ │ └── sub-06_ses-2_scans.tsv │ │ │ └── sub-06_sessions.tsv │ │ ├── sub-07/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-07_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-07_ses-1_run-2_phasediff.json │ │ │ │ └── sub-07_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-07_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-07_ses-2_run-2_phasediff.json │ │ │ │ └── sub-07_ses-2_scans.tsv │ │ │ └── sub-07_sessions.tsv │ │ ├── sub-08/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-08_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-08_ses-1_run-2_phasediff.json │ │ │ │ └── sub-08_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-08_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-08_ses-2_run-2_phasediff.json │ │ │ │ └── sub-08_ses-2_scans.tsv │ │ │ └── sub-08_sessions.tsv │ │ ├── sub-09/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-09_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-09_ses-1_run-2_phasediff.json │ │ │ │ └── sub-09_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-09_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-09_ses-2_run-2_phasediff.json │ │ │ │ └── sub-09_ses-2_scans.tsv │ │ │ └── sub-09_sessions.tsv │ │ ├── sub-10/ │ │ │ ├── ses-1/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-10_ses-1_run-1_phasediff.json │ │ │ │ │ └── sub-10_ses-1_run-2_phasediff.json │ │ │ │ └── sub-10_ses-1_scans.tsv │ │ │ ├── ses-2/ │ │ │ │ ├── fmap/ │ │ │ │ │ ├── sub-10_ses-2_run-1_phasediff.json │ │ │ │ │ └── sub-10_ses-2_run-2_phasediff.json │ │ │ │ └── sub-10_ses-2_scans.tsv │ │ │ └── sub-10_sessions.tsv │ │ ├── task-rest_acq-fullbrain_bold.json │ │ ├── task-rest_acq-fullbrain_run-1_physio.json │ │ ├── task-rest_acq-fullbrain_run-2_physio.json │ │ ├── task-rest_acq-prefrontal_bold.json │ │ ├── task-rest_acq-prefrontal_physio.json │ │ └── test.bval │ ├── bids_specs_with_oligarchy.json │ ├── ds000117/ │ │ ├── .bidsignore │ │ ├── CHANGES │ │ ├── README │ │ ├── acq-epi_T1w.json │ │ ├── acq-mprage_T1w.json │ │ ├── dataset_description.json │ │ ├── participants.tsv │ │ ├── run-1_echo-1_FLASH.json │ │ ├── run-1_echo-2_FLASH.json │ │ ├── run-1_echo-3_FLASH.json │ │ ├── run-1_echo-4_FLASH.json │ │ ├── run-1_echo-5_FLASH.json │ │ ├── run-1_echo-6_FLASH.json │ │ ├── run-1_echo-7_FLASH.json │ │ ├── run-2_echo-1_FLASH.json │ │ ├── run-2_echo-2_FLASH.json │ │ ├── run-2_echo-3_FLASH.json │ │ ├── run-2_echo-4_FLASH.json │ │ ├── run-2_echo-5_FLASH.json │ │ ├── run-2_echo-6_FLASH.json │ │ ├── run-2_echo-7_FLASH.json │ │ ├── sub-01/ │ │ │ ├── ses-meg/ │ │ │ │ ├── beh/ │ │ │ │ │ └── sub-01_ses-meg_task-facerecognition_events.tsv │ │ │ │ ├── meg/ │ │ │ │ │ ├── sub-01_ses-meg_headshape.pos │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_proc-sss_coordsystem.json │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-01_proc-sss_events.tsv │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-01_proc-sss_meg.fif │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-02_proc-sss_events.tsv │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-02_proc-sss_meg.fif │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-03_proc-sss_events.tsv │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-03_proc-sss_meg.fif │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-04_proc-sss_events.tsv │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-04_proc-sss_meg.fif │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-05_proc-sss_events.tsv │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-05_proc-sss_meg.fif │ │ │ │ │ ├── sub-01_ses-meg_task-facerecognition_run-06_proc-sss_events.tsv │ │ │ │ │ └── sub-01_ses-meg_task-facerecognition_run-06_proc-sss_meg.fif │ │ │ │ └── sub-01_ses-meg_scans.tsv │ │ │ └── ses-mri/ │ │ │ ├── anat/ │ │ │ │ └── sub-01_ses-mri_acq-mprage_T1w.json │ │ │ ├── dwi/ │ │ │ │ ├── sub-01_ses-mri_dwi.bval │ │ │ │ ├── sub-01_ses-mri_dwi.bvec │ │ │ │ └── sub-01_ses-mri_dwi.json │ │ │ ├── fmap/ │ │ │ │ ├── sub-01_ses-mri_magnitude1.nii │ │ │ │ ├── sub-01_ses-mri_magnitude2.nii │ │ │ │ ├── sub-01_ses-mri_phasediff.json │ │ │ │ └── sub-01_ses-mri_phasediff.nii │ │ │ └── func/ │ │ │ ├── sub-01_ses-mri_task-facerecognition_run-01_events.tsv │ │ │ ├── sub-01_ses-mri_task-facerecognition_run-02_events.tsv │ │ │ ├── sub-01_ses-mri_task-facerecognition_run-03_events.tsv │ │ │ ├── sub-01_ses-mri_task-facerecognition_run-04_events.tsv │ │ │ ├── sub-01_ses-mri_task-facerecognition_run-05_events.tsv │ │ │ ├── sub-01_ses-mri_task-facerecognition_run-06_events.tsv │ │ │ ├── sub-01_ses-mri_task-facerecognition_run-07_events.tsv │ │ │ ├── sub-01_ses-mri_task-facerecognition_run-08_events.tsv │ │ │ └── sub-01_ses-mri_task-facerecognition_run-09_events.tsv │ │ ├── sub-02/ │ │ │ ├── ses-meg/ │ │ │ │ ├── beh/ │ │ │ │ │ └── sub-02_ses-meg_task-facerecognition_events.tsv │ │ │ │ ├── meg/ │ │ │ │ │ ├── sub-02_ses-meg_headshape.pos │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_coordsystem.json │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-01_events.tsv │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-01_meg.fif │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-02_events.tsv │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-02_meg.fif │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-03_events.tsv │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-03_meg.fif │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-04_events.tsv │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-04_meg.fif │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-05_events.tsv │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-05_meg.fif │ │ │ │ │ ├── sub-02_ses-meg_task-facerecognition_run-06_events.tsv │ │ │ │ │ └── sub-02_ses-meg_task-facerecognition_run-06_meg.fif │ │ │ │ └── sub-02_ses-meg_scans.tsv │ │ │ └── ses-mri/ │ │ │ ├── anat/ │ │ │ │ └── sub-02_ses-mri_acq-mprage_T1w.json │ │ │ ├── dwi/ │ │ │ │ ├── sub-02_ses-mri_dwi.bval │ │ │ │ ├── sub-02_ses-mri_dwi.bvec │ │ │ │ └── sub-02_ses-mri_dwi.json │ │ │ ├── fmap/ │ │ │ │ ├── sub-02_ses-mri_magnitude1.nii │ │ │ │ ├── sub-02_ses-mri_magnitude2.nii │ │ │ │ ├── sub-02_ses-mri_phasediff.json │ │ │ │ └── sub-02_ses-mri_phasediff.nii │ │ │ └── func/ │ │ │ ├── sub-02_ses-mri_task-facerecognition_run-01_events.tsv │ │ │ ├── sub-02_ses-mri_task-facerecognition_run-02_events.tsv │ │ │ ├── sub-02_ses-mri_task-facerecognition_run-03_events.tsv │ │ │ ├── sub-02_ses-mri_task-facerecognition_run-04_events.tsv │ │ │ ├── sub-02_ses-mri_task-facerecognition_run-05_events.tsv │ │ │ ├── sub-02_ses-mri_task-facerecognition_run-06_events.tsv │ │ │ ├── sub-02_ses-mri_task-facerecognition_run-07_events.tsv │ │ │ ├── sub-02_ses-mri_task-facerecognition_run-08_events.tsv │ │ │ └── sub-02_ses-mri_task-facerecognition_run-09_events.tsv │ │ ├── sub-emptyroom/ │ │ │ ├── ses-20090409/ │ │ │ │ ├── meg/ │ │ │ │ │ └── sub-emptyroom_ses-20090409_task-noise_meg.fif │ │ │ │ └── sub-emptyroom_ses-20090409_scans.tsv │ │ │ ├── ses-20090506/ │ │ │ │ ├── meg/ │ │ │ │ │ └── sub-emptyroom_ses-20090506_task-noise_meg.fif │ │ │ │ └── sub-emptyroom_ses-20090506_scans.tsv │ │ │ ├── ses-20090511/ │ │ │ │ ├── meg/ │ │ │ │ │ └── sub-emptyroom_ses-20090511_task-noise_meg.fif │ │ │ │ └── sub-emptyroom_ses-20090511_scans.tsv │ │ │ ├── ses-20090515/ │ │ │ │ ├── meg/ │ │ │ │ │ └── sub-emptyroom_ses-20090515_task-noise_meg.fif │ │ │ │ └── sub-emptyroom_ses-20090515_scans.tsv │ │ │ ├── ses-20090518/ │ │ │ │ ├── meg/ │ │ │ │ │ └── sub-emptyroom_ses-20090518_task-noise_meg.fif │ │ │ │ └── sub-emptyroom_ses-20090518_scans.tsv │ │ │ ├── ses-20090601/ │ │ │ │ ├── meg/ │ │ │ │ │ └── sub-emptyroom_ses-20090601_task-noise_meg.fif │ │ │ │ └── sub-emptyroom_ses-20090601_scans.tsv │ │ │ ├── ses-20091126/ │ │ │ │ ├── meg/ │ │ │ │ │ └── sub-emptyroom_ses-20091126_task-noise_meg.fif │ │ │ │ └── sub-emptyroom_ses-20091126_scans.tsv │ │ │ └── ses-20091208/ │ │ │ ├── meg/ │ │ │ │ └── sub-emptyroom_ses-20091208_task-noise_meg.fif │ │ │ └── sub-emptyroom_ses-20091208_scans.tsv │ │ ├── task-facerecognition_beh.json │ │ ├── task-facerecognition_bold.json │ │ ├── task-facerecognition_channels.tsv │ │ └── task-facerecognition_meg.json │ ├── ds005/ │ │ ├── CHANGES │ │ ├── README │ │ ├── dataset_description.json │ │ ├── derivatives/ │ │ │ ├── events/ │ │ │ │ ├── dataset_description.json │ │ │ │ └── sub-01/ │ │ │ │ └── func/ │ │ │ │ └── sub-01_task-mixedgamblestask_run-01_desc-extra_events.tsv │ │ │ └── fmriprep/ │ │ │ ├── dataset_description.json │ │ │ ├── sub-01/ │ │ │ │ └── func/ │ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-01_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-01_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-01_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-01_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-01_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-01_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-02/ │ │ │ │ └── func/ │ │ │ │ ├── sub-02_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-02_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-02_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-02_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-02_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-02_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-02_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-02_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-02_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-03/ │ │ │ │ └── func/ │ │ │ │ ├── sub-03_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-03_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-03_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-03_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-03_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-03_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-03_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-03_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-03_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-04/ │ │ │ │ └── func/ │ │ │ │ ├── sub-04_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-04_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-04_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-04_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-04_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-04_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-04_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-04_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-04_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-05/ │ │ │ │ └── func/ │ │ │ │ ├── sub-05_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-05_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-05_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-05_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-05_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-05_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-05_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-05_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-05_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-06/ │ │ │ │ └── func/ │ │ │ │ ├── sub-06_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-06_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-06_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-06_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-06_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-06_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-06_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-06_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-06_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-07/ │ │ │ │ └── func/ │ │ │ │ ├── sub-07_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-07_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-07_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-07_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-07_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-07_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-07_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-07_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-07_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-08/ │ │ │ │ └── func/ │ │ │ │ ├── sub-08_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-08_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-08_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-08_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-08_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-08_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-08_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-08_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-08_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-09/ │ │ │ │ └── func/ │ │ │ │ ├── sub-09_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-09_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-09_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-09_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-09_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-09_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-09_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-09_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-09_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-10/ │ │ │ │ └── func/ │ │ │ │ ├── sub-10_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-10_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-10_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-10_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-10_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-10_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-10_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-10_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-10_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-11/ │ │ │ │ └── func/ │ │ │ │ ├── sub-11_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-11_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-11_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-11_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-11_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-11_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-11_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-11_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-11_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-12/ │ │ │ │ └── func/ │ │ │ │ ├── sub-12_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-12_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-12_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-12_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-12_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-12_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-12_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-12_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-12_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-13/ │ │ │ │ └── func/ │ │ │ │ ├── sub-13_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-13_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-13_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-13_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-13_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-13_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-13_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-13_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-13_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-14/ │ │ │ │ └── func/ │ │ │ │ ├── sub-14_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-14_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-14_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-14_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-14_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-14_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-14_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-14_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-14_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-15/ │ │ │ │ └── func/ │ │ │ │ ├── sub-15_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ │ ├── sub-15_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-15_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-15_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ │ ├── sub-15_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ │ ├── sub-15_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ │ ├── sub-15_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ │ ├── sub-15_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ │ └── sub-15_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ └── sub-16/ │ │ │ └── func/ │ │ │ ├── sub-16_task-mixedgamblestask_run-01_desc-preproc_timeseries.json │ │ │ ├── sub-16_task-mixedgamblestask_run-01_desc-preproc_timeseries.tsv │ │ │ ├── sub-16_task-mixedgamblestask_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-16_task-mixedgamblestask_run-02_desc-preproc_timeseries.json │ │ │ ├── sub-16_task-mixedgamblestask_run-02_desc-preproc_timeseries.tsv │ │ │ ├── sub-16_task-mixedgamblestask_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ │ ├── sub-16_task-mixedgamblestask_run-03_desc-preproc_timeseries.json │ │ │ ├── sub-16_task-mixedgamblestask_run-03_desc-preproc_timeseries.tsv │ │ │ └── sub-16_task-mixedgamblestask_run-03_space-MNI152NLin2009cAsym_desc-preproc_bold.json │ │ ├── ds005_onsets.json │ │ ├── dwi.bval │ │ ├── dwi.bvec │ │ ├── models/ │ │ │ ├── ds-005_type-interceptonlyrunlevel_model.json │ │ │ ├── ds-005_type-mfx_model.json │ │ │ ├── ds-005_type-test_intercept.json │ │ │ ├── ds-005_type-test_model.json │ │ │ ├── ds-005_type-testnodummy_model.json │ │ │ └── extras/ │ │ │ └── ds-005_type-test_model.json │ │ ├── participants.tsv │ │ ├── sub-01/ │ │ │ ├── func/ │ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_events.json │ │ │ │ ├── sub-01_task-mixedgamblestask_run-01_events.tsv │ │ │ │ ├── sub-01_task-mixedgamblestask_run-02_events.tsv │ │ │ │ └── sub-01_task-mixedgamblestask_run-03_events.tsv │ │ │ └── sub-01_scans.tsv │ │ ├── sub-02/ │ │ │ ├── func/ │ │ │ │ ├── sub-02_task-mixedgamblestask_run-01_events.tsv │ │ │ │ ├── sub-02_task-mixedgamblestask_run-02_events.tsv │ │ │ │ └── sub-02_task-mixedgamblestask_run-03_events.tsv │ │ │ └── sub-02_scans.tsv │ │ ├── sub-03/ │ │ │ └── func/ │ │ │ ├── sub-03_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-03_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-03_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-04/ │ │ │ └── func/ │ │ │ ├── sub-04_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-04_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-04_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-05/ │ │ │ └── func/ │ │ │ ├── sub-05_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-05_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-05_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-06/ │ │ │ └── func/ │ │ │ ├── sub-06_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-06_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-06_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-07/ │ │ │ └── func/ │ │ │ ├── sub-07_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-07_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-07_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-08/ │ │ │ └── func/ │ │ │ ├── sub-08_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-08_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-08_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-09/ │ │ │ └── func/ │ │ │ ├── sub-09_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-09_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-09_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-10/ │ │ │ └── func/ │ │ │ ├── sub-10_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-10_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-10_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-11/ │ │ │ ├── dwi/ │ │ │ │ └── sub-11 │ │ │ └── func/ │ │ │ ├── sub-11_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-11_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-11_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-12/ │ │ │ └── func/ │ │ │ ├── sub-12_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-12_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-12_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-13/ │ │ │ └── func/ │ │ │ ├── sub-13_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-13_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-13_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-14/ │ │ │ └── func/ │ │ │ ├── sub-14_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-14_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-14_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-15/ │ │ │ └── func/ │ │ │ ├── sub-15_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-15_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-15_task-mixedgamblestask_run-03_events.tsv │ │ ├── sub-16/ │ │ │ └── func/ │ │ │ ├── sub-16_task-mixedgamblestask_run-01_events.tsv │ │ │ ├── sub-16_task-mixedgamblestask_run-02_events.tsv │ │ │ └── sub-16_task-mixedgamblestask_run-03_events.tsv │ │ └── task-mixedgamblestask_bold.json │ ├── ds005_conflict/ │ │ ├── dataset_description.json │ │ └── sub-01/ │ │ └── func/ │ │ ├── sub-01_task-mixedgamblestask_run-01_events.json │ │ ├── sub-01_task-mixedgamblestask_run-01_events.tsv │ │ ├── sub-01_task-mixedgamblestask_run-02_events.tsv │ │ └── sub-01_task-mixedgamblestask_run-03_events.tsv │ ├── ds005_derivs/ │ │ ├── dummy/ │ │ │ └── dataset_description.json │ │ ├── dummy-vx.x.x/ │ │ │ └── dataset_description.json │ │ ├── format_errs/ │ │ │ ├── no_dataset_type/ │ │ │ │ └── dataset_description.json │ │ │ ├── no_pipeline_description/ │ │ │ │ └── dataset_description.json │ │ │ └── no_type_or_description/ │ │ │ └── dataset_description.json │ │ └── other/ │ │ └── dummy/ │ │ └── dataset_description.json │ └── synthetic/ │ ├── T1w.json │ ├── code/ │ │ ├── create_synthetic_ds.sh │ │ ├── dwi.bval │ │ └── dwi.bvec │ ├── dataset_description.json │ ├── derivatives/ │ │ └── fmriprep/ │ │ ├── dataset_description.json │ │ ├── sub-01/ │ │ │ ├── ses-01/ │ │ │ │ └── func/ │ │ │ │ ├── sub-01_ses-01_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ │ ├── sub-01_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-01_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-01_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-01_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-01_ses-01_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ │ ├── sub-01_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-01_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-01_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-01_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-01_ses-01_task-rest_desc-confounds_regressors.tsv │ │ │ │ ├── sub-01_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-01_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-01_ses-01_task-rest_space-T1w_desc-brain_mask.nii │ │ │ │ └── sub-01_ses-01_task-rest_space-T1w_desc-preproc_bold.nii │ │ │ └── ses-02/ │ │ │ └── func/ │ │ │ ├── sub-01_ses-02_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ ├── sub-01_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-01_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-01_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-01_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-01_ses-02_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ ├── sub-01_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-01_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-01_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-01_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-01_ses-02_task-rest_desc-confounds_regressors.tsv │ │ │ ├── sub-01_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-01_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-01_ses-02_task-rest_space-T1w_desc-brain_mask.nii │ │ │ └── sub-01_ses-02_task-rest_space-T1w_desc-preproc_bold.nii │ │ ├── sub-02/ │ │ │ ├── ses-01/ │ │ │ │ └── func/ │ │ │ │ ├── sub-02_ses-01_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ │ ├── sub-02_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-02_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-02_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-02_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-02_ses-01_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ │ ├── sub-02_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-02_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-02_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-02_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-02_ses-01_task-rest_desc-confounds_regressors.tsv │ │ │ │ ├── sub-02_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-02_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-02_ses-01_task-rest_space-T1w_desc-brain_mask.nii │ │ │ │ └── sub-02_ses-01_task-rest_space-T1w_desc-preproc_bold.nii │ │ │ └── ses-02/ │ │ │ └── func/ │ │ │ ├── sub-02_ses-02_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ ├── sub-02_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-02_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-02_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-02_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-02_ses-02_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ ├── sub-02_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-02_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-02_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-02_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-02_ses-02_task-rest_desc-confounds_regressors.tsv │ │ │ ├── sub-02_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-02_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-02_ses-02_task-rest_space-T1w_desc-brain_mask.nii │ │ │ └── sub-02_ses-02_task-rest_space-T1w_desc-preproc_bold.nii │ │ ├── sub-03/ │ │ │ ├── ses-01/ │ │ │ │ └── func/ │ │ │ │ ├── sub-03_ses-01_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ │ ├── sub-03_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-03_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-03_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-03_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-03_ses-01_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ │ ├── sub-03_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-03_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-03_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-03_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-03_ses-01_task-rest_desc-confounds_regressors.tsv │ │ │ │ ├── sub-03_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-03_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-03_ses-01_task-rest_space-T1w_desc-brain_mask.nii │ │ │ │ └── sub-03_ses-01_task-rest_space-T1w_desc-preproc_bold.nii │ │ │ └── ses-02/ │ │ │ └── func/ │ │ │ ├── sub-03_ses-02_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ ├── sub-03_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-03_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-03_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-03_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-03_ses-02_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ ├── sub-03_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-03_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-03_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-03_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-03_ses-02_task-rest_desc-confounds_regressors.tsv │ │ │ ├── sub-03_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-03_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-03_ses-02_task-rest_space-T1w_desc-brain_mask.nii │ │ │ └── sub-03_ses-02_task-rest_space-T1w_desc-preproc_bold.nii │ │ ├── sub-04/ │ │ │ ├── ses-01/ │ │ │ │ └── func/ │ │ │ │ ├── sub-04_ses-01_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ │ ├── sub-04_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-04_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-04_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-04_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-04_ses-01_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ │ ├── sub-04_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-04_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-04_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-04_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-04_ses-01_task-rest_desc-confounds_regressors.tsv │ │ │ │ ├── sub-04_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-04_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-04_ses-01_task-rest_space-T1w_desc-brain_mask.nii │ │ │ │ └── sub-04_ses-01_task-rest_space-T1w_desc-preproc_bold.nii │ │ │ └── ses-02/ │ │ │ └── func/ │ │ │ ├── sub-04_ses-02_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ ├── sub-04_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-04_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-04_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-04_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-04_ses-02_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ ├── sub-04_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-04_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-04_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-04_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-04_ses-02_task-rest_desc-confounds_regressors.tsv │ │ │ ├── sub-04_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-04_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-04_ses-02_task-rest_space-T1w_desc-brain_mask.nii │ │ │ └── sub-04_ses-02_task-rest_space-T1w_desc-preproc_bold.nii │ │ ├── sub-05/ │ │ │ ├── ses-01/ │ │ │ │ └── func/ │ │ │ │ ├── sub-05_ses-01_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ │ ├── sub-05_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-05_ses-01_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-05_ses-01_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-05_ses-01_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-05_ses-01_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ │ ├── sub-05_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-05_ses-01_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-05_ses-01_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ │ ├── sub-05_ses-01_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ │ ├── sub-05_ses-01_task-rest_desc-confounds_regressors.tsv │ │ │ │ ├── sub-05_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ │ ├── sub-05_ses-01_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ │ ├── sub-05_ses-01_task-rest_space-T1w_desc-brain_mask.nii │ │ │ │ └── sub-05_ses-01_task-rest_space-T1w_desc-preproc_bold.nii │ │ │ └── ses-02/ │ │ │ └── func/ │ │ │ ├── sub-05_ses-02_task-nback_run-01_desc-confounds_regressors.tsv │ │ │ ├── sub-05_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-05_ses-02_task-nback_run-01_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-05_ses-02_task-nback_run-01_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-05_ses-02_task-nback_run-01_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-05_ses-02_task-nback_run-02_desc-confounds_regressors.tsv │ │ │ ├── sub-05_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-05_ses-02_task-nback_run-02_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-05_ses-02_task-nback_run-02_space-T1w_desc-brain_mask.nii │ │ │ ├── sub-05_ses-02_task-nback_run-02_space-T1w_desc-preproc_bold.nii │ │ │ ├── sub-05_ses-02_task-rest_desc-confounds_regressors.tsv │ │ │ ├── sub-05_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii │ │ │ ├── sub-05_ses-02_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii │ │ │ ├── sub-05_ses-02_task-rest_space-T1w_desc-brain_mask.nii │ │ │ └── sub-05_ses-02_task-rest_space-T1w_desc-preproc_bold.nii │ │ ├── task-nback_bold.json │ │ └── task-rest_bold.json │ ├── dwi.json │ ├── participants.tsv │ ├── sub-01/ │ │ ├── ses-01/ │ │ │ ├── anat/ │ │ │ │ └── sub-01_ses-01_T1w.nii │ │ │ ├── dwi/ │ │ │ │ ├── sub-01_ses-01_dwi.bval │ │ │ │ └── sub-01_ses-01_dwi.bvec │ │ │ ├── fmap/ │ │ │ │ └── sub-01_ses-01_phasediff.json │ │ │ ├── func/ │ │ │ │ ├── sub-01_ses-01_task-nback_run-01_bold.nii │ │ │ │ ├── sub-01_ses-01_task-nback_run-02_bold.nii │ │ │ │ └── sub-01_ses-01_task-rest_bold.nii │ │ │ └── sub-01_ses-01_scans.tsv │ │ ├── ses-02/ │ │ │ ├── anat/ │ │ │ │ └── sub-01_ses-02_T1w.nii │ │ │ ├── func/ │ │ │ │ ├── sub-01_ses-02_task-nback_run-01_bold.nii │ │ │ │ ├── sub-01_ses-02_task-nback_run-02_bold.nii │ │ │ │ └── sub-01_ses-02_task-rest_bold.nii │ │ │ └── sub-01_ses-02_scans.tsv │ │ └── sub-01_sessions.tsv │ ├── sub-02/ │ │ ├── ses-01/ │ │ │ ├── anat/ │ │ │ │ └── sub-02_ses-01_T1w.nii │ │ │ ├── dwi/ │ │ │ │ ├── sub-02_ses-01_dwi.bval │ │ │ │ └── sub-02_ses-01_dwi.bvec │ │ │ ├── fmap/ │ │ │ │ └── sub-02_ses-01_phasediff.json │ │ │ ├── func/ │ │ │ │ ├── sub-02_ses-01_task-nback_run-01_bold.nii │ │ │ │ ├── sub-02_ses-01_task-nback_run-02_bold.nii │ │ │ │ └── sub-02_ses-01_task-rest_bold.nii │ │ │ └── sub-02_ses-01_scans.tsv │ │ ├── ses-02/ │ │ │ ├── anat/ │ │ │ │ └── sub-02_ses-02_T1w.nii │ │ │ ├── func/ │ │ │ │ ├── sub-02_ses-02_task-nback_run-01_bold.nii │ │ │ │ ├── sub-02_ses-02_task-nback_run-02_bold.nii │ │ │ │ └── sub-02_ses-02_task-rest_bold.nii │ │ │ └── sub-02_ses-02_scans.tsv │ │ └── sub-02_sessions.tsv │ ├── sub-03/ │ │ ├── ses-01/ │ │ │ ├── anat/ │ │ │ │ └── sub-03_ses-01_T1w.nii │ │ │ ├── dwi/ │ │ │ │ ├── sub-03_ses-01_dwi.bval │ │ │ │ └── sub-03_ses-01_dwi.bvec │ │ │ ├── fmap/ │ │ │ │ └── sub-03_ses-01_phasediff.json │ │ │ ├── func/ │ │ │ │ ├── sub-03_ses-01_task-nback_run-01_bold.nii │ │ │ │ ├── sub-03_ses-01_task-nback_run-02_bold.nii │ │ │ │ └── sub-03_ses-01_task-rest_bold.nii │ │ │ └── sub-03_ses-01_scans.tsv │ │ ├── ses-02/ │ │ │ ├── anat/ │ │ │ │ └── sub-03_ses-02_T1w.nii │ │ │ ├── func/ │ │ │ │ ├── sub-03_ses-02_task-nback_run-01_bold.nii │ │ │ │ ├── sub-03_ses-02_task-nback_run-02_bold.nii │ │ │ │ └── sub-03_ses-02_task-rest_bold.nii │ │ │ └── sub-03_ses-02_scans.tsv │ │ └── sub-03_sessions.tsv │ ├── sub-04/ │ │ ├── ses-01/ │ │ │ ├── anat/ │ │ │ │ └── sub-04_ses-01_T1w.nii │ │ │ ├── dwi/ │ │ │ │ ├── sub-04_ses-01_dwi.bval │ │ │ │ └── sub-04_ses-01_dwi.bvec │ │ │ ├── fmap/ │ │ │ │ └── sub-04_ses-01_phasediff.json │ │ │ ├── func/ │ │ │ │ ├── sub-04_ses-01_task-nback_run-01_bold.nii │ │ │ │ ├── sub-04_ses-01_task-nback_run-02_bold.nii │ │ │ │ └── sub-04_ses-01_task-rest_bold.nii │ │ │ └── sub-04_ses-01_scans.tsv │ │ ├── ses-02/ │ │ │ ├── anat/ │ │ │ │ └── sub-04_ses-02_T1w.nii │ │ │ ├── func/ │ │ │ │ ├── sub-04_ses-02_task-nback_run-01_bold.nii │ │ │ │ ├── sub-04_ses-02_task-nback_run-02_bold.nii │ │ │ │ └── sub-04_ses-02_task-rest_bold.nii │ │ │ └── sub-04_ses-02_scans.tsv │ │ └── sub-04_sessions.tsv │ ├── sub-05/ │ │ ├── ses-01/ │ │ │ ├── anat/ │ │ │ │ └── sub-05_ses-01_T1w.nii │ │ │ ├── dwi/ │ │ │ │ ├── sub-05_ses-01_dwi.bval │ │ │ │ └── sub-05_ses-01_dwi.bvec │ │ │ ├── fmap/ │ │ │ │ └── sub-05_ses-01_phasediff.json │ │ │ ├── func/ │ │ │ │ ├── sub-05_ses-01_task-nback_run-01_bold.nii │ │ │ │ ├── sub-05_ses-01_task-nback_run-02_bold.nii │ │ │ │ └── sub-05_ses-01_task-rest_bold.nii │ │ │ └── sub-05_ses-01_scans.tsv │ │ ├── ses-02/ │ │ │ ├── anat/ │ │ │ │ └── sub-05_ses-02_T1w.nii │ │ │ ├── func/ │ │ │ │ ├── sub-05_ses-02_task-nback_run-01_bold.nii │ │ │ │ ├── sub-05_ses-02_task-nback_run-02_bold.nii │ │ │ │ └── sub-05_ses-02_task-rest_bold.nii │ │ │ └── sub-05_ses-02_scans.tsv │ │ └── sub-05_sessions.tsv │ ├── task-nback_bold.json │ ├── task-nback_events.tsv │ ├── task-nback_physio.json │ ├── task-nback_stim.json │ ├── task-rest_bold.json │ └── task-rest_physio.json ├── tools/ │ ├── check_noqa_budget.py │ ├── prep_zenodo.py │ ├── update_changes.sh │ └── update_requirements.py └── tox.ini
SYMBOL INDEX (985 symbols across 71 files)
FILE: doc/sphinxext/docscrape.py
class Reader (line 12) | class Reader:
method __init__ (line 15) | def __init__(self, data):
method __getitem__ (line 29) | def __getitem__(self, n):
method reset (line 32) | def reset(self): # noqa: D102
method read (line 35) | def read(self): # noqa: D102
method seek_next_non_empty_line (line 43) | def seek_next_non_empty_line(self): # noqa: D102
method eof (line 50) | def eof(self): # noqa: D102
method read_to_condition (line 53) | def read_to_condition(self, condition_func): # noqa: D102
method read_to_next_empty_line (line 63) | def read_to_next_empty_line(self): # noqa: D102
method read_to_next_unindented_line (line 71) | def read_to_next_unindented_line(self): # noqa: D102
method peek (line 77) | def peek(self, n=0): # noqa: D102
method is_empty (line 83) | def is_empty(self): # noqa: D102
class NumpyDocString (line 87) | class NumpyDocString(collections.abc.Mapping): # noqa: D101
method __init__ (line 88) | def __init__(self, docstring, config={}): # noqa: B006
method __getitem__ (line 114) | def __getitem__(self, key):
method __setitem__ (line 117) | def __setitem__(self, key, val):
method __iter__ (line 123) | def __iter__(self):
method __len__ (line 126) | def __len__(self):
method _is_at_section (line 129) | def _is_at_section(self):
method _strip (line 143) | def _strip(self, doc):
method _read_to_next_section (line 156) | def _read_to_next_section(self):
method _read_sections (line 167) | def _read_sections(self):
method _parse_param_list (line 179) | def _parse_param_list(self, content):
method _parse_see_also (line 202) | def _parse_see_also(self, content):
method _parse_index (line 257) | def _parse_index(self, section, content):
method _parse_summary (line 276) | def _parse_summary(self):
method _parse (line 297) | def _parse(self):
method _str_header (line 335) | def _str_header(self, name, symbol='-'):
method _str_indent (line 338) | def _str_indent(self, doc, indent=4):
method _str_signature (line 344) | def _str_signature(self):
method _str_summary (line 350) | def _str_summary(self):
method _str_extended_summary (line 356) | def _str_extended_summary(self):
method _str_param_list (line 362) | def _str_param_list(self, name):
method _str_section (line 375) | def _str_section(self, name):
method _str_see_also (line 383) | def _str_see_also(self, func_role):
method _str_index (line 409) | def _str_index(self):
method __str__ (line 419) | def __str__(self, func_role=''):
function indent (line 443) | def indent(str, indent=4): # noqa: A002, D103
function dedent_lines (line 451) | def dedent_lines(lines):
function header (line 456) | def header(text, style='-'): # noqa: D103
class FunctionDoc (line 460) | class FunctionDoc(NumpyDocString): # noqa: D101
method __init__ (line 461) | def __init__(self, func, role='func', doc=None, config={}): # noqa: B006
method get_func (line 483) | def get_func(self): # noqa: D102
method __str__ (line 491) | def __str__(self):
class ClassDoc (line 508) | class ClassDoc(NumpyDocString): # noqa: D101
method __init__ (line 511) | def __init__(self, cls, doc=None, modulename='', func_doc=FunctionDoc,...
method methods (line 549) | def methods(self): # noqa: D102
method properties (line 563) | def properties(self): # noqa: D102
method _is_show_member (line 578) | def _is_show_member(self, name):
FILE: doc/sphinxext/docscrape_sphinx.py
class SphinxDocString (line 10) | class SphinxDocString(NumpyDocString): # noqa: D101
method __init__ (line 11) | def __init__(self, docstring, config={}): # noqa: B006
method _str_header (line 16) | def _str_header(self, name, symbol='`'):
method _str_field_list (line 19) | def _str_field_list(self, name):
method _str_indent (line 22) | def _str_indent(self, doc, indent=4):
method _str_signature (line 28) | def _str_signature(self):
method _str_summary (line 35) | def _str_summary(self):
method _str_extended_summary (line 38) | def _str_extended_summary(self):
method _str_param_list (line 41) | def _str_param_list(self, name):
method _obj (line 54) | def _obj(self):
method _str_member_list (line 61) | def _str_member_list(self, name):
method _str_section (line 101) | def _str_section(self, name):
method _str_see_also (line 111) | def _str_see_also(self, func_role):
method _str_warnings (line 119) | def _str_warnings(self):
method _str_index (line 126) | def _str_index(self):
method _str_references (line 142) | def _str_references(self):
method _str_examples (line 164) | def _str_examples(self):
method __str__ (line 177) | def __str__(self, indent=0, func_role='obj'):
class SphinxFunctionDoc (line 196) | class SphinxFunctionDoc(SphinxDocString, FunctionDoc): # noqa: D101
method __init__ (line 197) | def __init__(self, obj, doc=None, config={}): # noqa: B006
class SphinxClassDoc (line 202) | class SphinxClassDoc(SphinxDocString, ClassDoc): # noqa: D101
method __init__ (line 203) | def __init__(self, obj, doc=None, func_doc=None, config={}): # noqa: ...
class SphinxObjDoc (line 208) | class SphinxObjDoc(SphinxDocString): # noqa: D101
method __init__ (line 209) | def __init__(self, obj, doc=None, config={}): # noqa: B006
function get_doc_object (line 214) | def get_doc_object(obj, what=None, doc=None, config={}): # noqa: B006, ...
FILE: doc/sphinxext/github.py
function make_link_node (line 24) | def make_link_node(rawtext, app, type, slug, options): # noqa: A002
function ghissue_role (line 51) | def ghissue_role(name, rawtext, text, lineno, inliner, options={}, conte...
function ghuser_role (line 94) | def ghuser_role(name, rawtext, text, lineno, inliner, options={}, conten...
function ghcommit_role (line 116) | def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, cont...
function setup (line 147) | def setup(app):
FILE: doc/sphinxext/math_dollar.py
function dollars_to_math (line 4) | def dollars_to_math(source):
function process_dollars (line 55) | def process_dollars(app, docname, source): # noqa: D103
function mathdollar_docstrings (line 59) | def mathdollar_docstrings(app, what, name, obj, options, lines): # noqa...
function setup (line 63) | def setup(app): # noqa: D103
FILE: doc/sphinxext/numpydoc.py
function mangle_docstrings (line 32) | def mangle_docstrings(app, what, name, obj, options, lines, reference_of...
function mangle_signature (line 81) | def mangle_signature(app, what, name, obj, options, sig, retann): # noq...
function setup (line 100) | def setup(app, get_doc_object_=get_doc_object): # noqa: D103
class ManglingDomainBase (line 129) | class ManglingDomainBase: # noqa: D101
method __init__ (line 132) | def __init__(self, *a, **kw):
method wrap_mangling_directives (line 136) | def wrap_mangling_directives(self): # noqa: D102
class NumpyPythonDomain (line 141) | class NumpyPythonDomain(ManglingDomainBase, PythonDomain): # noqa: D101
class NumpyCDomain (line 155) | class NumpyCDomain(ManglingDomainBase, CDomain): # noqa: D101
function wrap_mangling_directive (line 166) | def wrap_mangling_directive(base_directive, objtype): # noqa: D103
FILE: src/bids/_version.py
function get_keywords (line 23) | def get_keywords() -> Dict[str, str]:
class VersioneerConfig (line 36) | class VersioneerConfig:
function get_config (line 47) | def get_config() -> VersioneerConfig:
class NotThisMethod (line 61) | class NotThisMethod(Exception):
function register_vcs_handler (line 69) | def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator
function run_command (line 80) | def run_command(
function versions_from_parentdir (line 128) | def versions_from_parentdir(
function git_get_keywords (line 157) | def git_get_keywords(versionfile_abs: str) -> Dict[str, str]:
function git_versions_from_keywords (line 185) | def git_versions_from_keywords(
function git_pieces_from_vcs (line 253) | def git_pieces_from_vcs(
function plus_or_dot (line 390) | def plus_or_dot(pieces: Dict[str, Any]) -> str:
function render_pep440 (line 397) | def render_pep440(pieces: Dict[str, Any]) -> str:
function render_pep440_branch (line 422) | def render_pep440_branch(pieces: Dict[str, Any]) -> str:
function pep440_split_post (line 452) | def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]:
function render_pep440_pre (line 462) | def render_pep440_pre(pieces: Dict[str, Any]) -> str:
function render_pep440_post (line 486) | def render_pep440_post(pieces: Dict[str, Any]) -> str:
function render_pep440_post_branch (line 513) | def render_pep440_post_branch(pieces: Dict[str, Any]) -> str:
function render_pep440_old (line 542) | def render_pep440_old(pieces: Dict[str, Any]) -> str:
function render_git_describe (line 564) | def render_git_describe(pieces: Dict[str, Any]) -> str:
function render_git_describe_long (line 584) | def render_git_describe_long(pieces: Dict[str, Any]) -> str:
function render (line 604) | def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]:
function get_versions (line 640) | def get_versions() -> Dict[str, Any]:
FILE: src/bids/cli.py
class Either (line 17) | class Either(click.ParamType):
method __init__ (line 51) | def __init__(self, *types):
method name (line 55) | def name(self): # noqa: D102
method convert (line 59) | def convert(self, value, param, ctx): # noqa: D102
class PathOrRegex (line 70) | class PathOrRegex(click.ParamType):
method convert (line 75) | def convert(self, value, param, ctx): # noqa: D102
function cli (line 85) | def cli():
function layout (line 144) | def layout(
function upgrade (line 191) | def upgrade(root):
function upgrade_dataset_description (line 222) | def upgrade_dataset_description(description):
function upgrade_filenames (line 255) | def upgrade_filenames(root, description): # noqa: D103
function model_report (line 300) | def model_report(
FILE: src/bids/config.py
function set_option (line 23) | def set_option(key, value):
function set_options (line 47) | def set_options(**kwargs):
function get_option (line 58) | def get_option(key):
function from_file (line 70) | def from_file(filenames, error_on_missing=True):
function reset_options (line 89) | def reset_options(update_from_file=False):
function _update_from_standard_locations (line 103) | def _update_from_standard_locations():
FILE: src/bids/conftest.py
function config_paths (line 25) | def config_paths(): # noqa: D103
function extension_initial_dot (line 32) | def extension_initial_dot(): # noqa: D103
function mock_config (line 39) | def mock_config(config_paths, extension_initial_dot): # noqa: D103
function bids_examples (line 49) | def bids_examples(): # noqa: D103
function tests_dir (line 65) | def tests_dir(): # noqa: D103
FILE: src/bids/due.py
class InactiveDueCreditCollector (line 28) | class InactiveDueCreditCollector:
method _donothing (line 31) | def _donothing(self, *args, **kwargs):
method dcite (line 35) | def dcite(self, *args, **kwargs):
method __repr__ (line 46) | def __repr__(self):
function _donothing_func (line 50) | def _donothing_func(*args, **kwargs):
FILE: src/bids/exceptions.py
class PyBIDSError (line 8) | class PyBIDSError(Exception):
class ConfigError (line 12) | class ConfigError(ValueError, PyBIDSError):
class NoMatchError (line 16) | class NoMatchError(ValueError, PyBIDSError):
class BIDSEntityError (line 20) | class BIDSEntityError(AttributeError, PyBIDSError):
class TargetError (line 24) | class TargetError(ValueError, PyBIDSError):
class BIDSValidationError (line 28) | class BIDSValidationError(ValueError, PyBIDSError):
class BIDSDerivativesValidationError (line 32) | class BIDSDerivativesValidationError(BIDSValidationError):
class BIDSConflictingValuesError (line 36) | class BIDSConflictingValuesError(BIDSValidationError):
class BIDSChildDatasetError (line 40) | class BIDSChildDatasetError(ValueError, PyBIDSError):
FILE: src/bids/external/inflect.py
class UnknownClassicalModeError (line 70) | class UnknownClassicalModeError(Exception):
class BadNumValueError (line 74) | class BadNumValueError(Exception):
class BadChunkingOptionError (line 78) | class BadChunkingOptionError(Exception):
class NumOutOfRangeError (line 82) | class NumOutOfRangeError(Exception):
class BadUserDefinedPatternError (line 86) | class BadUserDefinedPatternError(Exception):
class BadRcFileError (line 90) | class BadRcFileError(Exception):
class BadGenderError (line 94) | class BadGenderError(Exception):
function print3 (line 101) | def print3(txt: str) -> None:
function enclose (line 106) | def enclose(s: str) -> str:
function joinstem (line 110) | def joinstem(cutpoint: Optional[int] = 0, words: Optional[Iterable[str]]...
function bysize (line 127) | def bysize(words: Iterable[str]) -> Dict[int, set]:
function make_pl_si_lists (line 144) | def make_pl_si_lists(
function get_si_pron (line 1696) | def get_si_pron(thecase, word, gender) -> str:
class Words (line 2023) | class Words(str):
method __init__ (line 2029) | def __init__(self, orig) -> None:
class engine (line 2036) | class engine:
method __init__ (line 2037) | def __init__(self) -> None:
method _number_args (line 2051) | def _number_args(self):
method _number_args (line 2055) | def _number_args(self, val):
method __getattr__ (line 2073) | def __getattr__(self, meth):
method defnoun (line 2079) | def defnoun(self, singular: str, plural: str) -> int:
method defverb (line 2090) | def defverb(self, s1: str, p1: str, s2: str, p2: str, s3: str, p3: str...
method defadj (line 2106) | def defadj(self, singular: str, plural: str) -> int:
method defa (line 2116) | def defa(self, pattern: str) -> int:
method defan (line 2125) | def defan(self, pattern: str) -> int:
method checkpat (line 2134) | def checkpat(self, pattern: Optional[str]) -> None:
method checkpatplural (line 2146) | def checkpatplural(self, pattern: str) -> None:
method ud_match (line 2152) | def ud_match(self, word: str, wordlist: List[str]) -> Optional[str]:
method classical (line 2164) | def classical(self, **kwargs) -> None:
method num (line 2198) | def num(
method gender (line 2220) | def gender(self, gender: str) -> None:
method _get_value_from_ast (line 2237) | def _get_value_from_ast(self, obj):
method _string_to_substitute (line 2259) | def _string_to_substitute(
method inflect (line 2291) | def inflect(self, text: str) -> str:
method postprocess (line 2330) | def postprocess(self, orig: str, inflected) -> str:
method partition_word (line 2360) | def partition_word(self, text: str) -> Tuple[str, str, str]:
method plural (line 2367) | def plural(self, text: str, count: Optional[Union[str, int]] = None) -...
method plural_noun (line 2390) | def plural_noun(self, text: str, count: Optional[Union[str, int]] = No...
method plural_verb (line 2408) | def plural_verb(self, text: str, count: Optional[Union[str, int]] = No...
method plural_adj (line 2429) | def plural_adj(self, text: str, count: str = None) -> str:
method compare (line 2447) | def compare(self, word1: str, word2: str) -> Union[str, bool]:
method compare_nouns (line 2465) | def compare_nouns(self, word1: str, word2: str) -> Union[str, bool]:
method compare_verbs (line 2480) | def compare_verbs(self, word1: str, word2: str) -> Union[str, bool]:
method compare_adjs (line 2495) | def compare_adjs(self, word1: str, word2: str) -> Union[str, bool]:
method singular_noun (line 2510) | def singular_noun(
method _plequal (line 2551) | def _plequal(self, word1: str, word2: str, pl) -> Union[str, bool]: #...
method _pl_reg_plurals (line 2577) | def _pl_reg_plurals(self, pair: str, stems: str, end1: str, end2: str)...
method _pl_check_plurals_N (line 2581) | def _pl_check_plurals_N(self, word1: str, word2: str) -> bool:
method _pl_check_plurals_adj (line 2614) | def _pl_check_plurals_adj(self, word1: str, word2: str) -> bool:
method get_count (line 2627) | def get_count(self, count: Optional[Union[str, int]] = None) -> Union[...
method _plnoun (line 2648) | def _plnoun( # noqa: C901
method _handle_prepositional_phrase (line 2940) | def _handle_prepositional_phrase(cls, phrase, transform, sep):
method _find_pivot (line 2966) | def _find_pivot(words, candidates):
method _pl_special_verb (line 2975) | def _pl_special_verb( # noqa: C901
method _pl_general_verb (line 3057) | def _pl_general_verb(
method _pl_special_adjective (line 3081) | def _pl_special_adjective(
method _sinoun (line 3118) | def _sinoun( # noqa: C901
method a (line 3445) | def a(self, text: str, count: int = 1) -> str:
method _indef_article (line 3470) | def _indef_article(self, word: str, count: int) -> str: # noqa: C901
method no (line 3521) | def no(self, text: str, count: Optional[Union[int, str]] = None) -> str:
method present_participle (line 3558) | def present_participle(self, word: str) -> str:
method ordinal (line 3576) | def ordinal(self, num: Union[int, str]) -> str: # noqa: C901
method millfn (line 3617) | def millfn(self, ind: int = 0) -> str:
method unitfn (line 3623) | def unitfn(self, units: int, mindex: int = 0) -> str:
method tenfn (line 3626) | def tenfn(self, tens, units, mindex=0) -> str:
method hundfn (line 3638) | def hundfn(self, hundreds: int, tens: int, units: int, mindex: int) ->...
method group1sub (line 3650) | def group1sub(self, mo: Match) -> str:
method group1bsub (line 3659) | def group1bsub(self, mo: Match) -> str:
method group2sub (line 3666) | def group2sub(self, mo: Match) -> str:
method group3sub (line 3675) | def group3sub(self, mo: Match) -> str:
method hundsub (line 3693) | def hundsub(self, mo: Match) -> str:
method tensub (line 3700) | def tensub(self, mo: Match) -> str:
method unitsub (line 3703) | def unitsub(self, mo: Match) -> str:
method enword (line 3706) | def enword(self, num: str, group: int) -> str:
method number_to_words (line 3735) | def number_to_words( # noqa: C901
method join (line 3886) | def join(
FILE: src/bids/layout/db.py
function get_database_file (line 15) | def get_database_file(path): # noqa: D103
class ConnectionManager (line 25) | class ConnectionManager: # noqa: D101
method __init__ (line 26) | def __init__(self, database_path=None, reset_database=False, config=No...
method _get_engine (line 45) | def _get_engine(self, database_file):
method exists (line 99) | def exists(cls, database_path): # noqa: D102
method reset_database (line 102) | def reset_database(self, init_args, config): # noqa: D102
method save_database (line 114) | def save_database(self, database_path, replace_connection=True):
method session (line 149) | def session(self): # noqa: D102
method layout_info (line 156) | def layout_info(self): # noqa: D102
method reset_session (line 159) | def reset_session(self):
FILE: src/bids/layout/index.py
function _regexfy (line 18) | def _regexfy(patt, root=None):
function _extract_entities (line 30) | def _extract_entities(bidsfile, entities):
function _check_path_matches_patterns (line 41) | def _check_path_matches_patterns(path, patterns, root=None):
function _validate_path (line 62) | def _validate_path(path, incl_patt=None, excl_patt=None, root=None):
class BIDSLayoutIndexer (line 70) | class BIDSLayoutIndexer:
method __init__ (line 111) | def __init__(
method __call__ (line 136) | def __call__(self, layout): # noqa: D102
method session (line 160) | def session(self): # noqa: D102
method _validate_file (line 163) | def _validate_file(self, f):
method _index_dir (line 188) | def _index_dir(self, path, config, force=None):
method _index_file (line 269) | def _index_file(self, abs_fn, entities):
method _index_metadata (line 289) | def _index_metadata(self):
function _resolve_intent (line 531) | def _resolve_intent(intent: str, root: Path, subject: str) -> str | None:
FILE: src/bids/layout/layout.py
function call (line 39) | def call(func, *args, **kwargs):
class Sentinel (line 46) | class Sentinel:
method __repr__ (line 47) | def __repr__(self):
class RemovedOption (line 52) | class RemovedOption(Sentinel):
class BIDSLayout (line 56) | class BIDSLayout:
method __init__ (line 116) | def __init__(
method root (line 220) | def root(self): # noqa: D102
method __getattr__ (line 223) | def __getattr__(self, key):
method __repr__ (line 246) | def __repr__(self):
method _in_scope (line 280) | def _in_scope(self, scope):
method _get_layouts_in_scope (line 306) | def _get_layouts_in_scope(self, scope):
method _sanitize_query_dtypes (line 320) | def _sanitize_query_dtypes(self, entities):
method session (line 342) | def session(self): # noqa: D102
method config (line 347) | def config(self): # noqa: D102
method entities (line 351) | def entities(self):
method files (line 356) | def files(self):
method load (line 361) | def load(cls, database_path):
method save (line 375) | def save(self, database_path, replace_connection=True):
method get_entities (line 409) | def get_entities(self, scope='all', metadata=None):
method _find_directories_for_entity_using_schema (line 444) | def _find_directories_for_entity_using_schema(self, entity_name, resul...
method _build_path_from_schema_rules (line 468) | def _build_path_from_schema_rules(self, entities, directory_rules):
method get_files (line 528) | def get_files(self, scope='all'):
method clone (line 553) | def clone(self):
method parse_file_entities (line 557) | def parse_file_entities(
method _get_derivative_dirs (line 598) | def _get_derivative_dirs(self, paths):
method add_derivatives (line 610) | def add_derivatives(self, path, parent_database_path=None, **kwargs):
method to_df (line 666) | def to_df(self, metadata=False, **filters):
method get (line 715) | def get( # noqa: D417
method get_file (line 915) | def get_file(self, filename, scope='all'):
method _build_file_query (line 941) | def _build_file_query(self, **kwargs):
method get_collections (line 1012) | def get_collections(
method get_metadata (line 1068) | def get_metadata(self, path, include_entities=False, scope='all'):
method get_dataset_description (line 1113) | def get_dataset_description(self, scope='self', all_=False):
method get_nearest (line 1140) | def get_nearest( # noqa: D417
method get_bvec (line 1250) | def get_bvec(self, path, **kwargs):
method get_bval (line 1255) | def get_bval(self, path, **kwargs):
method get_fieldmap (line 1260) | def get_fieldmap(self, path, return_list=False):
method _get_fieldmaps (line 1281) | def _get_fieldmaps(self, path):
method get_tr (line 1322) | def get_tr(self, derivatives=False, **filters):
method build_path (line 1360) | def build_path(
method copy_files (line 1457) | def copy_files(
method write_to_file (line 1504) | def write_to_file( # noqa: D417
class Query (line 1572) | class Query(enum.Enum):
FILE: src/bids/layout/models.py
class LayoutInfo (line 34) | class LayoutInfo(Base):
method __init__ (line 44) | def __init__(self, **kwargs):
method _init_on_load (line 59) | def _init_on_load(self):
method _sanitize_init_args (line 70) | def _sanitize_init_args(self, kwargs):
method __repr__ (line 95) | def __repr__(self):
class Config (line 99) | class Config(Base):
method __init__ (line 128) | def __init__(self, name, entities=None, default_path_patterns=None, se...
method _init_on_load (line 146) | def _init_on_load(self):
method load (line 150) | def load(cls, config, session=None):
method _from_schema (line 201) | def _from_schema(cls, schema_version=None, session=None):
method _extract_entity_names_from_rules (line 280) | def _extract_entity_names_from_rules(cls, bids_schema):
method _create_entities_from_schema (line 305) | def _create_entities_from_schema(cls, entity_names, entity_values, bid...
method _extract_entity_values_from_rules (line 367) | def _extract_entity_values_from_rules(cls, bids_schema, entity_names):
method __repr__ (line 396) | def __repr__(self):
class BIDSFile (line 400) | class BIDSFile(Base):
method __init__ (line 428) | def __init__(self, filename):
method _path (line 435) | def _path(self):
method _dirname (line 439) | def _dirname(self):
method __repr__ (line 442) | def __repr__(self):
method __fspath__ (line 445) | def __fspath__(self):
method relpath (line 450) | def relpath(self):
method get_associations (line 455) | def get_associations(self, kind=None, include_parents=False):
method get_metadata (line 503) | def get_metadata(self):
method get_entities (line 509) | def get_entities(self, metadata=False, values='tags'):
method copy (line 548) | def copy(self, path_patterns, symbolic_link=False, root=None, conflict...
class BIDSDataFile (line 594) | class BIDSDataFile(BIDSFile):
method get_df (line 603) | def get_df(self, include_timing=True, adjust_onset=False, enforce_dtyp...
class BIDSImageFile (line 662) | class BIDSImageFile(BIDSFile):
method get_image (line 671) | def get_image(self, **kwargs):
class BIDSJSONFile (line 686) | class BIDSJSONFile(BIDSFile):
method get_dict (line 695) | def get_dict(self):
method get_json (line 705) | def get_json(self):
class Entity (line 711) | class Entity(Base):
method __init__ (line 744) | def __init__(self, name, pattern=None, mandatory=False, directory=None...
method __repr__ (line 756) | def __repr__(self):
method _init_on_load (line 760) | def _init_on_load(self):
method __iter__ (line 771) | def __iter__(self):
method __deepcopy__ (line 774) | def __deepcopy__(self, memo):
method match_file (line 792) | def match_file(self, f):
method unique (line 812) | def unique(self):
method count (line 816) | def count(self, files=False):
method _astype (line 833) | def _astype(self, val):
class Tag (line 848) | class Tag(Base):
method __init__ (line 889) | def __init__(self, file, entity, value, dtype=None, is_metadata=False):
method __repr__ (line 904) | def __repr__(self):
method _init_on_load (line 909) | def _init_on_load(self):
function _create_tag_dict (line 921) | def _create_tag_dict(file, entity, value, dtype=None, is_metadata=False):
class FileAssociation (line 950) | class FileAssociation(Base): # noqa: D101
class DerivativeDatasets (line 967) | class DerivativeDatasets(UserDict): # noqa: D101
method __getitem__ (line 968) | def __getitem__(self, key):
method get_pipeline (line 991) | def get_pipeline(self, pipeline): # noqa: D102
FILE: src/bids/layout/tests/conftest.py
function layout_7t_trt (line 11) | def layout_7t_trt(tests_dir):
function layout_ds005 (line 16) | def layout_ds005(tests_dir):
function layout_ds005_no_validate (line 21) | def layout_ds005_no_validate(tests_dir):
function layout_ds117 (line 26) | def layout_ds117(tests_dir):
function layout_ds005_derivs (line 31) | def layout_ds005_derivs(tests_dir):
function layout_ds005_deriv_dummy_vxxx (line 40) | def layout_ds005_deriv_dummy_vxxx(tests_dir):
function layout_ds005_deriv_both_dummies (line 49) | def layout_ds005_deriv_both_dummies(tests_dir):
function db_dir (line 59) | def db_dir(tmpdir_factory):
function layout_ds005_multi_derivs (line 65) | def layout_ds005_multi_derivs(tests_dir, request, db_dir):
function layout_ds005_deriv_name_collision (line 77) | def layout_ds005_deriv_name_collision(tests_dir, request):
function layout_synthetic (line 88) | def layout_synthetic(tests_dir, request, db_dir):
function layout_synthetic_nodb (line 95) | def layout_synthetic_nodb(tests_dir, request, db_dir):
function temporary_dataset (line 101) | def temporary_dataset(tmp_path, tests_dir):
FILE: src/bids/layout/tests/test_db.py
function test_get_database_file (line 7) | def test_get_database_file(tmp_path):
FILE: src/bids/layout/tests/test_layout.py
function test_layout_init (line 28) | def test_layout_init(layout_7t_trt):
function test_index_metadata (line 44) | def test_index_metadata(tests_dir, index_metadata, filters, result, mock...
function test_config_filename (line 58) | def test_config_filename(tests_dir, config_type):
function test_layout_repr (line 66) | def test_layout_repr(layout_7t_trt):
function test_invalid_dataset_description (line 70) | def test_invalid_dataset_description(tests_dir, tmp_path):
function test_layout_repr_overshadow_run (line 79) | def test_layout_repr_overshadow_run(tests_dir, tmp_path):
function test_load_description (line 103) | def test_load_description(layout_7t_trt):
function test_get_file (line 110) | def test_get_file(layout_ds005_derivs):
class TestDerivativeAsRoot (line 149) | class TestDerivativeAsRoot:
method test_dataset_without_datasettype_parsed_as_raw (line 150) | def test_dataset_without_datasettype_parsed_as_raw(self, tests_dir):
method test_derivative_indexing_forced_with_is_derivative (line 160) | def test_derivative_indexing_forced_with_is_derivative(self, tests_dir):
method test_forced_derivative_indexing_fails_validation (line 169) | def test_forced_derivative_indexing_fails_validation(self, tests_dir):
method test_dataset_missing_generatedby_fails_validation (line 177) | def test_dataset_missing_generatedby_fails_validation(self, tests_dir):
method test_correctly_formatted_derivative_loads_as_derivative (line 183) | def test_correctly_formatted_derivative_loads_as_derivative(self, test...
method test_derivative_datasets_load_with_no_validation (line 195) | def test_derivative_datasets_load_with_no_validation(self, tests_dir, ...
function test_get_metadata (line 201) | def test_get_metadata(layout_7t_trt):
function test_get_metadata2 (line 208) | def test_get_metadata2(layout_7t_trt):
function test_get_metadata3 (line 215) | def test_get_metadata3(layout_7t_trt):
function test_get_metadata4 (line 227) | def test_get_metadata4(layout_ds005):
function test_get_metadata_error2 (line 234) | def test_get_metadata_error2(layout_7t_trt):
function test_get_metadata_meg (line 250) | def test_get_metadata_meg(layout_ds117):
function test_get_metadata5 (line 269) | def test_get_metadata5(layout_7t_trt):
function test_get_metadata_via_bidsfile (line 278) | def test_get_metadata_via_bidsfile(layout_7t_trt):
function test_metadata_equivalence (line 289) | def test_metadata_equivalence(layout_7t_trt):
function test_get_metadata_error (line 315) | def test_get_metadata_error(layout_7t_trt):
function test_get_with_bad_target (line 331) | def test_get_with_bad_target(layout_7t_trt):
function test_get_bvals_bvecs (line 342) | def test_get_bvals_bvecs(layout_ds005):
function test_get_subjects (line 351) | def test_get_subjects(layout_7t_trt):
function test_get_fieldmap (line 357) | def test_get_fieldmap(layout_7t_trt):
function test_get_fieldmap2 (line 365) | def test_get_fieldmap2(layout_7t_trt):
function test_bids_json (line 373) | def test_bids_json(layout_7t_trt):
function test_get_return_type_dir (line 380) | def test_get_return_type_dir(layout_7t_trt):
function test_get_val_none (line 390) | def test_get_val_none(layout_7t_trt, acq):
function test_get_val_enum_any (line 400) | def test_get_val_enum_any(layout_7t_trt):
function test_get_val_enum_any_optional (line 411) | def test_get_val_enum_any_optional(layout_7t_trt, layout_ds005):
function test_get_return_sorted (line 428) | def test_get_return_sorted(layout_7t_trt):
function test_ignore_files (line 437) | def test_ignore_files(tests_dir, layout_ds005):
function test_force_index (line 455) | def test_force_index(tests_dir, layout_ds005):
function test_nested_include_exclude (line 467) | def test_nested_include_exclude(tests_dir):
function test_nested_include_exclude_with_regex (line 579) | def test_nested_include_exclude_with_regex(tests_dir):
function test_layout_with_derivs (line 639) | def test_layout_with_derivs(tests_dir, layout_ds005_derivs):
function test_accessing_deriv_by_pipeline_name_is_deprecated (line 653) | def test_accessing_deriv_by_pipeline_name_is_deprecated(layout_ds005_der...
function test_cant_access_nonexistant_deriv_by_key (line 660) | def test_cant_access_nonexistant_deriv_by_key(layout_ds005_deriv_dummy_v...
function test_accessing_deriv_by_pipeline_name_via_method (line 665) | def test_accessing_deriv_by_pipeline_name_via_method(layout_ds005_deriv_...
function test_cant_get_nonexistant_deriv_via_method (line 671) | def test_cant_get_nonexistant_deriv_via_method(layout_ds005_deriv_dummy_...
function test_cant_get_deriv_with_duplicate_pipeline_via_method (line 676) | def test_cant_get_deriv_with_duplicate_pipeline_via_method(layout_ds005_...
function test_layout_with_multi_derivs (line 681) | def test_layout_with_multi_derivs(tests_dir, layout_ds005_multi_derivs):
function test_layout_with_conflicting_deriv_folders (line 697) | def test_layout_with_conflicting_deriv_folders(tests_dir):
function test_query_derivatives (line 705) | def test_query_derivatives(layout_ds005_derivs):
function test_restricted_words_in_path (line 724) | def test_restricted_words_in_path(tests_dir, tmpdir):
function test_derivative_getters (line 738) | def test_derivative_getters(tests_dir):
function test_get_tr (line 746) | def test_get_tr(layout_7t_trt):
function test_get_nonhashable_metadata (line 765) | def test_get_nonhashable_metadata(layout_ds117):
function test_to_df (line 785) | def test_to_df(layout_ds117):
function test_parse_file_entities_from_layout (line 815) | def test_parse_file_entities_from_layout(layout_synthetic):
function test_deriv_indexing (line 851) | def test_deriv_indexing(tests_dir):
function test_path_arguments (line 867) | def test_path_arguments(tests_dir):
function test_layout_in_scope (line 882) | def test_layout_in_scope(layout_ds005, layout_ds005_derivs):
function test_get_layouts_in_scope (line 895) | def test_get_layouts_in_scope(layout_ds005_multi_derivs):
function test_get_dataset_description (line 907) | def test_get_dataset_description(layout_ds005_multi_derivs):
function test_indexed_file_associations (line 919) | def test_indexed_file_associations(layout_7t_trt):
function test_layout_save (line 951) | def test_layout_save(tests_dir, tmp_path, layout_7t_trt):
function test_indexing_tag_conflict (line 960) | def test_indexing_tag_conflict(tests_dir):
function test_get_with_wrong_dtypes (line 968) | def test_get_with_wrong_dtypes(layout_7t_trt):
function test_get_with_regex_search (line 982) | def test_get_with_regex_search(layout_7t_trt):
function test_get_with_regex_search_bad_dtype (line 1013) | def test_get_with_regex_search_bad_dtype(layout_7t_trt):
function test_get_with_invalid_filters (line 1031) | def test_get_with_invalid_filters(layout_ds005):
function test_get_with_query_constants_in_match_list (line 1055) | def test_get_with_query_constants_in_match_list(layout_ds005):
function test_get_non_run_entity_with_query_constants_in_match_list (line 1068) | def test_get_non_run_entity_with_query_constants_in_match_list(layout_ds...
function test_query_constants_work_on_extension (line 1081) | def test_query_constants_work_on_extension(layout_ds005_no_validate):
function test_load_layout (line 1093) | def test_load_layout(layout_synthetic_nodb, db_dir):
function test_load_layout_config_not_overwritten (line 1106) | def test_load_layout_config_not_overwritten(layout_synthetic_nodb, tmpdir):
function test_padded_run_roundtrip (line 1134) | def test_padded_run_roundtrip(layout_ds005):
function test_indexer_patterns (line 1155) | def test_indexer_patterns(fname):
function test_symlinks_in_path (line 1191) | def test_symlinks_in_path(tests_dir, tmp_path):
function test_ignore_dotfiles (line 1209) | def test_ignore_dotfiles(temporary_dataset):
function test_empty_directory (line 1234) | def test_empty_directory(temporary_dataset):
function test_intended_for (line 1256) | def test_intended_for(temporary_dataset, intent):
function test_get_return_type_dir_with_schema_datatype (line 1270) | def test_get_return_type_dir_with_schema_datatype(layout_7t_trt):
function test_get_return_type_dir_with_legacy_config_no_template (line 1286) | def test_get_return_type_dir_with_legacy_config_no_template():
function test_bids_sort (line 1327) | def test_bids_sort(layout_7t_trt):
FILE: src/bids/layout/tests/test_layout_on_examples.py
function test_layout_on_examples_with_derivatives (line 32) | def test_layout_on_examples_with_derivatives(dataset, nb_files, bids_exa...
function test_layout_on_examples_no_derivatives (line 67) | def test_layout_on_examples_no_derivatives(dataset, nb_files, bids_examp...
FILE: src/bids/layout/tests/test_models.py
function create_session (line 29) | def create_session():
function sample_bidsfile (line 37) | def sample_bidsfile(tmpdir):
function subject_entity (line 45) | def subject_entity():
function test_layoutinfo_init (line 55) | def test_layoutinfo_init():
function test_entity_initialization (line 73) | def test_entity_initialization():
function test_entity_init_all_args (line 82) | def test_entity_init_all_args(subject_entity):
function test_entity_init_with_bad_dtype (line 90) | def test_entity_init_with_bad_dtype():
function test_entity_matches (line 96) | def test_entity_matches(tmpdir):
function test_entity_deepcopy (line 105) | def test_entity_deepcopy(subject_entity):
function test_file_associations (line 113) | def test_file_associations():
function test_tag_init (line 135) | def test_tag_init(sample_bidsfile, subject_entity):
function test_tag_dtype (line 142) | def test_tag_dtype(sample_bidsfile, subject_entity):
function test_entity_add_file (line 157) | def test_entity_add_file(sample_bidsfile):
function test_config_init_with_args (line 167) | def test_config_init_with_args():
function test_load_existing_config (line 181) | def test_load_existing_config():
function test_bidsfile_get_df_from_tsv_gz (line 203) | def test_bidsfile_get_df_from_tsv_gz(layout_synthetic):
function test_bidsdatafile_enforces_dtype (line 221) | def test_bidsdatafile_enforces_dtype(layout_synthetic):
function test_bidsimagefile_get_image (line 233) | def test_bidsimagefile_get_image():
function test_bidsjsonfile (line 242) | def test_bidsjsonfile(layout_synthetic):
function test_bidsfile_get_metadata (line 253) | def test_bidsfile_get_metadata(layout_synthetic):
function test_bidsfile_get_entities (line 259) | def test_bidsfile_get_entities(layout_synthetic):
function test_bidsfile_relpath (line 288) | def test_bidsfile_relpath(layout_synthetic):
function test_bidsfile_fspath (line 296) | def test_bidsfile_fspath(sample_bidsfile):
FILE: src/bids/layout/tests/test_path_building.py
function layout (line 13) | def layout():
function test_path_building_pet (line 18) | def test_path_building_pet(layout):
function test_bold_construction (line 29) | def test_bold_construction(layout):
function test_invalid_file_construction (line 39) | def test_invalid_file_construction(layout):
function test_failed_file_construction (line 49) | def test_failed_file_construction(layout):
function test_insufficient_entities (line 57) | def test_insufficient_entities(layout, strict, validate):
function test_path_building_on_derivative_examples (line 84) | def test_path_building_on_derivative_examples(dataset, bids_examples):
function test_path_building_in_raw_scope (line 133) | def test_path_building_in_raw_scope(dataset, bids_examples):
function test_path_building_on_examples_with_meg_ds_folder (line 144) | def test_path_building_on_examples_with_meg_ds_folder(dataset, scope, bi...
FILE: src/bids/layout/tests/test_remote_bids.py
function test_layout_on_s3_datasets_no_derivatives (line 23) | def test_layout_on_s3_datasets_no_derivatives(dataset, nb_files):
FILE: src/bids/layout/tests/test_rootpath.py
function test_strroot_pos (line 19) | def test_strroot_pos():
function test_strroot_neg (line 23) | def test_strroot_neg():
function test_pathroot_pos (line 28) | def test_pathroot_pos():
function test_pathroot_neg (line 32) | def test_pathroot_neg():
FILE: src/bids/layout/tests/test_schema_config.py
class TestSchemaConfig (line 8) | class TestSchemaConfig:
method test_load_bids_schema_basic (line 11) | def test_load_bids_schema_basic(self):
method test_schema_entity_patterns (line 28) | def test_schema_entity_patterns(self):
method test_schema_version_tracking (line 50) | def test_schema_version_tracking(self):
method test_schema_version_parameter (line 60) | def test_schema_version_parameter(self):
method test_invalid_schema_version (line 70) | def test_invalid_schema_version(self):
method test_entity_generation (line 76) | def test_entity_generation(self):
method test_schema_directory_query (line 115) | def test_schema_directory_query(self):
FILE: src/bids/layout/tests/test_schema_pattern_validation.py
class TestSchemaAccuracy (line 8) | class TestSchemaAccuracy:
method test_extension_patterns_match_schema (line 11) | def test_extension_patterns_match_schema(self):
method test_suffix_patterns_match_schema (line 64) | def test_suffix_patterns_match_schema(self):
method test_datatype_patterns_match_schema (line 116) | def test_datatype_patterns_match_schema(self):
method test_entity_format_patterns_match_schema (line 157) | def test_entity_format_patterns_match_schema(self):
method test_no_hardcoded_values (line 184) | def test_no_hardcoded_values(self):
FILE: src/bids/layout/tests/test_schema_version_differences.py
class TestSchemaVersionDifferences (line 11) | class TestSchemaVersionDifferences:
method test_entity_parsing_version_differences (line 14) | def test_entity_parsing_version_differences(self):
method test_motion_datatype_evolution (line 46) | def test_motion_datatype_evolution(self):
method test_schema_version_metadata_differences (line 81) | def test_schema_version_metadata_differences(self):
FILE: src/bids/layout/tests/test_schema_vs_json_config.py
class TestConfigCompatibility (line 8) | class TestConfigCompatibility:
method test_core_entities_present_in_both_configs (line 11) | def test_core_entities_present_in_both_configs(self):
method test_schema_entities_are_superset_of_valid_old_entities (line 25) | def test_schema_entities_are_superset_of_valid_old_entities(self):
method test_new_suffixes_compatible_with_old_pattern (line 48) | def test_new_suffixes_compatible_with_old_pattern(self):
method test_new_extensions_compatible_with_old_pattern (line 68) | def test_new_extensions_compatible_with_old_pattern(self):
method test_datatype_coverage_matches (line 107) | def test_datatype_coverage_matches(self):
method test_functional_filename_parsing_compatibility (line 140) | def test_functional_filename_parsing_compatibility(self):
method test_new_config_parses_schema_compliant_filenames (line 182) | def test_new_config_parses_schema_compliant_filenames(self):
method test_pattern_structure_similarity (line 208) | def test_pattern_structure_similarity(self):
method test_config_names_and_metadata (line 232) | def test_config_names_and_metadata(self):
method _extract_suffixes_from_pattern (line 253) | def _extract_suffixes_from_pattern(self, pattern):
method _extract_extensions_from_pattern (line 267) | def _extract_extensions_from_pattern(self, pattern):
method _extract_datatypes_from_pattern (line 289) | def _extract_datatypes_from_pattern(self, pattern):
method _parse_filename_entities (line 303) | def _parse_filename_entities(self, filename, config):
method _map_entity_name_old_to_new (line 315) | def _map_entity_name_old_to_new(self, new_entity_name):
FILE: src/bids/layout/tests/test_utils.py
function test_bidsmetadata_class (line 16) | def test_bidsmetadata_class():
function test_parse_file_entities (line 25) | def test_parse_file_entities(mock_config):
function test_parse_degenerate_files (line 73) | def test_parse_degenerate_files(mock_config, filename, target):
function test_add_config_paths (line 77) | def test_add_config_paths():
function test_PaddedInt_array_comparisons (line 91) | def test_PaddedInt_array_comparisons():
function test_PaddedInt_dataframe_behavior (line 108) | def test_PaddedInt_dataframe_behavior():
FILE: src/bids/layout/tests/test_validation.py
function testvalidator (line 14) | def testvalidator():
function test_layout_with_validation (line 18) | def test_layout_with_validation():
FILE: src/bids/layout/tests/test_writing.py
function writable_file (line 18) | def writable_file(tmpdir):
function tmp_bids (line 39) | def tmp_bids(tmpdir_factory):
function layout (line 51) | def layout(tmp_bids):
class TestWritableFile (line 59) | class TestWritableFile:
method test_parse_pattern_re (line 60) | def test_parse_pattern_re(self):
method test_build_path (line 104) | def test_build_path(self, writable_file):
method test_strict_build_path (line 199) | def test_strict_build_path(self):
method test_build_file (line 207) | def test_build_file(self, writable_file, tmp_bids, caplog):
class TestWritableLayout (line 251) | class TestWritableLayout:
method test_write_files (line 252) | def test_write_files(self, tmp_bids, layout):
method test_write_to_file (line 290) | def test_write_to_file(self, tmp_bids, layout):
method test_write_to_file_defaults (line 302) | def test_write_to_file_defaults(self, tmp_bids, layout):
method test_build_file_from_layout (line 327) | def test_build_file_from_layout(self, tmpdir, layout):
FILE: src/bids/layout/utils.py
class BIDSMetadata (line 10) | class BIDSMetadata(dict):
method __init__ (line 13) | def __init__(self, source_file):
method __getitem__ (line 17) | def __getitem__(self, key):
class PaddedInt (line 24) | class PaddedInt(int):
method __init__ (line 66) | def __init__(self, val):
method __eq__ (line 69) | def __eq__(self, val):
method __str__ (line 78) | def __str__(self):
method __repr__ (line 81) | def __repr__(self):
method __format__ (line 84) | def __format__(self, format_spec):
method __hash__ (line 95) | def __hash__(self):
function parse_file_entities (line 99) | def parse_file_entities(filename, entities=None, config=None, include_un...
function add_config_paths (line 152) | def add_config_paths(**kwargs):
FILE: src/bids/layout/validation.py
function validate_root (line 40) | def validate_root(root, validate): # noqa: D103
function validate_derivative_path (line 97) | def validate_derivative_path(path, **kwargs): # noqa: D103
function _sort_patterns (line 127) | def _sort_patterns(patterns, root):
function validate_indexing_args (line 141) | def validate_indexing_args(ignore, force_index, root): # noqa: D103
FILE: src/bids/layout/writing.py
function build_path (line 19) | def build_path(entities, path_patterns, strict=False):
function write_to_file (line 205) | def write_to_file(
function _expand_options (line 299) | def _expand_options(value):
function _expand_entities (line 319) | def _expand_entities(entities):
FILE: src/bids/modeling/auto_model.py
function _make_passthrough_contrast (line 8) | def _make_passthrough_contrast(level, model_type='glm', test='t'):
function auto_model (line 22) | def auto_model(layout, scan_length=None, one_vs_rest=False):
FILE: src/bids/modeling/hrf.py
function _gamma_difference_hrf (line 14) | def _gamma_difference_hrf(
function spm_hrf (line 66) | def spm_hrf(tr, oversampling=50, time_length=32.0, onset=0.0):
function glover_hrf (line 89) | def glover_hrf(tr, oversampling=50, time_length=32.0, onset=0.0):
function spm_time_derivative (line 122) | def spm_time_derivative(tr, oversampling=50, time_length=32.0, onset=0.0):
function glover_time_derivative (line 154) | def glover_time_derivative(tr, oversampling=50, time_length=32.0, onset=...
function spm_dispersion_derivative (line 186) | def spm_dispersion_derivative(tr, oversampling=50, time_length=32.0, ons...
function glover_dispersion_derivative (line 218) | def glover_dispersion_derivative(tr, oversampling=50, time_length=32.0, ...
function _sample_condition (line 268) | def _sample_condition(exp_condition, frame_times, oversampling=50, min_o...
function _resample_regressor (line 341) | def _resample_regressor(hr_regressor, hr_frame_times, frame_times):
function _orthogonalize (line 365) | def _orthogonalize(X):
function _regressor_names (line 393) | def _regressor_names(con_name, hrf_model, fir_delays=None):
function _hrf_kernel (line 421) | def _hrf_kernel(hrf_model, tr, oversampling=50, fir_delays=None):
function compute_regressor (line 483) | def compute_regressor(
FILE: src/bids/modeling/model_spec.py
class ModelSpec (line 10) | class ModelSpec(metaclass=ABCMeta):
method from_df (line 14) | def from_df(self, df, model, metadata=None):
class GLMMSpec (line 19) | class GLMMSpec(ModelSpec):
method __init__ (line 56) | def __init__(
method __repr__ (line 83) | def __repr__(self):
method set_priors (line 86) | def set_priors(self, fixed=None, random=None): # noqa: D102
method build_fixed_terms (line 89) | def build_fixed_terms(self, X):
method build_variance_components (line 107) | def build_variance_components(self, Z, groups=None, sigma=None, names=...
method add_term (line 144) | def add_term(self, term):
method X (line 158) | def X(self):
method Z (line 166) | def Z(self):
method fixed_terms (line 177) | def fixed_terms(self):
method variance_components (line 182) | def variance_components(self):
method from_df (line 187) | def from_df(cls, df, model, metadata=None, formula=None):
class MetaAnalysisSpec (line 268) | class MetaAnalysisSpec(GLMMSpec): # noqa: D101
class Term (line 272) | class Term:
method __init__ (line 290) | def __init__(self, name, values, categorical=False, prior=None, metada...
class VarComp (line 298) | class VarComp(Term):
method __init__ (line 317) | def __init__(self, name, values, prior=None, metadata=None):
method dummies_to_vec (line 322) | def dummies_to_vec(dummies):
class Prior (line 344) | class Prior:
method __init__ (line 363) | def __init__(self, name, **kwargs):
FILE: src/bids/modeling/report/base.py
function _build_node_dict (line 17) | def _build_node_dict(node, all_entities):
function _build_report_dict (line 78) | def _build_report_dict(graph):
function _write_report (line 105) | def _write_report(report_dict, out_dir, template_path=None):
function generate_report (line 133) | def generate_report(model, dataset_path, derivatives, output_dir, scan_l...
FILE: src/bids/modeling/report/utils.py
function node_report (line 9) | def node_report(node_output):
function est_vif (line 32) | def est_vif(desmat): # noqa: D417
function get_eff_reg_vif (line 60) | def get_eff_reg_vif(desmat, contrast_def): # noqa: D417
function generate_contrast_matrix (line 104) | def generate_contrast_matrix(contrasts, cols): # noqa: D417
function get_all_contrast_vif (line 128) | def get_all_contrast_vif(node_output): # noqa: D417
function deroot (line 152) | def deroot(val, root): # noqa: D103
function snake_to_camel (line 167) | def snake_to_camel(string): # noqa: D103
function displayify (line 172) | def displayify(contrast_name): # noqa: D103
function to_alphanum (line 178) | def to_alphanum(string):
FILE: src/bids/modeling/report/viz.py
function plot_corr_matrix (line 5) | def plot_corr_matrix(dm_wide): # noqa: D103
function melt_dm (line 38) | def melt_dm(dm): # noqa: D103
function plot_design_matrix (line 43) | def plot_design_matrix(dm_wide, scale=False, timecourse=True): # noqa: ...
FILE: src/bids/modeling/statsmodels.py
function validate_model (line 23) | def validate_model(model, *, stacklevel=2): # noqa: D417
class BIDSStatsModelsGraph (line 95) | class BIDSStatsModelsGraph:
method __init__ (line 110) | def __init__(self, layout, model):
method __repr__ (line 119) | def __repr__(self):
method __getitem__ (line 122) | def __getitem__(self, key):
method root_node (line 127) | def root_node(self):
method _load_model (line 132) | def _load_model(model, validate=True):
method _load_nodes (line 144) | def _load_nodes(model):
method _load_edges (line 152) | def _load_edges(model, nodes):
method get_node (line 174) | def get_node(self, name):
method load_collections (line 192) | def load_collections(self, nodes=None, drop_na=False, **kwargs): # no...
method write_graph (line 225) | def write_graph(self, dotfilename='graph.dot', format='png', pipe=Fals...
method run_graph (line 256) | def run_graph(self, entities=None, **kwargs):
function _run_node_recursive (line 274) | def _run_node_recursive(node, inputs=None, filters=None, **kwargs):
class BIDSStatsModelsNode (line 293) | class BIDSStatsModelsNode:
method __init__ (line 328) | def __init__(
method __repr__ (line 367) | def __repr__(self):
method _build_groups (line 371) | def _build_groups(objects, group_by):
method run (line 467) | def run(
method add_child (line 584) | def add_child(self, edge):
method add_parent (line 595) | def add_parent(self, edge):
method add_collections (line 606) | def add_collections(self, collections):
method get_collections (line 623) | def get_collections(self, **filters):
function expand_wildcards (line 646) | def expand_wildcards(selectors, pool): # noqa: D103
class BIDSStatsModelsNodeOutput (line 655) | class BIDSStatsModelsNodeOutput:
method __init__ (line 706) | def __init__(
method _collections_to_dfs (line 826) | def _collections_to_dfs(self, collections, *, collection_history=False):
method _inputs_to_df (line 885) | def _inputs_to_df(self, inputs):
method _build_contrasts (line 892) | def _build_contrasts(self, unique_in_contrast=None):
method X (line 979) | def X(self):
method __repr__ (line 983) | def __repr__(self):
FILE: src/bids/modeling/tests/test_automodel.py
function model (line 13) | def model():
function test_automodel_valid (line 22) | def test_automodel_valid(model):
function test_automodel_runs (line 30) | def test_automodel_runs(model):
function test_auto_model_graph (line 48) | def test_auto_model_graph(model):
FILE: src/bids/modeling/tests/test_hrf.py
function test_duplicate_onsets (line 6) | def test_duplicate_onsets():
FILE: src/bids/modeling/tests/test_model_spec.py
function collection (line 14) | def collection():
function test_df_to_model_spec (line 26) | def test_df_to_model_spec(collection):
function test_glmmspec_empty_init (line 45) | def test_glmmspec_empty_init():
function test_fixed_term_init (line 55) | def test_fixed_term_init():
function test_var_comp_init (line 62) | def test_var_comp_init():
FILE: src/bids/modeling/tests/test_statsmodels.py
function graph (line 22) | def graph():
function graph_intercept (line 32) | def graph_intercept():
function graph_nodummy (line 42) | def graph_nodummy():
function test_load_collections_types (line 51) | def test_load_collections_types(graph):
function test_write_graph (line 60) | def test_write_graph(graph, tmp_path):
function test_repr (line 69) | def test_repr(graph):
function test_manual_intercept (line 82) | def test_manual_intercept(graph_intercept):
function test_first_level_sparse_design_matrix (line 101) | def test_first_level_sparse_design_matrix(graph):
function test_incremental_data_loading (line 120) | def test_incremental_data_loading():
function test_step_get_collections (line 130) | def test_step_get_collections(graph):
function test_contrast_info (line 136) | def test_contrast_info(graph):
function test_contrast_dummy_vs_explicit (line 152) | def test_contrast_dummy_vs_explicit(graph, graph_nodummy):
function test_get_run_level_model_spec (line 181) | def test_get_run_level_model_spec(graph):
function test_entire_graph_smoketest (line 193) | def test_entire_graph_smoketest(graph):
function test_expand_wildcards (line 274) | def test_expand_wildcards():
function test_interceptonly_runlevel_error (line 292) | def test_interceptonly_runlevel_error():
function test_missing_value_fill (line 300) | def test_missing_value_fill():
FILE: src/bids/modeling/tests/test_transformations.py
function collection (line 32) | def collection():
function sparse_run_variable_with_missing_values (line 49) | def sparse_run_variable_with_missing_values():
function test_convolve_multi (line 58) | def test_convolve_multi(collection):
function test_convolve (line 66) | def test_convolve(collection):
function test_convolve_oversampling (line 88) | def test_convolve_oversampling(collection):
function test_convolve_impulse (line 133) | def test_convolve_impulse():
function test_rename (line 144) | def test_rename(collection):
function test_product (line 157) | def test_product(collection):
function test_sum (line 164) | def test_sum(collection):
function test_scale (line 178) | def test_scale(collection, sparse_run_variable_with_missing_values):
function test_demean (line 206) | def test_demean(collection):
function test_orthogonalize_dense (line 214) | def test_orthogonalize_dense(collection):
function test_orthogonalize_sparse (line 247) | def test_orthogonalize_sparse(collection):
function test_split (line 263) | def test_split(collection):
function test_resample_dense (line 316) | def test_resample_dense(collection):
function test_threshold (line 337) | def test_threshold(collection):
function test_assign (line 357) | def test_assign(collection):
function test_assign_multiple (line 382) | def test_assign_multiple(collection):
function test_copy (line 401) | def test_copy(collection):
function test_expand_variable_names (line 407) | def test_expand_variable_names(collection):
function test_factor (line 423) | def test_factor(collection):
function test_filter (line 471) | def test_filter(collection):
function test_replace (line 486) | def test_replace(collection):
function test_select (line 505) | def test_select(collection):
function test_delete (line 512) | def test_delete(collection):
function test_and (line 520) | def test_and(collection):
function test_or (line 535) | def test_or(collection):
function test_not (line 547) | def test_not(collection):
function test_dropna (line 555) | def test_dropna(sparse_run_variable_with_missing_values):
function test_group (line 567) | def test_group(collection):
function test_resample (line 584) | def test_resample(collection):
function test_Lag (line 609) | def test_Lag():
FILE: src/bids/modeling/transformations/base.py
class Transformation (line 20) | class Transformation(metaclass=ABCMeta): # noqa: D101
method __new__ (line 100) | def __new__(cls, collection, variables, *args, **kwargs): # noqa: D102
method _setup (line 105) | def _setup(self, collection, variables, *args, **kwargs):
method _expand_variable_groups (line 140) | def _expand_variable_groups(self):
method _expand_variable_names (line 148) | def _expand_variable_names(self):
method _clone_variables (line 176) | def _clone_variables(self):
method _check_categorical_variables (line 200) | def _check_categorical_variables(self):
method _densify_variables (line 221) | def _densify_variables(self):
method transform (line 236) | def transform(self): # noqa: D102
method _transform (line 350) | def _transform(self, **kwargs):
method _preprocess (line 353) | def _preprocess(self, col):
method _postprocess (line 356) | def _postprocess(self, col):
method _align_variables (line 359) | def _align_variables(self, variables):
class TransformationOutput (line 427) | class TransformationOutput: # noqa: D101
class TransformerManager (line 436) | class TransformerManager:
method __init__ (line 453) | def __init__(self, default=None, keep_history=True):
method _sanitize_name (line 461) | def _sanitize_name(self, name):
method register (line 475) | def register(self, name, func):
method transform (line 489) | def transform(self, collection, transformations):
FILE: src/bids/modeling/transformations/compute.py
function _fractional_gcd (line 16) | def _fractional_gcd(vals, res=0.001):
class Convolve (line 23) | class Convolve(Transformation):
method _transform (line 52) | def _transform(self, var, model='spm', derivative=False, dispersion=Fa...
class Demean (line 121) | class Demean(Transformation): # noqa: D101
method _transform (line 122) | def _transform(self, data):
class Orthogonalize (line 126) | class Orthogonalize(Transformation): # noqa: D101
method _transform (line 133) | def _transform(self, var, other):
class Product (line 147) | class Product(Transformation): # noqa: D101
method _transform (line 153) | def _transform(self, data):
class Scale (line 158) | class Scale(Transformation):
method _transform (line 182) | def _transform(self, data, demean=True, rescale=True, replace_na=None):
class Sum (line 201) | class Sum(Transformation): # noqa: D101
method _transform (line 208) | def _transform(self, data, weights=None):
class Threshold (line 223) | class Threshold(Transformation):
method _transform (line 252) | def _transform(self, data, threshold=0.0, binarize=False, above=True, ...
class And_ (line 263) | class And_(Transformation):
method _transform (line 279) | def _transform(self, dfs):
class Not (line 284) | class Not(Transformation):
method _transform (line 298) | def _transform(self, var):
class Or_ (line 302) | class Or_(Transformation):
method _transform (line 318) | def _transform(self, dfs):
class Lag (line 323) | class Lag(Transformation):
method _transform (line 376) | def _transform(self, var, shift=1, order=3, mode='nearest', constant=0...
FILE: src/bids/modeling/transformations/munge.py
class Assign (line 21) | class Assign(Transformation):
method _transform (line 31) | def _transform(self, input, target, input_attr='amplitude', target_att...
class Copy (line 78) | class Copy(Transformation):
method _transform (line 92) | def _transform(self, col):
class Delete (line 97) | class Delete(Transformation):
method _transform (line 113) | def _transform(self, variables):
class DropNA (line 120) | class DropNA(Transformation): # noqa: D101
method _transform (line 126) | def _transform(self, var):
class Factor (line 133) | class Factor(Transformation): # noqa: D101
method _transform (line 139) | def _transform(self, var, constraint='none', ref_level=None, sep='.'):
class Filter (line 175) | class Filter(Transformation):
method _transform (line 185) | def _transform(self, var, query, by=None):
class Group (line 211) | class Group(Transformation):
method _transform (line 219) | def _transform(self, variables, name):
class Rename (line 227) | class Rename(Transformation):
method _transform (line 242) | def _transform(self, var):
class Replace (line 249) | class Replace(Transformation):
method _transform (line 257) | def _transform(self, var, replace, attribute='value'):
class Select (line 270) | class Select(Transformation):
method _transform (line 287) | def _transform(self, variables):
class Split (line 291) | class Split(Transformation):
method _transform (line 310) | def _transform(self, var, by):
class ToDense (line 336) | class ToDense(Transformation):
method _transform (line 343) | def _transform(self, var, sampling_rate=10):
class Resample (line 347) | class Resample(Transformation):
method _transform (line 354) | def _transform(self, var, sampling_rate=10):
FILE: src/bids/reports/conftest.py
function testlayout (line 11) | def testlayout(tests_dir):
function config_file (line 17) | def config_file(): # noqa: D103
function testconfig (line 24) | def testconfig(config_file): # noqa: D103
function _unsupported_files (line 29) | def _unsupported_files():
FILE: src/bids/reports/parameters.py
function describe_slice_timing (line 16) | def describe_slice_timing(img, metadata: dict) -> str:
function describe_repetition_time (line 28) | def describe_repetition_time(metadata: dict):
function describe_func_duration (line 35) | def describe_func_duration(n_vols: int, tr) -> str:
function describe_duration (line 42) | def describe_duration(files) -> str:
function describe_multiband_factor (line 67) | def describe_multiband_factor(metadata) -> str:
function describe_echo_times (line 76) | def describe_echo_times(files):
function describe_echo_times_fmap (line 105) | def describe_echo_times_fmap(files):
function describe_image_size (line 133) | def describe_image_size(img):
function describe_inplane_accel (line 157) | def describe_inplane_accel(metadata: dict) -> str:
function describe_flip_angle (line 166) | def describe_flip_angle(metadata: dict) -> str:
function describe_dmri_directions (line 171) | def describe_dmri_directions(img):
function describe_bvals (line 176) | def describe_bvals(bval_file) -> str:
function describe_pe_direction (line 190) | def describe_pe_direction(metadata: dict, config: dict) -> str:
function describe_intendedfor_targets (line 197) | def describe_intendedfor_targets(metadata: dict, layout) -> str:
function get_slice_info (line 244) | def get_slice_info(slice_times) -> str:
function describe_sequence (line 286) | def describe_sequence(metadata: dict, config: dict):
function get_size_str (line 319) | def get_size_str(img):
FILE: src/bids/reports/parsing.py
function func_info (line 16) | def func_info(layout, files, config):
function anat_info (line 81) | def anat_info(layout, files, config):
function dwi_info (line 140) | def dwi_info(layout, files, config):
function fmap_info (line 203) | def fmap_info(layout, files, config):
function general_acquisition_info (line 258) | def general_acquisition_info(metadata):
function final_paragraph (line 282) | def final_paragraph(metadata):
function parse_files (line 310) | def parse_files(layout, data_files, sub, config):
function _parse_files (line 331) | def _parse_files(layout, data_files, sub, config, *, stacklevel=3):
FILE: src/bids/reports/report.py
class BIDSReport (line 10) | class BIDSReport:
method __init__ (line 45) | def __init__(self, layout, config=None):
method generate_from_files (line 65) | def generate_from_files(self, files):
method generate (line 136) | def generate(self, **kwargs):
method _report_subject (line 182) | def _report_subject(self, subject, **kwargs): # noqa: D417
FILE: src/bids/reports/tests/test_parameters.py
function testimg (line 8) | def testimg(testlayout):
function testdiffimg (line 20) | def testdiffimg(testlayout):
function testmeta (line 31) | def testmeta():
function testmeta_light (line 43) | def testmeta_light():
function test_describe_sequence (line 71) | def test_describe_sequence(
function test_describe_pe_direction (line 96) | def test_describe_pe_direction(pe_direction, expected, testconfig):
function test_describe_bvals_smoke (line 103) | def test_describe_bvals_smoke(testlayout):
function test_describe_echo_times_smoke (line 119) | def test_describe_echo_times_smoke(testlayout):
function test_describe_echo_times_fmap (line 134) | def test_describe_echo_times_fmap(testlayout):
function test_describe_repetition_time_smoke (line 150) | def test_describe_repetition_time_smoke(testmeta):
function test_describe_func_duration_smoke (line 158) | def test_describe_func_duration_smoke():
function test_describe_multiband_factor_smoke (line 169) | def test_describe_multiband_factor_smoke(testmeta, testmeta_light):
function test_describe_inplane_accel_smoke (line 183) | def test_describe_inplane_accel_smoke(testmeta, testmeta_light):
function test_describe_flip_angle_smoke (line 197) | def test_describe_flip_angle_smoke(testmeta):
function test_get_slice_info (line 214) | def test_get_slice_info(slice_times, expected):
function test_describe_slice_timing (line 219) | def test_describe_slice_timing(testimg, testmeta, testmeta_light):
function test_get_size_str (line 229) | def test_get_size_str(testimg):
function test_describe_image_size (line 239) | def test_describe_image_size(testimg):
function test_describe_dmri_directions (line 249) | def test_describe_dmri_directions(testdiffimg):
function test_describe_intendedfor_targets (line 255) | def test_describe_intendedfor_targets(testmeta_light, testlayout):
FILE: src/bids/reports/tests/test_parsing.py
function testmeta (line 9) | def testmeta():
function test_anat_info_smoke (line 14) | def test_anat_info_smoke(testlayout, testconfig):
function test_dwi_info_smoke (line 30) | def test_dwi_info_smoke(testlayout, testconfig):
function test_fmap_info_smoke (line 46) | def test_fmap_info_smoke(testlayout, testconfig):
function test_func_info_smoke (line 63) | def test_func_info_smoke(testlayout, testconfig):
function test_general_acquisition_info_smoke (line 80) | def test_general_acquisition_info_smoke(testmeta):
function test_final_paragraph_smoke (line 89) | def test_final_paragraph_smoke(testmeta):
function test_parse_files_smoke (line 98) | def test_parse_files_smoke(testlayout, testconfig):
FILE: src/bids/reports/tests/test_report.py
function test_report_init (line 7) | def test_report_init(testlayout):
function test_report_gen (line 13) | def test_report_gen(testlayout):
function test_report_gen_from_files (line 20) | def test_report_gen_from_files(testlayout):
function test_report_subject (line 30) | def test_report_subject(testlayout):
function test_report_session (line 39) | def test_report_session(testlayout):
function test_report_file_config (line 48) | def test_report_file_config(testlayout, config_file):
function test_report_dict_config (line 55) | def test_report_dict_config(testlayout, testconfig):
FILE: src/bids/reports/utils.py
function reminder (line 12) | def reminder():
function remove_duplicates (line 17) | def remove_duplicates(seq):
function num_to_str (line 27) | def num_to_str(num):
function list_to_str (line 38) | def list_to_str(lst):
FILE: src/bids/tests/test_cli.py
function runner (line 12) | def runner():
function test_cli_entrypoint (line 16) | def test_cli_entrypoint(runner):
function test_validate_multiple (line 28) | def test_validate_multiple():
function test_layout (line 37) | def test_layout(runner, tmp_path):
FILE: src/bids/tests/test_config.py
function test_load_from_standard_paths (line 13) | def test_load_from_standard_paths():
function test_set_option (line 41) | def test_set_option():
function test_extension_initial_dot (line 59) | def test_extension_initial_dot(mock_config):
FILE: src/bids/tests/utils.py
function get_test_data_path (line 6) | def get_test_data_path():
FILE: src/bids/utils.py
class frozendict (line 13) | class frozendict(_frozendict):
method __repr__ (line 16) | def __repr__(self):
function listify (line 21) | def listify(obj):
function hashablefy (line 28) | def hashablefy(obj):
function matches_entities (line 38) | def matches_entities(obj, entities, strict=False):
function natural_sort (line 55) | def natural_sort(l, field=None): # noqa: E741
function convert_JSON (line 69) | def convert_JSON(j):
function splitext (line 106) | def splitext(path):
function make_bidsfile (line 121) | def make_bidsfile(filename):
function collect_associated_files (line 141) | def collect_associated_files(layout, files, extra_entities=()): # noqa:...
function validate_multiple (line 183) | def validate_multiple(val, retval=None):
function entity_indices (line 199) | def entity_indices(schema_spec=None): # noqa: D103
function bids_sort (line 209) | def bids_sort(unsorted: dict, schema_spec=None):
FILE: src/bids/variables/collections.py
function _pandas_3_0 (line 26) | def _pandas_3_0():
function _pandas_3_0_options (line 46) | def _pandas_3_0_options():
class BIDSVariableCollection (line 62) | class BIDSVariableCollection:
method __init__ (line 81) | def __init__(self, variables, name=None):
method merge_variables (line 125) | def merge_variables(variables, **kwargs): # noqa: D417
method to_df (line 148) | def to_df(self, variables=None, format='wide', fillna=np.nan, entities...
method from_df (line 234) | def from_df(cls, data, entities=None, source='contrast'): # noqa: D417
method clone (line 261) | def clone(self):
method _index_entities (line 271) | def _index_entities(self):
method __getitem__ (line 292) | def __getitem__(self, var):
method __setitem__ (line 300) | def __setitem__(self, var, obj):
method match_variables (line 313) | def match_variables(self, pattern, return_type='name', match_type='uni...
method __repr__ (line 348) | def __repr__(self):
class BIDSRunVariableCollection (line 352) | class BIDSRunVariableCollection(BIDSVariableCollection):
method __init__ (line 372) | def __init__(self, variables, sampling_rate=None):
method get_dense_variables (line 381) | def get_dense_variables(self, variables=None):
method get_sparse_variables (line 391) | def get_sparse_variables(self, variables=None):
method all_dense (line 401) | def all_dense(self): # noqa: D102
method all_sparse (line 404) | def all_sparse(self): # noqa: D102
method _get_sampling_rate (line 407) | def _get_sampling_rate(self, sampling_rate):
method _densify_and_resample (line 445) | def _densify_and_resample(
method to_dense (line 494) | def to_dense( # noqa: D417
method resample (line 541) | def resample(
method to_df (line 582) | def to_df(
function merge_collections (line 674) | def merge_collections(collections, sampling_rate='highest', output_level...
FILE: src/bids/variables/entities.py
class Node (line 15) | class Node:
method __init__ (line 27) | def __init__(self, level, entities):
method add_variable (line 36) | def add_variable(self, variable):
class RunNode (line 52) | class RunNode(Node):
method __init__ (line 72) | def __init__(self, entities, image_file, duration, repetition_time, n_...
method get_info (line 79) | def get_info(self): # noqa: D102
class RunInfo (line 93) | class RunInfo(RunInfo_):
class NodeIndex (line 102) | class NodeIndex:
method __init__ (line 105) | def __init__(self):
method get_collections (line 110) | def get_collections(self, unit, names=None, merge=False, sampling_rate...
method get_nodes (line 172) | def get_nodes(self, level=None, entities=None, strict=False):
method create_node (line 237) | def create_node(self, level, entities, *args, **kwargs):
method get_or_create_node (line 271) | def get_or_create_node(self, level, entities, *args, **kwargs):
FILE: src/bids/variables/io.py
function load_variables (line 18) | def load_variables( # noqa: D417
function _get_nvols (line 110) | def _get_nvols(img_f):
function _load_time_variables (line 132) | def _load_time_variables( # noqa: D417
function _load_tsv_variables (line 425) | def _load_tsv_variables( # noqa: D417
FILE: src/bids/variables/tests/test_collections.py
function run_coll (line 13) | def run_coll():
function run_coll_bad_length (line 23) | def run_coll_bad_length():
function run_coll_list (line 33) | def run_coll_list():
function run_coll_derivs (line 42) | def run_coll_derivs():
function test_run_variable_collection_init (line 52) | def test_run_variable_collection_init(run_coll):
function test_run_variable_collection_sparse_variable_accessors (line 61) | def test_run_variable_collection_sparse_variable_accessors(run_coll):
function test_run_variable_collection_dense_variable_accessors (line 70) | def test_run_variable_collection_dense_variable_accessors(run_coll):
function test_run_variable_collection_get_sampling_rate (line 82) | def test_run_variable_collection_get_sampling_rate(run_coll):
function test_resample_run_variable_collection (line 99) | def test_resample_run_variable_collection(run_coll):
function test_run_variable_collection_to_df_all_sparse_vars (line 125) | def test_run_variable_collection_to_df_all_sparse_vars(run_coll):
function test_run_variable_collection_to_df_all_dense_vars (line 183) | def test_run_variable_collection_to_df_all_dense_vars(run_coll):
function test_run_variable_collection_bad_length_to_df_all_dense_vars (line 250) | def test_run_variable_collection_bad_length_to_df_all_dense_vars(run_col...
function test_run_variable_collection_to_df_mixed_vars (line 286) | def test_run_variable_collection_to_df_mixed_vars(run_coll):
function test_merge_collections (line 311) | def test_merge_collections(run_coll, run_coll_list):
function test_get_collection_entities (line 319) | def test_get_collection_entities(run_coll_list):
function test_match_variables (line 335) | def test_match_variables(run_coll):
function test_n_variables (line 346) | def test_n_variables(run_coll_derivs):
FILE: src/bids/variables/tests/test_entities.py
function layout1 (line 12) | def layout1():
function layout2 (line 19) | def layout2():
function test_run (line 25) | def test_run(layout1):
function test_get_or_create_node (line 36) | def test_get_or_create_node(layout1):
function test_get_nodes (line 62) | def test_get_nodes(layout1):
function test_get_collections_merged (line 76) | def test_get_collections_merged(layout1):
function test_get_collections_unmerged (line 87) | def test_get_collections_unmerged(layout2):
FILE: src/bids/variables/tests/test_io.py
function layout1 (line 12) | def layout1():
function synthetic (line 19) | def synthetic(request):
function test_load_events (line 30) | def test_load_events(layout1):
function test_load_participants (line 44) | def test_load_participants(layout1):
function test_load_synthetic_dataset (line 62) | def test_load_synthetic_dataset(synthetic):
FILE: src/bids/variables/tests/test_variables.py
function generate_DEV (line 17) | def generate_DEV(name='test', sr=20, duration=480):
function layout1 (line 30) | def layout1():
function layout2 (line 37) | def layout2():
function test_dense_event_variable_init (line 43) | def test_dense_event_variable_init():
function test_dense_event_variable_resample (line 52) | def test_dense_event_variable_resample():
function test_merge_wrapper (line 59) | def test_merge_wrapper():
function test_sparse_run_variable_to_dense (line 68) | def test_sparse_run_variable_to_dense(layout1):
function test_sparse_run_variable_to_dense_default_sr (line 88) | def test_sparse_run_variable_to_dense_default_sr(layout1):
function test_merge_densified_variables (line 111) | def test_merge_densified_variables(layout1):
function test_densify_merged_variables (line 128) | def test_densify_merged_variables(layout1):
function test_merge_simple_variables (line 149) | def test_merge_simple_variables(layout2):
function test_merge_sparse_run_variables (line 160) | def test_merge_sparse_run_variables(layout1):
function test_merge_dense_run_variables (line 170) | def test_merge_dense_run_variables(layout2):
function test_simple_variable_to_df (line 179) | def test_simple_variable_to_df(layout1):
function test_sparse_run_variable_to_df (line 183) | def test_sparse_run_variable_to_df(layout1):
function test_dense_run_variable_to_df (line 187) | def test_dense_run_variable_to_df(layout2):
function test_filter_simple_variable (line 191) | def test_filter_simple_variable(layout2):
function test_resampling_edge_case (line 211) | def test_resampling_edge_case(tmpdir, TR, nvols):
function test_downsampling (line 232) | def test_downsampling(tmpdir):
FILE: src/bids/variables/variables.py
class BIDSVariable (line 16) | class BIDSVariable(metaclass=ABCMeta):
method __init__ (line 24) | def __init__(self, name, values, source):
method __repr__ (line 30) | def __repr__(self):
method clone (line 33) | def clone(self, data=None, **kwargs):
method filter (line 71) | def filter(self, filters=None, query=None, strict=False, inplace=False):
method merge (line 127) | def merge(cls, variables, name=None, **kwargs):
method _merge (line 168) | def _merge(cls, variables, name, **kwargs):
method get_grouper (line 171) | def get_grouper(self, groupby='run'):
method apply (line 190) | def apply(self, func, groupby='run', *args, **kwargs):
method to_df (line 208) | def to_df(self, condition=True, entities=True, **kwargs): # noqa: D417
method _extract_entities (line 237) | def _extract_entities(self):
class SimpleVariable (line 269) | class SimpleVariable(BIDSVariable):
method __init__ (line 291) | def __init__(self, name, data, source, **kwargs):
method split (line 300) | def split(self, grouper):
method _merge (line 333) | def _merge(cls, variables, name, **kwargs):
method select_rows (line 339) | def select_rows(self, rows):
class SparseRunVariable (line 356) | class SparseRunVariable(SimpleVariable):
method __init__ (line 380) | def __init__(self, name, data, run_info, source, **kwargs):
method get_duration (line 392) | def get_duration(self):
method to_dense (line 396) | def to_dense(self, sampling_rate=None):
method _extract_entities (line 468) | def _extract_entities(self):
method _merge (line 478) | def _merge(cls, variables, name, **kwargs):
class DenseRunVariable (line 483) | class DenseRunVariable(BIDSVariable):
method __init__ (line 503) | def __init__(self, name, values, run_info, source, sampling_rate):
method split (line 519) | def split(self, grouper):
method _build_entity_index (line 547) | def _build_entity_index(self, run_info, sampling_rate, match_vol=False):
method resample (line 583) | def resample(self, sampling_rate, inplace=False, kind='linear'):
method to_df (line 627) | def to_df(self, condition=True, entities=True, timing=True, sampling_r...
method _merge (line 655) | def _merge(cls, variables, name, sampling_rate=None, **kwargs):
function merge_variables (line 682) | def merge_variables(variables, **kwargs):
function _resample (line 730) | def _resample(y, new_sr, old_sr, new_num, kind='linear'):
FILE: tools/check_noqa_budget.py
function git (line 16) | def git(*args: str) -> str:
function tracked_python_files (line 20) | def tracked_python_files(ref: str) -> list[str]:
function file_content_at_ref (line 25) | def file_content_at_ref(ref: str, path: str) -> str:
function count_noqa_in_text (line 29) | def count_noqa_in_text(text: str) -> int:
function count_noqa_at_ref (line 33) | def count_noqa_at_ref(ref: str) -> int:
function main (line 45) | def main() -> int:
FILE: tools/prep_zenodo.py
function decommify (line 15) | def decommify(name):
Copy disabled (too large)
Download .json
Condensed preview — 797 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (37,587K chars).
[
{
"path": ".git-blame-ignore-revs",
"chars": 144,
"preview": "# 2026-03-07 14:05:31 -0500 - markiewicz@stanford.edu - sty: Clean up trailing whitespace [ignore-rev]\nb1ce2c83fdc83e94e"
},
{
"path": ".gitattributes",
"chars": 34,
"preview": "src/bids/_version.py export-subst\n"
},
{
"path": ".github/codespell_exclude_lines.txt",
"chars": 368,
"preview": " \"/RADME\", # wrong filename\n \"/CANGES\", # wrong filename\n \"/dataset_descrption.json\", # wrong fi"
},
{
"path": ".github/codespell_ignore_words.txt",
"chars": 20,
"preview": "complies\nnin\nnwe\nte\n"
},
{
"path": ".github/dependabot.yml",
"chars": 567,
"preview": "# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabo"
},
{
"path": ".github/release-drafter.yml",
"chars": 58,
"preview": "template: |\n ## Release Notes\n \n ## CHANGES\n $CHANGES\n"
},
{
"path": ".github/workflows/build-test-deploy.yml",
"chars": 3880,
"preview": "name: Python\n\non:\n push:\n branches:\n - main\n - maint/*\n tags:\n - '*'\n pull_request: {}\n schedule"
},
{
"path": ".github/workflows/codespell.yml",
"chars": 277,
"preview": "---\nname: Codespell\n\non:\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\njobs:\n codespell:\n name:"
},
{
"path": ".github/workflows/docs.yml",
"chars": 1450,
"preview": "name: Documentation\n\non:\n push:\n branches:\n - main\n - maint/*\n - rel/*\n - docs/*\n tags:\n "
},
{
"path": ".github/workflows/prerelease.yml",
"chars": 1584,
"preview": "name: Pre-release\n\non:\n push:\n branches:\n - main\n pull_request:\n branches:\n - main\n schedule:\n # 8"
},
{
"path": ".gitignore",
"chars": 1342,
"preview": "historical/\n\n# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribut"
},
{
"path": ".gitmodules",
"chars": 125,
"preview": "[submodule \"bids-examples\"]\n\tpath = bids-examples\n\turl = https://github.com/bids-standard/bids-examples.git\n\tbranch = ma"
},
{
"path": ".mailmap",
"chars": 2543,
"preview": "Alejandro de la Vega <delavega@utexas.edu>\nAlejandro de la Vega <delavega@utexas.edu> <aleph4@gmail.com>\nAlejandro de la"
},
{
"path": ".pre-commit-config.yaml",
"chars": 496,
"preview": "ci:\n autoupdate_schedule: quarterly\n\nrepos:\n - repo: https://github.com/pre-commit/pre-commit-hooks\n rev: v6.0.0\n "
},
{
"path": ".zenodo.json",
"chars": 10584,
"preview": "{\n \"title\": \"PyBIDS: Python tools for BIDS datasets\",\n \"description\": \"PyBIDS is a Python library to centralize intera"
},
{
"path": "CHANGELOG.rst",
"chars": 43133,
"preview": "Changelog\n=========\n\nVersion 0.22.0 (April 22, 2026)\n-------------------------------\n\nNew feature release in the 0.22.x "
},
{
"path": "LICENSE",
"chars": 1188,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015-2016, Ariel Rokem, The University of Washington eScience Institute.\nCopyright "
},
{
"path": "MANIFEST.in",
"chars": 147,
"preview": "graft src\ngraft tests\ngraft doc\n\ninclude tox.ini\n# Include uv.lock so that tox can run from sdist\ninclude uv.lock\n\nrecur"
},
{
"path": "README.md",
"chars": 4244,
"preview": "# PyBIDS\n[](https://doi.org/10.21105/joss.01294)\n[!["
},
{
"path": "codecov.yml",
"chars": 515,
"preview": "coverage:\n range: \"0...100\"\n status:\n patch:\n default:\n target: 0\n threshold: 100\n project:\n "
},
{
"path": "doc/Makefile",
"chars": 691,
"preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line, and also\n# from the "
},
{
"path": "doc/_static/theme_overrides.css",
"chars": 365,
"preview": "/* override table width restrictions */\n@media screen and (min-width: 767px) {\n\n .wy-table-responsive table td {\n "
},
{
"path": "doc/_templates/class.rst",
"chars": 259,
"preview": ":mod:`{{module}}`.{{objname}}\n{{ underline }}==============\n\n.. currentmodule:: {{ module }}\n\n.. autoclass:: {{ objname "
},
{
"path": "doc/_templates/function.rst",
"chars": 226,
"preview": ":mod:`{{module}}`.{{objname}}\n{{ underline }}====================\n\n.. currentmodule:: {{ module }}\n\n.. autofunction:: {{"
},
{
"path": "doc/_templates/module.rst",
"chars": 683,
"preview": "{{ fullname }}\n{{ underline }}\n\n.. automodule:: {{ fullname }}\n\n {% block functions %}\n {% if functions %}\n .. rub"
},
{
"path": "doc/analysis/index.rst",
"chars": 2477,
"preview": ".. _analysis:\n\n=====================================================\n``analysis``: Model specification for BIDS datasets"
},
{
"path": "doc/api.rst",
"chars": 2378,
"preview": "API Reference\n==============\n\n.. _base_ref:\n\n:mod:`bids.layout`: Querying BIDS datasets\n--------------------------------"
},
{
"path": "doc/conf.py",
"chars": 4457,
"preview": "# Configuration file for the Sphinx documentation builder. # noqa: D100, EXE002\n#\n# This file only contains a selection"
},
{
"path": "doc/examples/index.rst",
"chars": 441,
"preview": ".. tutorials:\n\nTutorials\n==========\n\nThe following executable examples are available.\n\nNote that all of these tutorials "
},
{
"path": "doc/examples/pybids_tutorial.md",
"chars": 16331,
"preview": "---\njupytext:\n text_representation:\n extension: .md\n format_name: myst\n format_version: 0.13\n jupytext_vers"
},
{
"path": "doc/examples/reports_tutorial.md",
"chars": 1161,
"preview": "---\njupytext:\n text_representation:\n extension: .md\n format_name: myst\n format_version: 0.13\n jupytext_vers"
},
{
"path": "doc/examples/statsmodels_tutorial.md",
"chars": 12291,
"preview": "---\njupytext:\n text_representation:\n extension: .md\n format_name: myst\n format_version: 0.13\n jupytext_vers"
},
{
"path": "doc/includes/big_toc_css.rst",
"chars": 722,
"preview": "..\n File to ..include in a document with a big table of content, to give\n it 'style'\n\n:orphan:\n\n.. raw:: html\n\n <"
},
{
"path": "doc/includes/bigger_toc_css.rst",
"chars": 1037,
"preview": "..\n File to ..include in a document with a very big table of content, to\n give it 'style'\n\n:orphan:\n\n.. raw:: html"
},
{
"path": "doc/index.rst",
"chars": 1342,
"preview": ".. bids\n\nWelcome to pybids's documentation!\n====================================\n\n``pybids`` is a set of tools for worki"
},
{
"path": "doc/introduction.rst",
"chars": 2182,
"preview": ".. _introduction:\n\n=====================================================\nIntroduction: What is pybids?\n================="
},
{
"path": "doc/layout/index.rst",
"chars": 2449,
"preview": ".. _layout:\n\n=====================================================\n``layout``: Querying BIDS datasets\n=================="
},
{
"path": "doc/make.bat",
"chars": 800,
"preview": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sp"
},
{
"path": "doc/reports/index.rst",
"chars": 3796,
"preview": ".. _reports:\n\n=====================================================\n``reports``: Data acquisition report generation\n===="
},
{
"path": "doc/sphinxext/docscrape.py",
"chars": 18078,
"preview": "# ruff: noqa: D301\n\"\"\"Extract reference documentation from the NumPy source tree.\"\"\"\n\nimport collections\nimport inspect\n"
},
{
"path": "doc/sphinxext/docscrape_sphinx.py",
"chars": 7931,
"preview": "import inspect # noqa: D100\nimport pydoc\nimport re\nimport textwrap\n\nimport sphinx\nfrom docscrape import ClassDoc, Funct"
},
{
"path": "doc/sphinxext/github.py",
"chars": 5511,
"preview": "\"\"\"Define text roles for GitHub\n\n* ghissue - Issue\n* ghpull - Pull Request\n* ghuser - User\n\nAdapted from bitbucket examp"
},
{
"path": "doc/sphinxext/math_dollar.py",
"chars": 2104,
"preview": "import re # noqa: D100\n\n\ndef dollars_to_math(source):\n r\"\"\"Replace dollar signs with backticks.\n\n More precisely,"
},
{
"path": "doc/sphinxext/numpydoc.py",
"chars": 6251,
"preview": "\"\"\"========\nnumpydoc\n========\n\nSphinx extension that handles docstrings in the Numpy standard format. [1]\n\nIt will:\n\n- C"
},
{
"path": "doc/tune_toc.rst",
"chars": 3546,
"preview": ":orphan:\n\n.. raw:: html\n\n <SCRIPT>\n //Function to make the index toctree collapsible\n $(function () {\n $('.t"
},
{
"path": "doc/user_guide.rst",
"chars": 309,
"preview": "\n.. _user_guide:\n\nUser guide\n==========\n\n.. sidebar:: **Download for offline viewing**\n\n Download the `user guide and "
},
{
"path": "doc/whats_new.rst",
"chars": 30,
"preview": ".. include:: ../CHANGELOG.rst\n"
},
{
"path": "long_description.rst",
"chars": 564,
"preview": "PyBIDS\n======\nPyBIDS is a Python module to interface with datasets conforming BIDS.\nSee BIDS paper_ and https://bids.neu"
},
{
"path": "paper/paper.bib",
"chars": 9647,
"preview": "@article{Gorgolewski2016-sk,\n title = \"A Practical Guide for Improving Transparency and Reproducibility\n "
},
{
"path": "paper/paper.md",
"chars": 8095,
"preview": "---\ntitle: 'PyBIDS: Python tools for BIDS datasets'\ntags:\n - Python\n - BIDS\n - neuroimaging\nauthors:\n - affiliation:"
},
{
"path": "pyproject.toml",
"chars": 2483,
"preview": "[build-system]\nrequires = [\"setuptools\", \"versioneer[toml]\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \""
},
{
"path": "ruff.toml",
"chars": 1595,
"preview": "line-length = 99\nextend-exclude = [\n \"_version.py\", # Auto-generated\n \"tests/data\", # Submodules\n \"bids-examples\","
},
{
"path": "schema_integration_demo.ipynb",
"chars": 15220,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# BIDS Schema Integration Demo\\n\",\n"
},
{
"path": "setup.cfg",
"chars": 162,
"preview": "[codespell]\nskip = ./.git,external,versioneer.py,_version.py\nignore-words = .github/codespell_ignore_words.txt\nexclude-f"
},
{
"path": "setup.py",
"chars": 157,
"preview": "#!/usr/bin/env python\nimport versioneer\nfrom setuptools import setup\n\nsetup(\n version=versioneer.get_version(),\n c"
},
{
"path": "src/bids/__init__.py",
"chars": 583,
"preview": "# For backwards compatibility # noqa: D104\nfrom bids_validator import BIDSValidator\n\nfrom .due import Doi, due\nfrom .la"
},
{
"path": "src/bids/__main__.py",
"chars": 73,
"preview": "from .cli import cli # noqa: D100\n\nif __name__ == '__main__':\n cli()\n"
},
{
"path": "src/bids/_version.py",
"chars": 24482,
"preview": "\n# This file helps to compute a version number in source trees obtained from\n# git-archive tarball (such as those provid"
},
{
"path": "src/bids/cli.py",
"chars": 10340,
"preview": "import json # noqa: D100\nimport os\nfrom copy import deepcopy\nfrom pathlib import Path\n\nimport click\n\nfrom . import __ve"
},
{
"path": "src/bids/config.py",
"chars": 3292,
"preview": "\"\"\"Utilities for manipulating package-level settings.\"\"\"\n\nimport json\nimport os\nimport warnings\n\nfrom upath import UPath"
},
{
"path": "src/bids/conftest.py",
"chars": 2080,
"preview": "# ruff: noqa: D404\n\"\"\"This module allows you to mock the config file as needed. # noqa: D404\nA default fixture that sim"
},
{
"path": "src/bids/due.py",
"chars": 2050,
"preview": "# emacs: at the end of the file\n# ex: set sts=4 ts=4 sw=4 et:\n# ## ### ### ### ### ### ### ### ### ### ### ### ### ### #"
},
{
"path": "src/bids/exceptions.py",
"chars": 973,
"preview": "\"\"\"Exceptions.\n\nExceptions relating to problems with BIDS itself, should carry BIDS in their\nname. All exceptions shoul"
},
{
"path": "src/bids/ext/__init__.py",
"chars": 1039,
"preview": "\"\"\"The PyBIDS extension namespace package\n\n``bids.ext`` is reserved as a namespace for extensions to install into.\nTo wr"
},
{
"path": "src/bids/external/__init__.py",
"chars": 1,
"preview": "\n"
},
{
"path": "src/bids/external/inflect.py",
"chars": 102537,
"preview": "\"\"\"\ncorrectly generate plurals, ordinals, indefinite articles;\nconvert numbers to words\n\nCopyright (C) 2010 Paul Dyson\n\n"
},
{
"path": "src/bids/layout/README.md",
"chars": 286,
"preview": "# layout\n\nPyBIDS used to depend on [Grabbit](https://github.com/grabbles/grabbit) and here\nwe described interactions wit"
},
{
"path": "src/bids/layout/__init__.py",
"chars": 566,
"preview": "# Backwards compatibility # noqa: D104\nfrom bids_validator import BIDSValidator\n\nfrom .index import BIDSLayoutIndexer\nf"
},
{
"path": "src/bids/layout/config/bids.json",
"chars": 20979,
"preview": "{\n \"name\": \"bids\",\n \"entities\": [\n {\n \"name\": \"subject\",\n \"pattern\": \"[/\\\\\\\\]+sub-([a"
},
{
"path": "src/bids/layout/config/derivatives.json",
"chars": 5802,
"preview": "{\n \"name\": \"derivatives\",\n \"entities\": [\n {\n \"name\": \"atlas\",\n \"pattern\": \"atlas-([a-"
},
{
"path": "src/bids/layout/db.py",
"chars": 6137,
"preview": "\"\"\"Database-related functionality.\"\"\"\n\nimport re\nimport sqlite3\nfrom functools import lru_cache\n\nimport sqlalchemy as sa"
},
{
"path": "src/bids/layout/index.py",
"chars": 21187,
"preview": "\"\"\"File-indexing functionality.\"\"\"\n\nimport json\nimport re\nimport warnings\nfrom collections import defaultdict\nfrom funct"
},
{
"path": "src/bids/layout/layout.py",
"chars": 63889,
"preview": "\"\"\"BIDSLayout class.\"\"\"\n\nimport copy\nimport difflib\nimport enum\nimport json\nimport re\nimport warnings\nfrom collections i"
},
{
"path": "src/bids/layout/models.py",
"chars": 35748,
"preview": "\"\"\"Model classes used in BIDSLayouts.\"\"\"\n\nimport json\nimport os\nimport re\nimport warnings\nfrom collections import UserDi"
},
{
"path": "src/bids/layout/tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/bids/layout/tests/conftest.py",
"chars": 3204,
"preview": "import shutil\nfrom os.path import join\n\nimport pytest\n\nfrom bids.layout import BIDSLayout\n\n\n# Fixture uses in the rest o"
},
{
"path": "src/bids/layout/tests/data/sample_validation_config.json",
"chars": 2146,
"preview": "{\n \"name\": \"user_sequences\",\n \"sequences\": [\n {\n \"modality\": \"func\",\n \"session\": \"wav"
},
{
"path": "src/bids/layout/tests/test_db.py",
"chars": 413,
"preview": "\"\"\"Test functionality in the db module--mostly related to connection\nmanagement.\"\"\"\n\nfrom bids.layout.db import get_data"
},
{
"path": "src/bids/layout/tests/test_layout.py",
"chars": 49314,
"preview": "\"\"\"Tests of functionality in the layout module--mostly related to the\nBIDSLayout class.\"\"\"\n\nimport json\nimport os\nimport"
},
{
"path": "src/bids/layout/tests/test_layout_on_examples.py",
"chars": 1848,
"preview": "\"\"\"Tests runs layout on bids examples and make sure all files are caught\"\"\"\n\n\"\"\" TODO\n- add more 'vanilla' datasets\n- mi"
},
{
"path": "src/bids/layout/tests/test_models.py",
"chars": 9686,
"preview": "\"\"\"Tests of functionality in the models module.\"\"\"\n\nimport copy\nimport json\nimport os\nimport warnings\nfrom pathlib impor"
},
{
"path": "src/bids/layout/tests/test_path_building.py",
"chars": 4728,
"preview": "\"\"\"Tests of path-building functionality.\"\"\"\n\nfrom os.path import join\nfrom pathlib import Path\n\nimport pytest\n\nfrom bids"
},
{
"path": "src/bids/layout/tests/test_remote_bids.py",
"chars": 668,
"preview": "\"\"\"Tests runs layout on bids examples and make sure all files are caught\"\"\"\n\n# TODO\n# - add more 'vanilla' datasets\n# - "
},
{
"path": "src/bids/layout/tests/test_rootpath.py",
"chars": 700,
"preview": "\"\"\"\nTest handling of pathlib Path file paths in place of old-style string type.\n\"\"\"\n\nfrom pathlib import Path\n\nimport py"
},
{
"path": "src/bids/layout/tests/test_schema_config.py",
"chars": 5305,
"preview": "\"\"\"Tests for schema-based Config loading.\"\"\"\n\nimport pytest\n\nfrom bids.layout.models import Config\n\n\nclass TestSchemaCon"
},
{
"path": "src/bids/layout/tests/test_schema_pattern_validation.py",
"chars": 8425,
"preview": "\"\"\"Tests to verify schema patterns match actual schema content.\"\"\"\n\nfrom bidsschematools import schema as bst_schema\n\nfr"
},
{
"path": "src/bids/layout/tests/test_schema_version_differences.py",
"chars": 4272,
"preview": "\"\"\"Tests for differences between BIDS schema versions.\"\"\"\n\nimport json\nimport tempfile\nfrom pathlib import Path\n\nfrom bi"
},
{
"path": "src/bids/layout/tests/test_schema_vs_json_config.py",
"chars": 14053,
"preview": "\"\"\"Tests to verify schema-driven config matches old JSON config behavior.\"\"\"\n\nimport re\n\nfrom bids.layout.models import "
},
{
"path": "src/bids/layout/tests/test_utils.py",
"chars": 3888,
"preview": "\"\"\"Test miscellaneous utilities.\"\"\"\n\nimport os\n\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nimport bids\nfrom b"
},
{
"path": "src/bids/layout/tests/test_validation.py",
"chars": 697,
"preview": "\"\"\"Tests of BIDSValidator functionality.\"\"\"\n\nfrom os.path import join\n\nimport pytest\nfrom bids_validator import BIDSVali"
},
{
"path": "src/bids/layout/tests/test_writing.py",
"chars": 13447,
"preview": "\"\"\"Tests related to file-writing functionality.\"\"\"\n\nimport os\nimport shutil\nfrom os.path import dirname, exists, islink,"
},
{
"path": "src/bids/layout/utils.py",
"chars": 4950,
"preview": "\"\"\"Miscellaneous layout-related utilities.\"\"\"\n\nfrom upath import UPath as Path\n\nfrom .. import config as cf\nfrom ..excep"
},
{
"path": "src/bids/layout/validation.py",
"chars": 5700,
"preview": "\"\"\"Functionality related to validation of BIDSLayouts and BIDS projects.\"\"\"\n\nimport json\nimport re\nimport warnings\n\nfrom"
},
{
"path": "src/bids/layout/writing.py",
"chars": 12827,
"preview": "\"\"\"Contains helper functions that involve writing operations.\"\"\"\n\nimport re\nimport shutil\nimport sys\nimport warnings\nfro"
},
{
"path": "src/bids/modeling/README.md",
"chars": 624,
"preview": "## PyBIDS: Modeling\n\nThe PyBIDS `modeling` module provides high-level model specification functionality for BIDS dataset"
},
{
"path": "src/bids/modeling/__init__.py",
"chars": 407,
"preview": "from .auto_model import auto_model # noqa: D104\nfrom .statsmodels import (\n BIDSStatsModelsEdge,\n BIDSStatsModels"
},
{
"path": "src/bids/modeling/auto_model.py",
"chars": 4526,
"preview": "from collections import OrderedDict # noqa: D100\n\nimport numpy as np\n\nfrom bids.variables import load_variables\n\n\ndef _"
},
{
"path": "src/bids/modeling/hrf.py",
"chars": 17055,
"preview": "# ruff: noqa: D404\n\"\"\"This module is for hemodynamic response function (hrf) specification. # noqa: D404\nHere we provid"
},
{
"path": "src/bids/modeling/model_spec.py",
"chars": 12662,
"preview": "from abc import ABCMeta, abstractmethod # noqa: D100\n\nimport numpy as np\nimport pandas as pd\nfrom formulaic import mode"
},
{
"path": "src/bids/modeling/report/__init__.py",
"chars": 1,
"preview": "\n"
},
{
"path": "src/bids/modeling/report/base.py",
"chars": 5435,
"preview": "import datetime # noqa: D100\nimport os\nfrom pathlib import Path\n\nfrom bids import __version__ as bids_version\nfrom bids"
},
{
"path": "src/bids/modeling/report/report_template.jinja",
"chars": 19150,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org"
},
{
"path": "src/bids/modeling/report/utils.py",
"chars": 6391,
"preview": "import re # noqa: D100\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom scipy.linalg import null_space\n\n\nde"
},
{
"path": "src/bids/modeling/report/viz.py",
"chars": 3388,
"preview": "import altair as alt # noqa: D100\nimport numpy as np\n\n\ndef plot_corr_matrix(dm_wide): # noqa: D103\n dm_corr = dm_wi"
},
{
"path": "src/bids/modeling/statsmodels.py",
"chars": 38333,
"preview": "\"\"\"BIDS-StatsModels functionality.\"\"\"\n\nimport fnmatch\nimport itertools\nimport json\nimport re\nimport warnings\nfrom collec"
},
{
"path": "src/bids/modeling/tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/bids/modeling/tests/test_automodel.py",
"chars": 2410,
"preview": "from itertools import chain\nfrom os.path import join\n\nimport pytest\n\nfrom bids.layout import BIDSLayout\nfrom bids.modeli"
},
{
"path": "src/bids/modeling/tests/test_hrf.py",
"chars": 1011,
"preview": "import numpy as np\n\nfrom ..hrf import compute_regressor\n\n\ndef test_duplicate_onsets():\n onset = [\n 16,\n "
},
{
"path": "src/bids/modeling/tests/test_model_spec.py",
"chars": 1998,
"preview": "import json\nfrom os.path import join\n\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nfrom bids.modeling.model_spe"
},
{
"path": "src/bids/modeling/tests/test_statsmodels.py",
"chars": 12330,
"preview": "from itertools import chain\nfrom os import path\nfrom os.path import join\n\nfrom nibabel.optpkg import optional_package\n\ng"
},
{
"path": "src/bids/modeling/tests/test_transformations.py",
"chars": 25549,
"preview": "# from bids.modeling.variables import load_variables\nimport math\nfrom os.path import join, sep\n\nimport numpy as np\nimpor"
},
{
"path": "src/bids/modeling/transformations/__init__.py",
"chars": 802,
"preview": "from .base import TransformerManager # noqa: D104\nfrom .compute import (\n And_,\n Convolve,\n Demean,\n Lag,\n "
},
{
"path": "src/bids/modeling/transformations/base.py",
"chars": 22553,
"preview": "\"\"\"Base Transformation class and associated utilities.\"\"\"\n\nimport inspect\nimport itertools\nimport re\nimport warnings\nfro"
},
{
"path": "src/bids/modeling/transformations/compute.py",
"chars": 12541,
"preview": "\"\"\"Transformations that primarily involve numerical computation on variables.\"\"\"\n\nimport math\n\nimport numpy as np\nimport"
},
{
"path": "src/bids/modeling/transformations/munge.py",
"chars": 10955,
"preview": "\"\"\"Transformations that primarily involve manipulating/munging variables into\nother formats or shapes.\n\"\"\"\n\nimport re\n\n#"
},
{
"path": "src/bids/reports/README.md",
"chars": 1065,
"preview": "## PyBIDS: Reports\n\nThe PyBIDS reports module generates publication-quality data acquisition descriptions from BIDS data"
},
{
"path": "src/bids/reports/__init__.py",
"chars": 71,
"preview": "from .report import BIDSReport # noqa: D104\n\n__all__ = ['BIDSReport']\n"
},
{
"path": "src/bids/reports/config/converters.json",
"chars": 726,
"preview": "{\n \"dir\": {\n \"i\": \"left to right\",\n \"i-\": \"right to left\",\n \"j\": \"posterior to anterior\",\n "
},
{
"path": "src/bids/reports/conftest.py",
"chars": 940,
"preview": "import json # noqa: D100\nimport warnings\nfrom importlib.resources import files\n\nimport pytest\n\nfrom bids.layout import "
},
{
"path": "src/bids/reports/parameters.py",
"chars": 10722,
"preview": "\"\"\"Functions for building strings for individual parameters.\"\"\"\n\nimport logging\nimport math\nimport os\nimport os.path as "
},
{
"path": "src/bids/reports/parsing.py",
"chars": 11824,
"preview": "\"\"\"Parsing functions for generating BIDSReports.\"\"\"\n\nimport logging\nimport warnings\n\nimport nibabel as nib\nfrom num2word"
},
{
"path": "src/bids/reports/report.py",
"chars": 8992,
"preview": "\"\"\"Generate publication-quality data acquisition methods section from BIDS dataset.\"\"\"\n\nimport json\nimport os.path as op"
},
{
"path": "src/bids/reports/tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/bids/reports/tests/test_parameters.py",
"chars": 7346,
"preview": "import nibabel as nib\nimport pytest\n\nfrom bids.reports import parameters\n\n\n@pytest.fixture(scope='module')\ndef testimg(t"
},
{
"path": "src/bids/reports/tests/test_parsing.py",
"chars": 2927,
"preview": "\"\"\"Tests for bids.reports.parsing.\"\"\"\n\nimport pytest\n\nfrom bids.reports import parsing\n\n\n@pytest.fixture\ndef testmeta():"
},
{
"path": "src/bids/reports/tests/test_report.py",
"chars": 2074,
"preview": "\"\"\"Tests for bids.reports.report.\"\"\"\nfrom collections import Counter\n\nfrom bids.reports import BIDSReport\n\n\ndef test_rep"
},
{
"path": "src/bids/reports/utils.py",
"chars": 1509,
"preview": "\"\"\"Generate publication-quality data acquisition methods section from BIDS dataset.\n\nUtilities to generate the MRI data "
},
{
"path": "src/bids/tests/__init__.py",
"chars": 79,
"preview": "from .utils import get_test_data_path\n\n__all__ = [\n 'get_test_data_path',\n]\n"
},
{
"path": "src/bids/tests/data/images/4d.bval",
"chars": 304,
"preview": "0 0 3000 3000 2000 3000 1000 3000 3000 2000 3000 1000 3000 3000 500 3000 2000 3000 3000 1000 3000 500 3000 3000 2000 300"
},
{
"path": "src/bids/tests/test_cli.py",
"chars": 2402,
"preview": "import os\n\nimport pytest\nfrom click.testing import CliRunner\n\nfrom bids.cli import cli\nfrom bids.tests import get_test_d"
},
{
"path": "src/bids/tests/test_config.py",
"chars": 2171,
"preview": "import json\nimport os\nimport tempfile\nimport warnings\n\nimport pytest\n\nimport bids\nfrom bids.config import reset_options\n"
},
{
"path": "src/bids/tests/utils.py",
"chars": 161,
"preview": "\"\"\"Test-related utilities\"\"\"\n\nfrom pathlib import Path\n\n\ndef get_test_data_path():\n return str(Path(__file__).parent."
},
{
"path": "src/bids/utils.py",
"chars": 7038,
"preview": "\"\"\"Utility functions.\"\"\"\n\nimport os\nimport re\nfrom functools import cache\nfrom pathlib import Path # noqa: F811\n\nfrom f"
},
{
"path": "src/bids/variables/__init__.py",
"chars": 455,
"preview": "# ruff: noqa: D104\nfrom .collections import BIDSRunVariableCollection, BIDSVariableCollection, merge_collections\nfrom .i"
},
{
"path": "src/bids/variables/collections.py",
"chars": 26410,
"preview": "\"\"\"Classes and functions related to the management of sets of BIDSVariables.\"\"\"\n\nimport fnmatch\nimport re\nimport warning"
},
{
"path": "src/bids/variables/entities.py",
"chars": 9868,
"preview": "\"\"\"Data classes for internal BIDS data hierarchy.\"\"\"\n\nfrom collections import namedtuple\nfrom itertools import chain\n\nim"
},
{
"path": "src/bids/variables/io.py",
"chars": 21563,
"preview": "\"\"\"Tools for reading/writing BIDS data files.\"\"\"\n\nimport json\nimport warnings\n\nimport numpy as np\nimport pandas as pd\n\nf"
},
{
"path": "src/bids/variables/tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/bids/variables/tests/test_collections.py",
"chars": 12909,
"preview": "from os.path import join\n\nimport numpy as np\nimport pytest\n\nfrom bids.layout import BIDSLayout\nfrom bids.tests import ge"
},
{
"path": "src/bids/variables/tests/test_entities.py",
"chars": 2811,
"preview": "from os.path import join\n\nimport pytest\n\nfrom bids.layout import BIDSLayout\nfrom bids.tests import get_test_data_path\nfr"
},
{
"path": "src/bids/variables/tests/test_io.py",
"chars": 3431,
"preview": "from os.path import join\n\nimport pytest\n\nfrom bids.layout import BIDSLayout\nfrom bids.tests import get_test_data_path\nfr"
},
{
"path": "src/bids/variables/tests/test_variables.py",
"chars": 9818,
"preview": "import json\nimport os\nimport uuid\nfrom os.path import join\n\nimport nibabel as nb\nimport numpy as np\nimport pandas as pd\n"
},
{
"path": "src/bids/variables/variables.py",
"chars": 26593,
"preview": "\"\"\"Classes for representing BIDS variables.\"\"\"\n\nimport math\nimport warnings\nfrom abc import ABCMeta, abstractmethod\nfrom"
},
{
"path": "tests/data/7t_trt/README",
"chars": 0,
"preview": ""
},
{
"path": "tests/data/7t_trt/dataset_description.json",
"chars": 55,
"preview": "{\n \"BIDSVersion\": \"1.0.0rc3\",\n \"Name\": \"7t_trt\"\n}"
},
{
"path": "tests/data/7t_trt/participants.tsv",
"chars": 482,
"preview": "participant_id\tsex\tage_at_first_scan_years\tnumber_of_scans_before\thandedness\nsub-01\tF\t29\t17\t100\nsub-02\tF\t23\t6\t100\nsub-03"
},
{
"path": "tests/data/7t_trt/sub-01/ses-1/fmap/sub-01_ses-1_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-01_ses-1_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-01/ses-1/fmap/sub-01_ses-1_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-01_ses-1_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-01/ses-1/func/sub-01_ses-1_task-rest_acq-fullbrain_run-1_bold.json",
"chars": 25,
"preview": "{\n \"EchoTime\": 0.020\n}"
},
{
"path": "tests/data/7t_trt/sub-01/ses-1/sub-01_ses-1_scans.tsv",
"chars": 406,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-01/ses-2/fmap/sub-01_ses-2_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-01_ses-2_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-01/ses-2/fmap/sub-01_ses-2_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-01_ses-2_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-01/ses-2/sub-01_ses-2_scans.tsv",
"chars": 407,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-01/sub-01_sessions.tsv",
"chars": 1914,
"preview": "session\tCCPT_avg_succ_RT\tCCPT_avg_FP_RT\tCCPT_avg_FN_RT\tCCPT_succ_count\tCCPT_FP_count\tCCPT_FN_count\tsubject_id\tpanas_chee"
},
{
"path": "tests/data/7t_trt/sub-02/ses-1/fmap/sub-02_ses-1_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-02_ses-1_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-02/ses-1/fmap/sub-02_ses-1_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-02_ses-1_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-02/ses-1/sub-02_ses-1_scans.tsv",
"chars": 404,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-02/ses-2/fmap/sub-02_ses-2_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-02_ses-2_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-02/ses-2/fmap/sub-02_ses-2_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-02_ses-2_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-02/ses-2/sub-02_ses-2_scans.tsv",
"chars": 399,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-02/sub-02_sessions.tsv",
"chars": 1918,
"preview": "session\tCCPT_avg_succ_RT\tCCPT_avg_FP_RT\tCCPT_avg_FN_RT\tCCPT_succ_count\tCCPT_FP_count\tCCPT_FN_count\tsubject_id\tpanas_chee"
},
{
"path": "tests/data/7t_trt/sub-03/ses-1/fmap/sub-03_ses-1_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-03_ses-1_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-03/ses-1/fmap/sub-03_ses-1_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-03_ses-1_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-03/ses-1/sub-03_ses-1_scans.tsv",
"chars": 399,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-03/ses-2/fmap/sub-03_ses-2_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-03_ses-2_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-03/ses-2/fmap/sub-03_ses-2_run-2_phasediff.json",
"chars": 197,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": [\"ses-2/func/sub-03_ses-2_task-rest_acq-fullbrain_run-2_bold.n"
},
{
"path": "tests/data/7t_trt/sub-03/ses-2/sub-03_ses-2_scans.tsv",
"chars": 399,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-03/sub-03-test.bval",
"chars": 0,
"preview": ""
},
{
"path": "tests/data/7t_trt/sub-03/sub-03_sessions.tsv",
"chars": 1910,
"preview": "session\tCCPT_avg_succ_RT\tCCPT_avg_FP_RT\tCCPT_avg_FN_RT\tCCPT_succ_count\tCCPT_FP_count\tCCPT_FN_count\tsubject_id\tpanas_chee"
},
{
"path": "tests/data/7t_trt/sub-04/ses-1/fmap/sub-04_ses-1_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-04_ses-1_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-04/ses-1/fmap/sub-04_ses-1_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-04_ses-1_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-04/ses-1/sub-04_ses-1_scans.tsv",
"chars": 397,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-04/ses-2/fmap/sub-04_ses-2_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-04_ses-2_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-04/ses-2/fmap/sub-04_ses-2_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-04_ses-2_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-04/ses-2/sub-04_ses-2_scans.tsv",
"chars": 396,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-04/sub-04_sessions.tsv",
"chars": 1908,
"preview": "session\tCCPT_avg_succ_RT\tCCPT_avg_FP_RT\tCCPT_avg_FN_RT\tCCPT_succ_count\tCCPT_FP_count\tCCPT_FN_count\tsubject_id\tpanas_chee"
},
{
"path": "tests/data/7t_trt/sub-05/ses-1/fmap/sub-05_ses-1_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-05_ses-1_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-05/ses-1/fmap/sub-05_ses-1_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-05_ses-1_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-05/ses-1/sub-05_ses-1_scans.tsv",
"chars": 397,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-05/ses-2/fmap/sub-05_ses-2_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-05_ses-2_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-05/ses-2/fmap/sub-05_ses-2_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-05_ses-2_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-05/ses-2/sub-05_ses-2_scans.tsv",
"chars": 397,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-05/sub-05_sessions.tsv",
"chars": 1916,
"preview": "session\tCCPT_avg_succ_RT\tCCPT_avg_FP_RT\tCCPT_avg_FN_RT\tCCPT_succ_count\tCCPT_FP_count\tCCPT_FN_count\tsubject_id\tpanas_chee"
},
{
"path": "tests/data/7t_trt/sub-06/ses-1/fmap/sub-06_ses-1_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-06_ses-1_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-06/ses-1/fmap/sub-06_ses-1_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-06_ses-1_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-06/ses-1/sub-06_ses-1_scans.tsv",
"chars": 397,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-06/ses-2/fmap/sub-06_ses-2_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-06_ses-2_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-06/ses-2/fmap/sub-06_ses-2_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-06_ses-2_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-06/ses-2/sub-06_ses-2_scans.tsv",
"chars": 396,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-06/sub-06_sessions.tsv",
"chars": 1904,
"preview": "session\tCCPT_avg_succ_RT\tCCPT_avg_FP_RT\tCCPT_avg_FN_RT\tCCPT_succ_count\tCCPT_FP_count\tCCPT_FN_count\tsubject_id\tpanas_chee"
},
{
"path": "tests/data/7t_trt/sub-07/ses-1/fmap/sub-07_ses-1_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-07_ses-1_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-07/ses-1/fmap/sub-07_ses-1_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-07_ses-1_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-07/ses-1/sub-07_ses-1_scans.tsv",
"chars": 395,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-07/ses-2/fmap/sub-07_ses-2_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-07_ses-2_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-07/ses-2/fmap/sub-07_ses-2_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-2/func/sub-07_ses-2_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-07/ses-2/sub-07_ses-2_scans.tsv",
"chars": 388,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
},
{
"path": "tests/data/7t_trt/sub-07/sub-07_sessions.tsv",
"chars": 1914,
"preview": "session\tCCPT_avg_succ_RT\tCCPT_avg_FP_RT\tCCPT_avg_FN_RT\tCCPT_succ_count\tCCPT_FP_count\tCCPT_FN_count\tsubject_id\tpanas_chee"
},
{
"path": "tests/data/7t_trt/sub-08/ses-1/fmap/sub-08_ses-1_run-1_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-08_ses-1_task-rest_acq-fullbrain_run-1_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-08/ses-1/fmap/sub-08_ses-1_run-2_phasediff.json",
"chars": 126,
"preview": "{\"EchoTime2\": 0.00702, \"EchoTime1\": 0.006, \"IntendedFor\": \"ses-1/func/sub-08_ses-1_task-rest_acq-fullbrain_run-2_bold.ni"
},
{
"path": "tests/data/7t_trt/sub-08/ses-1/sub-08_ses-1_scans.tsv",
"chars": 396,
"preview": "filename\tpositive\tnegative\tfuture\tpast\tmyself\tpeople\tsurroundings\tvigilance\timages\twords\tspecific_vague\tintrusive\nfunc/s"
}
]
// ... and 597 more files (download for full content)
About this extraction
This page contains the full source code of the bids-standard/pybids GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 797 files (33.2 MB), approximately 8.7M tokens, and a symbol index with 985 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.