Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] BEP001 - New entity: flip #672

Merged
merged 17 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions src/99-appendices/09-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ Full name: Phase-Encoding Direction
Format: `dir-<label>`

Definition: The `dir-<label>` key/value can be set to an arbitrary alphanumeric label
(for example, `dir-LR` or `dir-AP`) to distinguish different phase-encoding directions.
(for example, `dir-LR` or `dir-AP`) to distinguish different phase-encoding
directions.

## run

Expand Down Expand Up @@ -135,12 +136,26 @@ Full name: Echo

Format: `echo-<index>`

Definition: Multi-echo data MUST be split into one file per echo.
Each file shares the same name with the exception of the `_echo-<index>`
key/value.
Please note that the `<index>` denotes the number/index (in the form of a
nonnegative integer) of the echo not the echo time value which needs to be
stored in the field `EchoTime` of the separate JSON file.
Definition: If files belonging to an entity-linked file collection are acquired at different
echo times, the `_echo-<index>` key/value pair MUST be used to distinguish
individual files.
This entity represents the `EchoTime` metadata field. Please note that the `<index>`
denotes the number/index (in the form of a nonnegative integer), not the
`EchoTime` value which needs to be stored in the field `EchoTime` of the separate
JSON file.

## flip

Full name: Flip Angle

Format: `flip-<index>`

Definition: If files belonging to an entity-linked file collection are acquired at different
flip angles, the `_flip-<index>` key/value pair MUST be used to distinguish
individual files.
This entity represents the `FlipAngle` metadata field. Please note that the `<index>`
denotes the number/index (in the form of a nonnegative integer), not the `FlipAngle`
value which needs to be stored in the field `FlipAngle` of the separate JSON file.

## recording

Expand Down
24 changes: 18 additions & 6 deletions src/schema/entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,24 @@ echo:
name: Echo
entity: echo
description: |
Multi-echo data MUST be split into one file per echo.
Each file shares the same name with the exception of the `_echo-<index>`
key/value.
Please note that the `<index>` denotes the number/index (in the form of a
nonnegative integer) of the echo not the echo time value which needs to be
stored in the field `EchoTime` of the separate JSON file.
If files belonging to an entity-linked file collection are acquired at different
echo times, the `_echo-<index>` key/value pair MUST be used to distinguish
individual files.
This entity represents the `EchoTime` metadata field. Please note that the `<index>`
denotes the number/index (in the form of a nonnegative integer), not the
`EchoTime` value which needs to be stored in the field `EchoTime` of the separate
JSON file.
format: index
flip:
name: Flip Angle
entity: flip
description: |
If files belonging to an entity-linked file collection are acquired at different
flip angles, the `_flip-<index>` key/value pair MUST be used to distinguish
individual files.
This entity represents the `FlipAngle` metadata field. Please note that the `<index>`
denotes the number/index (in the form of a nonnegative integer), not the `FlipAngle`
value which needs to be stored in the field `FlipAngle` of the separate JSON file.
format: index
recording:
name: Recording
Expand Down
3 changes: 1 addition & 2 deletions tools/bids_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ def save_entities(schema_path, out_file):
fo.write('\n\n')
fo.write('Full name: {}'.format(entity_info['name']))
fo.write('\n\n')
fo.write('Format: `{}-<{}>`'.format(entity_info['entity'],
entity_info['format']))
fo.write('Format: `{}-<{}>`'.format(entity_info['entity'], entity_info['format']))
fo.write('\n\n')
fo.write('Definition: {}'.format(entity_info['description']))

Expand Down