diff --git a/.circleci/config.yml b/.circleci/config.yml index f884388e0a..823c9f3b9d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,7 +73,9 @@ jobs: - run: name: install dependencies command: | - apt-get update && apt install -y python3-pip + apt-get update && apt install -y python3-pip && apt install -y python3-venv + python3 -m venv env + source env/bin/activate python3 -m pip install --upgrade pip python3 -m pip install -r ~/project/requirements.txt python3 -m pip install ~/project/tools/schemacode/[render] @@ -83,6 +85,7 @@ jobs: - run: name: generate pdf version docs command: | + source env/bin/activate cd ~/project/pdf_build_src bash build_pdf.sh mv ~/project/pdf_build_src/bids-spec.pdf ~/project/bids-spec.pdf diff --git a/CODEOWNERS b/CODEOWNERS index ec56a06da0..54d256bb49 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,19 +5,15 @@ # Request for Review) please add your GitHub username next to the file you want to # monitor below. -# Add your GitHub name below to get notified about proposed releases -/src/CHANGES.md @chrisgorgo @sappelhoff @CPernet - # Individual sections -/src/01-common-principles.md @chrisgorgo @DimitriPapadopoulos -/src/04-modality-specific-files/01-magnetic-resonance-imaging-data.md @chrisgorgo -/src/04-modality-specific-files/03-electroencephalography.md @sappelhoff @ezemikulan -/src/04-modality-specific-files/04-intracranial-electroencephalography.md @ezemikulan -/src/05-derivatives/03-imaging.md @effigies -/src/05-derivatives/04-structural-derivatives.md @edickie @ahoopes -/src/05-derivatives/05-functional-derivatives.md @effigies -/src/05-derivatives/06-diffusion-derivatives.md @francopestilli @oesteban @Lestropie -/src/appendices/meg-file-formats.md @monkeyman192 +/src/common-principles.md @chrisgorgo @DimitriPapadopoulos +/src/modality-specific-files/magnetic-resonance-imaging-data.md @chrisgorgo +/src/modality-specific-files/electroencephalography.md @sappelhoff @ezemikulan +/src/modality-specific-files/intracranial-electroencephalography.md @ezemikulan +/src/derivatives/imaging.md @effigies +/src/derivatives/structural-derivatives.md @edickie @ahoopes +/src/derivatives/functional-derivatives.md @effigies +/src/derivatives/diffusion-derivatives.md @francopestilli @oesteban @Lestropie # The schema /src/schema/ @tsalo @erdalkaraca diff --git a/mkdocs.yml b/mkdocs.yml index 0bb0d57ede..cd0564aa27 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,48 @@ site_name: Brain Imaging Data Structure v1.7.1-dev site_url: https://bids-specification.readthedocs.io/en/stable/ +nav: + - The BIDS Specification: + - Introduction: introduction.md + - Common principles: common-principles.md + - Modality agnostic files: modality-agnostic-files.md + - Modality specific files: + - Magnetic Resonance Imaging: modality-specific-files/magnetic-resonance-imaging-data.md + - Magnetoencephalography: modality-specific-files/magnetoencephalography.md + - Electroencephalography: modality-specific-files/electroencephalography.md + - Intracranial Electroencephalography: modality-specific-files/intracranial-electroencephalography.md + - Task events: modality-specific-files/task-events.md + - Physiological and other continuous recordings: modality-specific-files/physiological-and-other-continuous-recordings.md + - Behavioral experiments (with no neural recordings): modality-specific-files/behavioral-experiments.md + - Genetic Descriptor: modality-specific-files/genetic-descriptor.md + - Positron Emission Tomography: modality-specific-files/positron-emission-tomography.md + - Microscopy: modality-specific-files/microscopy.md + - Near-Infrared Spectroscopy: modality-specific-files/near-infrared-spectroscopy.md + - Derivatives: + - BIDS Derivatives: derivatives/introduction.md + - Common data types and metadata: derivatives/common-data-types.md + - Imaging data types: derivatives/imaging.md + - Longitudinal and multi-site studies: longitudinal-and-multi-site-studies.md + - Glossary: glossary.md + - BIDS Extension Proposals: extensions.md + - Appendix: + - Contributors: appendices/contributors.md + - Licenses: appendices/licenses.md + - Entity table: appendices/entity-table.md + - Entities: appendices/entities.md + - File collections: appendices/file-collections.md + - Units: appendices/units.md + - Hierarchical Event Descriptors: appendices/hed.md + - MEG file formats: appendices/meg-file-formats.md + - MEG systems: appendices/meg-systems.md + - Coordinate systems: appendices/coordinate-systems.md + - Quantitative MRI: appendices/qmri.md + - Arterial Spin Labeling: appendices/arterial-spin-labeling.md + - Cross modality correspondence: appendices/cross-modality-correspondence.md + - Changelog: CHANGES.md + - The BIDS Starter Kit: + - Website: https://bids-standard.github.io/bids-starter-kit + - Tutorials: https://bids-standard.github.io/bids-starter-kit/tutorials/tutorials.html + - GitHub repository: https://github.com/bids-standard/bids-starter-kit theme: name: material favicon: images/favicon.png @@ -33,6 +76,25 @@ plugins: module_name: tools/mkdocs_macros_bids/main - redirects: redirect_maps: + '01-introduction.md': 'introduction.md' + '02-common-principles.md': 'common-principles.md' + '03-modality-agnostic-files.md': 'modality-agnostic-files.md' + '04-modality-specific-files/01-magnetic-resonance-imaging-data.md': 'modality-specific-files/magnetic-resonance-imaging-data.md' + '04-modality-specific-files/02-magnetoencephalography.md': 'modality-specific-files/magnetoencephalography.md' + '04-modality-specific-files/03-electroencephalography.md': 'modality-specific-files/electroencephalography.md' + '04-modality-specific-files/04-intracranial-electroencephalography.md': 'modality-specific-files/intracranial-electroencephalography.md' + '04-modality-specific-files/05-task-events.md': 'modality-specific-files/task-events.md' + '04-modality-specific-files/06-physiological-and-other-continuous-recordings.md': 'modality-specific-files/physiological-and-other-continuous-recordings.md' + '04-modality-specific-files/07-behavioral-experiments.md': 'modality-specific-files/behavioral-experiments.md' + '04-modality-specific-files/08-genetic-descriptor.md': 'modality-specific-files/genetic-descriptor.md' + '04-modality-specific-files/09-positron-emission-tomography.md': 'modality-specific-files/positron-emission-tomography.md' + '04-modality-specific-files/10-microscopy.md': 'modality-specific-files/microscopy.md' + '04-modality-specific-files/11-near-infrared-spectroscopy.md': 'modality-specific-files/near-infrared-spectroscopy.md' + '05-derivatives/01-introduction.md': 'derivatives/introduction.md' + '05-derivatives/02-common-data-types.md': 'derivatives/common-data-types.md' + '05-derivatives/03-imaging.md': 'derivatives/imaging.md' + '06-longitudinal-and-multi-site-studies.md': 'longitudinal-and-multi-site-studies.md' + '07-extensions.md': 'extensions.md' '99-appendices/14-glossary.md': 'glossary.md' '99-appendices/01-contributors.md': 'appendices/contributors.md' '99-appendices/02-licenses.md': 'appendices/licenses.md' @@ -49,46 +111,3 @@ plugins: '99-appendices/13-cross-modality-correspondence.md': 'appendices/cross-modality-correspondence.md' docs_dir: 'src' use_directory_urls: false -nav: - - The BIDS Specification: - - Introduction: 01-introduction.md - - Common principles: 02-common-principles.md - - Modality agnostic files: 03-modality-agnostic-files.md - - Modality specific files: - - Magnetic Resonance Imaging: 04-modality-specific-files/01-magnetic-resonance-imaging-data.md - - Magnetoencephalography: 04-modality-specific-files/02-magnetoencephalography.md - - Electroencephalography: 04-modality-specific-files/03-electroencephalography.md - - Intracranial Electroencephalography: 04-modality-specific-files/04-intracranial-electroencephalography.md - - Task events: 04-modality-specific-files/05-task-events.md - - Physiological and other continuous recordings: 04-modality-specific-files/06-physiological-and-other-continuous-recordings.md - - Behavioral experiments (with no neural recordings): 04-modality-specific-files/07-behavioral-experiments.md - - Genetic Descriptor: 04-modality-specific-files/08-genetic-descriptor.md - - Positron Emission Tomography: 04-modality-specific-files/09-positron-emission-tomography.md - - Microscopy: 04-modality-specific-files/10-microscopy.md - - Near-Infrared Spectroscopy: 04-modality-specific-files/11-near-infrared-spectroscopy.md - - Derivatives: - - BIDS Derivatives: 05-derivatives/01-introduction.md - - Common data types and metadata: 05-derivatives/02-common-data-types.md - - Imaging data types: 05-derivatives/03-imaging.md - - Longitudinal and multi-site studies: 06-longitudinal-and-multi-site-studies.md - - Glossary: glossary.md - - BIDS Extension Proposals: 07-extensions.md - - Appendix: - - Contributors: appendices/contributors.md - - Licenses: appendices/licenses.md - - Entity table: appendices/entity-table.md - - Entities: appendices/entities.md - - File collections: appendices/file-collections.md - - Units: appendices/units.md - - Hierarchical Event Descriptors: appendices/hed.md - - MEG file formats: appendices/meg-file-formats.md - - MEG systems: appendices/meg-systems.md - - Coordinate systems: appendices/coordinate-systems.md - - Quantitative MRI: appendices/qmri.md - - Arterial Spin Labeling: appendices/arterial-spin-labeling.md - - Cross modality correspondence: appendices/cross-modality-correspondence.md - - Changelog: CHANGES.md - - The BIDS Starter Kit: - - Website: https://bids-standard.github.io/bids-starter-kit - - Tutorials: https://bids-standard.github.io/bids-starter-kit/tutorials/tutorials.html - - GitHub repository: https://github.com/bids-standard/bids-starter-kit diff --git a/pdf_build_src/build_pdf.sh b/pdf_build_src/build_pdf.sh index 3f1f6a6bd6..51087a4d7f 100755 --- a/pdf_build_src/build_pdf.sh +++ b/pdf_build_src/build_pdf.sh @@ -4,20 +4,27 @@ set -eu # prepare the copied src directory +echo "Running: process_markdowns.py" python3 process_markdowns.py # copy pandoc_script into the temp src_copy directory +echo "Running: copying files to src_copy/src" cp pandoc_script.py header.tex cover.tex header_setup.tex src_copy/src # run pandoc_script from src_copy directory +echo "Running: cd to src_copy/src and run pandoc_script.py" pushd src_copy/src python3 pandoc_script.py + +echo "Running: Moving built spec PDF and log JSON to pdf_build_src" mv bids-spec.pdf ../.. mv bids-spec_pandoc_log.json ../.. popd # Do a check on the pandoc log file +echo "Running: check_pandoc_log.py" python3 check_pandoc_log.py # delete the duplicated src directory +echo "Running: remove unneeded src_copy directory" rm -rf src_copy diff --git a/src/CHANGES.md b/src/CHANGES.md index c888cf78e3..24bc407919 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -489,30 +489,30 @@ - Added support for MEG data (merged BEP008). - Added `SequenceName` field. -- Added support for describing events with Hierarchical Event Descriptors: [4.3 Task events](04-modality-specific-files/05-task-events.md). -- Added `VolumeTiming` and `AcquisitionDuration` fields: [4.1 Task (including resting state) imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). +- Added support for describing events with Hierarchical Event Descriptors: [4.3 Task events](modality-specific-files/task-events.md). +- Added `VolumeTiming` and `AcquisitionDuration` fields: [4.1 Task (including resting state) imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). - Added `DwellTime` field. ## [1.0.2](https://doi.org/10.5281/zenodo.3759801) (2017-07-18) -- Added support for high resolution (anatomical) T2star images: [4.1 Anatomy imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#anatomy-imaging-data). -- Added support for multiple defacing masks: [4.1 Anatomy imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#anatomy-imaging-data). -- Added optional key and metadata field for contrast enhanced structural scans: [4.1 Anatomy imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#anatomy-imaging-data). -- Added `DelayTime` field: [4.1 Task (including resting state) imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). -- Added support for multi echo BOLD data: [4.1 Task (including resting state) imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). +- Added support for high resolution (anatomical) T2star images: [4.1 Anatomy imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#anatomy-imaging-data). +- Added support for multiple defacing masks: [4.1 Anatomy imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#anatomy-imaging-data). +- Added optional key and metadata field for contrast enhanced structural scans: [4.1 Anatomy imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#anatomy-imaging-data). +- Added `DelayTime` field: [4.1 Task (including resting state) imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). +- Added support for multi echo BOLD data: [4.1 Task (including resting state) imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). ## [1.0.1](https://doi.org/10.5281/zenodo.3759788) (2017-03-13) -- Added `InstitutionName` field: [4.1 Task (including resting state) imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). -- Added `InstitutionAddress` field: [4.1 Task (including resting state) imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). -- Added `DeviceSerialNumber` field: [4.1 Task (including resting state) imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). -- Added `NumberOfVolumesDiscardedByUser` and `NumberOfVolumesDiscardedByScanner` field: [4.1 Task (including resting state) imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). -- Added `TotalReadoutTime to` functional images metadata list: [4.1 Task (including resting state) imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). +- Added `InstitutionName` field: [4.1 Task (including resting state) imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). +- Added `InstitutionAddress` field: [4.1 Task (including resting state) imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). +- Added `DeviceSerialNumber` field: [4.1 Task (including resting state) imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). +- Added `NumberOfVolumesDiscardedByUser` and `NumberOfVolumesDiscardedByScanner` field: [4.1 Task (including resting state) imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). +- Added `TotalReadoutTime to` functional images metadata list: [4.1 Task (including resting state) imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#task-including-resting-state-imaging-data). ## 1.0.1-rc1 -- Added T1 Rho maps: [4.1 Anatomy imaging data](04-modality-specific-files/01-magnetic-resonance-imaging-data.md#anatomy-imaging-data). -- Added support for phenotypic information split into multiple files: [3.2 Participant key file](03-modality-agnostic-files.md#participants-file). +- Added T1 Rho maps: [4.1 Anatomy imaging data](modality-specific-files/magnetic-resonance-imaging-data.md#anatomy-imaging-data). +- Added support for phenotypic information split into multiple files: [3.2 Participant key file](modality-agnostic-files.md#participants-file). - Added recommendations for multi site datasets. - Added `SoftwareVersions`. - Added `run-` to the phase encoding maps. Improved the description. diff --git a/src/appendices/arterial-spin-labeling.md b/src/appendices/arterial-spin-labeling.md index 35b7723806..4d1253eaab 100644 --- a/src/appendices/arterial-spin-labeling.md +++ b/src/appendices/arterial-spin-labeling.md @@ -73,7 +73,7 @@ Y. Suzuki and [OSIPI Task force 4.1: ASL lexicon milestone 1](https://osipi.gith ### (P)CASL sequence -![PCASL](../04-modality-specific-files/images/asl_pcasl_sequence.png) +![PCASL](../modality-specific-files/images/asl_pcasl_sequence.png) For (P)CASL, specifying the `LabelingDuration` and the `PostLabelingDelay` is required. The `LabelingDuration` is defined as the total duration of the labeling pulse train in seconds. @@ -89,7 +89,7 @@ whereas in case of `CASL`,the recommended `CASLType` field describes if a separa ### (P)CASL Labeling Pulses -![PCASL Labeling Pulses](../04-modality-specific-files/images/asl_pcasl_labeling_pulses.png) +![PCASL Labeling Pulses](../modality-specific-files/images/asl_pcasl_labeling_pulses.png) Several recommended metadata fields describe the labeling pulses of the labeling pulse train in PCASL. The `LabelingPulseAverageGradient` and the `LabelingPulseMaximumGradient` are the average labeling gradient @@ -101,7 +101,7 @@ and the delay between the peaks of the individual labeling pulses in millisecond ### PASL sequence -![PASL without Bolus Cut-off](../04-modality-specific-files/images/asl_pasl_boluscutoff_false.png) +![PASL without Bolus Cut-off](../modality-specific-files/images/asl_pasl_boluscutoff_false.png) For PASL, specifying the `PostLabelingDelay` is required. `PostLabelingDelay` is the time, in seconds, from the middle of the labeling pulse until the middle of @@ -109,7 +109,7 @@ the excitation pulse applied to the imaging slab (for 3D acquisition) or first s Additionally, the `BolusCutOffFlag` field is required, which is a boolean indicating if a bolus cut-off technique has been applied. -![PASL QUIPSSII](../04-modality-specific-files/images/asl_pasl_boluscutoff_true_quipssII.png) +![PASL QUIPSSII](../modality-specific-files/images/asl_pasl_boluscutoff_true_quipssII.png) When `BolusCutOffFlag` is set true for `PASL`, two additional metadata fields are required: `BolusCutOffTechnique` and `BolusCutOffDelay`. @@ -117,7 +117,7 @@ In this example, the `BolusCutOffTechnique`, which is the name of the technique is QUIPSS-II consisting of only one bolus cut-off pulse. The `BolusCutOffDelay` is therefore a number, representing the duration between the end of the labeling and the start of the bolus cut-off saturation pulse, in seconds. -![PASL Q2TIPS](../04-modality-specific-files/images/asl_pasl_boluscutoff_true_q2tips.png) +![PASL Q2TIPS](../modality-specific-files/images/asl_pasl_boluscutoff_true_q2tips.png) In this example, the `BolusCutOffTechnique` applied is Q2TIPS, consisting of multiple bolus cut-off pulses. In this case, only the duration of the first and last pulse should be specified in `BolusCutOffDelay`. @@ -127,4 +127,4 @@ In this case, only the duration of the first and last pulse should be specified The specification includes a dependency table, describing metadata field dependencies for ASL. This flowchart is intended to further clarify that table. -![ASL Flowchart](../04-modality-specific-files/images/asl_flowchart.png) +![ASL Flowchart](../modality-specific-files/images/asl_flowchart.png) diff --git a/src/appendices/coordinate-systems.md b/src/appendices/coordinate-systems.md index 91273835c7..e48615eae7 100644 --- a/src/appendices/coordinate-systems.md +++ b/src/appendices/coordinate-systems.md @@ -249,6 +249,6 @@ Please note that `space-scanner` SHOULD NOT be used, it is mentioned in this spe -[common file level metadata fields]: ../05-derivatives/02-common-data-types.md#common-file-level-metadata-fields +[common file level metadata fields]: ../derivatives/common-data-types.md#common-file-level-metadata-fields -[deprecated]: ../02-common-principles.md#definitions +[deprecated]: ../common-principles.md#definitions diff --git a/src/appendices/cross-modality-correspondence.md b/src/appendices/cross-modality-correspondence.md index f77598d147..c71a1c73f5 100644 --- a/src/appendices/cross-modality-correspondence.md +++ b/src/appendices/cross-modality-correspondence.md @@ -7,7 +7,7 @@ please pay specific attention to the format the MR images are in. It is important to note whether the MR images have been unwarped in order to correct for gradient non-linearities, indicated by the `NonlinearGradientCorrection` metadata field -(see [Magnetic Resonance Imaging Data - Sequence Specifics](../04-modality-specific-files/01-magnetic-resonance-imaging-data.md#sequence-specifics)). +(see [Magnetic Resonance Imaging Data - Sequence Specifics](../modality-specific-files/magnetic-resonance-imaging-data.md#sequence-specifics)). The reason for this is that the MRI needs to be corrected for nonlinear gradients in order to fit the accompanying PET scans for co-registration (Knudsen et al. 2020, [doi:10.1177/0271678X20905433](https://doi.org/10.1177/0271678X20905433); diff --git a/src/appendices/entities.md b/src/appendices/entities.md index 06101ce0d0..3e9605a9d8 100644 --- a/src/appendices/entities.md +++ b/src/appendices/entities.md @@ -4,7 +4,7 @@ This section compiles the entities (key-value pairs within file names) described specification, and describes each. A general introduction to entities is given in the section on -[filename structure](../02-common-principles.md#file-name-structure). +[filename structure](../common-principles.md#file-name-structure). The ordering of entities, and whether each is OPTIONAL, REQUIRED, or MUST NOT be specified for a given file type, is specified in the [Entity Table](entity-table.md). diff --git a/src/appendices/entity-table.md b/src/appendices/entity-table.md index f07c69982b..1a4ff0fffd 100644 --- a/src/appendices/entity-table.md +++ b/src/appendices/entity-table.md @@ -10,7 +10,7 @@ Entity formats indicate whether the value is alphanumeric (`