diff --git a/.github/workflows/publish_schema.yml b/.github/workflows/publish_schema.yml index c2528e02c4..532432e65e 100644 --- a/.github/workflows/publish_schema.yml +++ b/.github/workflows/publish_schema.yml @@ -4,6 +4,7 @@ on: push: branches: - "master" + - "maint/*" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -34,13 +35,27 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3 + - run: env + - run: git status + - name: Determine master/maintenance branch + id: branch + run: | + if [[ "$GITHUB_REF_NAME" = "master" ]]; then + echo "branch=jsr-dist" | tee -a $GITHUB_OUTPUT + echo "mode=dev" | tee -a $GITHUB_OUTPUT + else + echo "branch=jsr-maint" | tee -a $GITHUB_OUTPUT + echo "mode=maint" | tee -a $GITHUB_OUTPUT + fi - name: Install bidsschematools run: | pip install --upgrade tools/schemacode git clean -fxd tools/schemacode - - name: Checkout jsr-dist + - name: Checkout ${{ steps.branch.outputs.branch }} run: | - git checkout -t origin/jsr-dist + git checkout -t origin/$JSR_BRANCH + env: + JSR_BRANCH: ${{ steps.branch.outputs.branch }} - name: Regenerate schema run: bst export > schema.json - name: Regenerate context types @@ -54,16 +69,23 @@ jobs: bst export-metaschema > /tmp/schema.json npx --package=json-schema-to-typescript json2ts --unknownAny /tmp/schema.json > metaschema.ts - name: Determine next version + id: version run: | BASE=$( jq -r .schema_version schema.json ) - if [[ "$BASE" =~ ^[0-9]*.[0-9]*.[0-9]*$ ]]; then + if [[ "$BASE" =~ ^[0-9]*\.[0-9]*\.[0-9]*$ ]]; then # Release, so unconditionally update version VERSION=$BASE jq ".version = \"$VERSION\"" jsr.json > tmp.json && mv tmp.json jsr.json - else + echo release=true | tee -a $GITHUB_OUTPUT + elif [[ "$BASE" =~ ^[0-9]*\.[0-9]*\.[0-9]*\.post[0-9]*$ ]]; then + # Post-release, so replace .post with + for JSR semver + VERSION=${BASE/.post/+} + jq ".version = \"$VERSION\"" jsr.json > tmp.json && mv tmp.json jsr.json + echo release=true | tee -a $GITHUB_OUTPUT + elif [[ "$GITHUB_REF_NAME" = "master" ]]; then DENOVER=$( jq -r .version jsr.json ) # Get the reference of the latest commit to touch the schema directory - HASH=$( git log -n 1 --pretty=%h $REF -- src/schema ) + HASH=$( git log -n 1 --pretty=%h $GITHUB_REF -- src/schema ) if [[ $DENOVER =~ ^"$BASE".[0-9] ]]; then PREFIX=${DENOVER%+*} let SERIAL=1+${PREFIX#$BASE.} @@ -71,19 +93,22 @@ jobs: SERIAL=1 fi VERSION="$BASE.$SERIAL+$HASH" + echo release=true | tee -a $GITHUB_OUTPUT + else + echo release=false | tee -a $GITHUB_OUTPUT fi echo VERSION=$VERSION | tee -a $GITHUB_ENV - env: - REF: ${{ github.ref }} - - name: Check for changes, set version and commit + echo version=$VERSION | tee -a $GITHUB_OUTPUT + - name: Bump version (${{ steps.version.outputs.version }}) if changed + if: steps.version.outputs.release == 'true' run: | if ! git diff -s --exit-code; then jq ".version = \"$VERSION\"" jsr.json > tmp.json && mv tmp.json jsr.json git add jsr.json schema.json context.ts metaschema.ts - git commit -m "Update schema JSR distribution" + git commit -m "Update schema JSR distribution ($VERSION)" git push fi - name: Publish to JSR - if: success() + if: success() && steps.version.outputs.release == 'true' run: | npx jsr publish diff --git a/.github/workflows/schemacode_ci.yml b/.github/workflows/schemacode_ci.yml index cff7d01d54..1515459d5b 100644 --- a/.github/workflows/schemacode_ci.yml +++ b/.github/workflows/schemacode_ci.yml @@ -4,10 +4,13 @@ on: push: branches: - "master" + - "maint/*" tags: - "schema-*" pull_request: branches: + - "master" + - "maint/*" - "*" concurrency: @@ -36,7 +39,9 @@ jobs: run: pip install --upgrade tools/schemacode[all] if: ${{ startsWith(github.ref, 'refs/tags/schema-') }} - name: "Build archive on tag" - run: pytest tools/schemacode/bidsschematools -k make_archive + run: | + python -m pytest -k make_archive + working-directory: tools/schemacode env: BIDSSCHEMATOOLS_RELEASE: 1 if: ${{ startsWith(github.ref, 'refs/tags/schema-') }} @@ -87,14 +92,15 @@ jobs: - name: "Run tests" run: | - python -m pytest -vs --pyargs bidsschematools -m "not validate_schema" \ - --cov-append --cov-report=xml --cov=bidsschematools --doctest-modules + python -m pytest -vs --doctest-modules -m "not validate_schema" \ + --cov-append --cov-report=xml --cov-report=term --cov=src/bidsschematools + working-directory: tools/schemacode - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: unit_${{ matrix.os }}_${{ matrix.python-version }} - path: coverage.xml + path: tools/schemacode/coverage.xml if: success() publish: @@ -143,13 +149,16 @@ jobs: python -m pip install -e ./tools/schemacode[all] - name: Run schema validation tests - run: python -m pytest --pyargs bidsschematools -m "validate_schema" --cov-append --cov-report=xml --cov=bidsschematools + run: | + python -m pytest -vs --doctest-modules -m "not validate_schema" \ + --cov-append --cov-report=xml --cov-report=term --cov=src/bidsschematools + working-directory: tools/schemacode - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: schema_validation - path: coverage.xml + path: tools/schemacode/coverage.xml if: success() upload_to_codecov: @@ -164,7 +173,7 @@ jobs: uses: actions/download-artifact@v4 - name: Upload to CodeCov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} # not required but might help API rate limits fail_ci_if_error: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1fdac33ecb..4a14492abd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks ci: skip: [shellcheck] -exclude: 'tools/schemacode/bidsschematools/tests/data/broken_dataset_description.json' +exclude: 'tools/schemacode/src/bidsschematools/tests/data/broken_dataset_description.json' repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 @@ -10,13 +10,14 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml + args: [--unsafe] - id: check-json - id: check-toml - id: check-ast - id: check-added-large-files - id: check-case-conflict - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.30.0 hooks: - id: check-dependabot - id: check-github-workflows @@ -73,7 +74,7 @@ repos: - id: codespell args: ["--config=.codespellrc", "--dictionary=-", "--dictionary=.codespell_dict"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.12.1 + rev: v1.14.1 hooks: - id: mypy # Sync with project.optional-dependencies.typing @@ -89,7 +90,7 @@ repos: - types-jsonschema - jsonschema - httpx - args: ["tools/schemacode/bidsschematools"] + args: ["tools/schemacode/src"] pass_filenames: false - repo: https://github.com/koalaman/shellcheck-precommit rev: v0.10.0 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 2b3c46fdb8..0000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,49 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at `bids.maintenance+coc@gmail.com`. -The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. -The project team is obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5d9cd972c..a6f712ebf1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,10 +8,10 @@ We hope that these guidelines are designed to make it as easy as possible to get If you have any questions that aren't discussed below, please let us know by [opening an issue](https://github.com/bids-standard/bids-specification/issues/new). -If you are not familiar with Git ansd GitHub, +If you are not familiar with Git and GitHub, check our [generic contributing guidelines](https://bids-website.readthedocs.io/en/latest/collaboration/bids_github/CONTRIBUTING.html). -If you want to contribute to the BIDS website, +If you want to contribute to the BIDS specification, make sure you also read the instructions below. ## Table of contents diff --git a/README.md b/README.md index 40c29b6b81..9ea89b0cd6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ [![Validation](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml/badge.svg)](https://github.com/bids-standard/bids-specification/actions/workflows/validation.yml) [![CircleCI](https://circleci.com/gh/bids-standard/bids-specification.svg?style=shield)](https://circleci.com/gh/bids-standard/bids-specification) +[![Bluesky Follow](https://img.shields.io/badge/bluesky-Follow_bidsstandard-blue?logo=bluesky)](https://bsky.app/profile/bidsstandard.bsky.social) +![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCxZUcYfd_nvIVWAbzRB1tlw) [![Mastodon Follow](https://img.shields.io/mastodon/follow/109520103085644521?domain=https%3A%2F%2Ffosstodon.org%2F)](https://fosstodon.org/@bidsstandard) [![@BIDSstandard](https://img.shields.io/twitter/follow/bidsstandard.svg?style=social)](https://x.com/BIDSstandard) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3686061.svg)](https://doi.org/10.5281/zenodo.3686061) diff --git a/Release_Protocol.md b/Release_Protocol.md index c520fec053..f9857e715d 100644 --- a/Release_Protocol.md +++ b/Release_Protocol.md @@ -116,6 +116,10 @@ You can also make use of the `exclude-from-changelog` label. Adding this label to PRs in the GitHub web interface will prevent the changelog generator from considering this item for inclusion in the changelog. +#### 2.5 Update the schema + +Add the new version to `src/schema/meta/versions.yaml`. + ### 3. Commit changes and push to upstream By pushing `rel/` branches to the main repository, the chances of continuous integration diff --git a/mkdocs.yml b/mkdocs.yml index 056673ae9e..ef36d6eb5c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -95,13 +95,21 @@ extra: link: https://www.instagram.com/bidsstandard/ - icon: fontawesome/brands/youtube link: https://www.youtube.com/channel/UCxZUcYfd_nvIVWAbzRB1tlw + analytics: + provider: google + property: G-SBWH6YNMPX extra_javascript: - js/jquery-3.6.0.min.js markdown_extensions: - toc: anchorlink: true - - pymdownx.superfences + - pymdownx.superfences: + preserve_tabs: true + custom_fences: + - name: tsv + class: tsv + format: !!python/name:bidsschematools.render.tsv.fence - admonition - pymdownx.details plugins: @@ -113,6 +121,7 @@ plugins: - css/watermark.css - macros: module_name: tools/mkdocs_macros_bids/main + on_error_fail: true - redirects: redirect_maps: "01-introduction.md": "introduction.md" diff --git a/pdf_build_src/pandoc_script.py b/pdf_build_src/pandoc_script.py index e9710482ab..b425fbeb50 100644 --- a/pdf_build_src/pandoc_script.py +++ b/pdf_build_src/pandoc_script.py @@ -39,7 +39,7 @@ def _flatten_values(lst): fname_mkdocs_yml = _find(HERE, "mkdocs.yml") with open(fname_mkdocs_yml, "r") as stream: - mkdocs_yml = yaml.safe_load(stream) + mkdocs_yml = yaml.load(stream, yaml.Loader) sections = mkdocs_yml["nav"][0]["The BIDS Specification"] diff --git a/readthedocs.yml b/readthedocs.yml index 5611c59505..1893f88d18 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,12 +1,32 @@ version: 2 build: - os: ubuntu-22.04 - apt_packages: - - jq + os: ubuntu-lts-latest tools: - python: "3.11" + python: latest jobs: + # The *_create_environment and post_install steps replace RTD's virtual environment + # steps with uv, a much faster alternative to virtualenv+pip. + pre_create_environment: + # Install jq and uv + - asdf plugin add jq https://github.com/lsanwick/asdf-jq.git + - asdf plugin add uv https://github.com/asdf-community/asdf-uv.git + - asdf install jq latest + - asdf install uv latest + - asdf global jq latest + - asdf global uv latest + # Turn `python -m virtualenv` into `python -c pass` + - truncate --size 0 $( dirname $( uv python find ) )/../lib/python3*/site-packages/virtualenv/__main__.py + post_create_environment: + - uv venv $READTHEDOCS_VIRTUALENV_PATH + # Turn `python -m pip` into `python -c pass` + - truncate --size 0 $( ls -d $READTHEDOCS_VIRTUALENV_PATH/lib/python3* )/site-packages/pip.py + # post_install replaces the top-level {python: {install: [{requirements: requirements.txt}]}} + post_install: + # Use a cache dir in the same mount to halve the install time + - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install --cache-dir $READTHEDOCS_VIRTUALENV_PATH/../../uv_cache -r requirements.txt + # Normal pre-build step to inject schema.json into the source directory + # so schema.json is hosted alongside the specification documents pre_build: - bst -v export --output src/schema.json - tools/no-bad-schema-paths.sh src/schema.json # README.md might need fixing @@ -14,7 +34,3 @@ build: mkdocs: configuration: mkdocs.yml fail_on_warning: true - -python: - install: - - requirements: requirements.txt diff --git a/src/appendices/arterial-spin-labeling.md b/src/appendices/arterial-spin-labeling.md index 842bde8d80..ce182ca0d9 100644 --- a/src/appendices/arterial-spin-labeling.md +++ b/src/appendices/arterial-spin-labeling.md @@ -26,7 +26,7 @@ and the exact volume_type series should be specified in the `*_aslcontext.tsv`. Example of `*_aslcontext.tsv`: -```Text +```tsv volume_type control label @@ -44,7 +44,7 @@ In this case, the `deltam` should be included in the `*_asl.nii[.gz]` and specif Example of `*_aslcontext.tsv`: -```Text +```tsv volume_type deltam m0scan @@ -58,7 +58,7 @@ the `cbf` should be included in the `*_asl.nii[.gz]` and specified in the `*_asl Example of `*_aslcontext.tsv`: -```Text +```tsv volume_type cbf m0scan diff --git a/src/appendices/hed.md b/src/appendices/hed.md index 4582356ee5..830c132120 100644 --- a/src/appendices/hed.md +++ b/src/appendices/hed.md @@ -44,10 +44,10 @@ meanings in associated JSON sidecar files (`events.json`). (`trial_type`, `response_time`, and `stim_file`) in addition to the required `onset` and `duration` columns. -```Text -onset duration trial_type response_time stim_file -1.2 0.6 go 1.435 images/red_square.jpg -5.6 0.6 stop n/a images/blue_square.jpg +```tsv +onset duration trial_type response_time stim_file +1.2 0.6 go 1.435 images/red_square.jpg +5.6 0.6 stop n/a images/blue_square.jpg ``` The `trial_type` column in the above example contains a limited number of distinct diff --git a/src/common-principles.md b/src/common-principles.md index 4e5509ac7b..9c2ff6c9f1 100644 --- a/src/common-principles.md +++ b/src/common-principles.md @@ -202,6 +202,11 @@ as the labels would collide on a case-insensitive filesystem. Additionally, because the suffix `eeg` is defined, then the suffix `EEG` will not be added to future versions of the standard. +### Dotfiles + +Files and directories starting with a dot (`.`) are reserved for system use and no valid recognized BIDS file or directory can start with a `.`. +Any file or directory starting with a `.` present in a BIDS dataset is considered hidden and not subject to BIDS validation. + ## Uniqueness of data files Data files MUST be uniquely identified by BIDS path components @@ -489,8 +494,8 @@ first letter in lower case (for example, `variable_name`, not `Variable_name`). Column names defined in the header MUST be separated with tabs as for the data contents. Furthermore, column names MUST NOT be blank (that is, an empty string) and MUST NOT be duplicated within a single TSV file. -String values containing tabs MUST be escaped using double quotes. Missing and non-applicable values MUST be coded as `n/a`. +String values containing tabs MUST be escaped using double quotes. Numerical values MUST employ the dot (`.`) as decimal separator and MAY be specified in scientific notation, using `e` or `E` to separate the significand from the exponent. diff --git a/src/derivatives/common-data-types.md b/src/derivatives/common-data-types.md index 63f0809c55..084fca8eb4 100644 --- a/src/derivatives/common-data-types.md +++ b/src/derivatives/common-data-types.md @@ -328,11 +328,12 @@ A guide for using macros can be found at Contents of the `descriptions.tsv` file: -| desc_id | description | -| ------- | ----------------------------------------------------------------------------------------------- | -| Filt | low-pass filtered at 30Hz | -| FiltDs | low-pass filtered at 30Hz, downsampled to 250Hz | -| preproc | low-pass filtered at 30Hz, downsampled to 250Hz, and rereferenced to a common average reference | +```tsv +desc_id description +Filt low-pass filtered at 30Hz +FiltDs low-pass filtered at 30Hz, downsampled to 250Hz +preproc low-pass filtered at 30Hz, downsampled to 250Hz, and rereferenced to a common average reference +``` diff --git a/src/derivatives/imaging.md b/src/derivatives/imaging.md index 4ba975824f..3a3b4bc280 100644 --- a/src/derivatives/imaging.md +++ b/src/derivatives/imaging.md @@ -229,7 +229,7 @@ vertices) or a combined volume/surface space. If the segmentation can be generated in different ways, for example, following an atlas segmentation, -the [`seg` entity](../appendices/entities.md#segmentation) MAY be used to +the [`seg` entity](../appendices/entities.md#seg) MAY be used to distinguish the name of the segmentation used. The following section describes discrete and probabilistic segmentations of @@ -293,7 +293,7 @@ In this case, the mask suffix MUST be used, the [`label` entity](../appendices/entities.md#label) SHOULD be used to specify the masked structure (see [Common image-derived labels](#common-image-derived-labels)), -and the [`seg` entity](../appendices/entities.md#segmentation) SHOULD be defined. +and the [`seg` entity](../appendices/entities.md#seg) SHOULD be defined. For example: diff --git a/src/longitudinal-and-multi-site-studies.md b/src/longitudinal-and-multi-site-studies.md index b64ae016e8..48960366ef 100644 --- a/src/longitudinal-and-multi-site-studies.md +++ b/src/longitudinal-and-multi-site-studies.md @@ -65,7 +65,7 @@ A guide for using macros can be found at `sub-control01_sessions.tsv` content: -```Text +```tsv session_id acq_time systolic_blood_pressure ses-predrug 2009-06-15T13:45:30 120 ses-postdrug 2009-06-16T13:45:30 100 diff --git a/src/modality-agnostic-files.md b/src/modality-agnostic-files.md index b93ee17638..b88c264856 100644 --- a/src/modality-agnostic-files.md +++ b/src/modality-agnostic-files.md @@ -246,11 +246,11 @@ available"). `participants.tsv` example: -```Text -participant_id age sex handedness group -sub-01 34 M right read -sub-02 12 F right write -sub-03 33 F n/a read +```tsv +participant_id age sex handedness group +sub-01 34 M right read +sub-02 12 F right write +sub-03 33 F n/a read ``` It is RECOMMENDED to accompany each `participants.tsv` file with a sidecar @@ -320,13 +320,13 @@ and a guide for using macros can be found at `samples.tsv` example: -```Text -sample_id participant_id sample_type derived_from -sample-01 sub-01 tissue n/a -sample-02 sub-01 tissue sample-01 -sample-03 sub-01 tissue sample-01 -sample-04 sub-02 tissue n/a -sample-05 sub-02 tissue n/a +```tsv +sample_id participant_id sample_type derived_from +sample-01 sub-01 tissue n/a +sample-02 sub-01 tissue sample-01 +sample-03 sub-01 tissue sample-01 +sample-04 sub-02 tissue n/a +sample-05 sub-02 tissue n/a ``` It is RECOMMENDED to accompany each `samples.tsv` file with a sidecar @@ -486,7 +486,7 @@ All such included additional fields SHOULD be documented in an accompanying Example `_scans.tsv`: -```Text +```tsv filename acq_time func/sub-control01_task-nback_bold.nii.gz 1877-06-15T13:45:30 func/sub-control01_task-motor_bold.nii.gz 1877-06-15T13:55:33 @@ -522,7 +522,7 @@ and a guide for using macros can be found at `_sessions.tsv` example: -```Text +```tsv session_id acq_time systolic_blood_pressure ses-predrug 2009-06-15T13:45:30 120 ses-postdrug 2009-06-16T13:45:30 100 diff --git a/src/modality-specific-files/behavioral-experiments.md b/src/modality-specific-files/behavioral-experiments.md index 70fa5ae3a6..cfb8264ce3 100644 --- a/src/modality-specific-files/behavioral-experiments.md +++ b/src/modality-specific-files/behavioral-experiments.md @@ -44,7 +44,7 @@ and a guide for using macros can be found at In addition to the metadata that is either: -- RECOMMENDED for sidecar JSON files for [tabular data](../common-principles.md#tabular-data), or +- RECOMMENDED for sidecar JSON files for [tabular data](../common-principles.md#tabular-files), or - REQUIRED for some data that can be found in the `beh` directory (for example `SamplingFrequency` and `StartTime` for `*_.tsv.gz` files), @@ -78,7 +78,7 @@ A guide for using macros can be found at ## Example `_beh.tsv` -```Text +```tsv trial response response_time stim_file congruent red 1.435 images/word-red_color-red.jpg incongruent red 1.739 images/word-red_color-blue.jpg diff --git a/src/modality-specific-files/electroencephalography.md b/src/modality-specific-files/electroencephalography.md index 25a0fe72a2..cb765c9549 100644 --- a/src/modality-specific-files/electroencephalography.md +++ b/src/modality-specific-files/electroencephalography.md @@ -272,14 +272,14 @@ Examples of free-form text for field `description` ### Example `*_channels.tsv` -See also the corresponding [`electrodes.tsv` example](#example-electrodestsv). - -```Text -name type units description reference status status_description -VEOG VEOG uV left eye VEOG-, VEOG+ good n/a -FDI EMG uV left first dorsal interosseous FDI-, FDI+ good n/a -Cz EEG uV n/a REF bad high frequency noise -UADC001 MISC n/a envelope of audio signal n/a good n/a +See also the corresponding [`electrodes.tsv` example](#example-_electrodestsv). + +```tsv +name type units description reference status status_description +VEOG VEOG uV left eye VEOG-, VEOG+ good n/a +FDI EMG uV left first dorsal interosseous FDI-, FDI+ good n/a +Cz EEG uV n/a REF bad high frequency noise +UADC001 MISC n/a envelope of audio signal n/a good n/a ``` ## Electrodes description (`*_electrodes.tsv`) @@ -316,17 +316,17 @@ If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to in ### Example `*_electrodes.tsv` -See also the corresponding [`electrodes.tsv` example](#example-channelstsv). - -```Text -name x y z type material -VEOG+ n/a n/a n/a cup Ag/AgCl -VEOG- n/a n/a n/a cup Ag/AgCl -FDI+ n/a n/a n/a cup Ag/AgCl -FDI- n/a n/a n/a cup Ag/AgCl -GND -0.0707 0.0000 -0.0707 clip-on Ag/AgCl -Cz 0.0000 0.0714 0.0699 cup Ag/AgCl -REF -0.0742 -0.0200 -0.0100 cup Ag/AgCl +See also the corresponding [`channels.tsv` example](#example-_channelstsv). + +```tsv +name x y z type material +VEOG+ n/a n/a n/a cup Ag/AgCl +VEOG- n/a n/a n/a cup Ag/AgCl +FDI+ n/a n/a n/a cup Ag/AgCl +FDI- n/a n/a n/a cup Ag/AgCl +GND -0.0707 0.0000 -0.0707 clip-on Ag/AgCl +Cz 0.0000 0.0714 0.0699 cup Ag/AgCl +REF -0.0742 -0.0200 -0.0100 cup Ag/AgCl ``` The [`acq-