Skip to content

Commit

Permalink
[ENH] BEP001 - New entity: flip (#672)
Browse files Browse the repository at this point in the history
* [ENH] Add flip entity

- Modify `echo` entity respectively

* revert entities.md and update the schema

* Use schema tools

* [FIX] Format field

* Update src/schema/entities.yaml

Co-authored-by: Chris Markiewicz <[email protected]>

* Update src/schema/entities.yaml

Co-authored-by: Chris Markiewicz <[email protected]>

* Wording suggestion by @tsalo

* [ENH] Add flip entity

- Modify `echo` entity respectively

* revert entities.md and update the schema

* Use schema tools

* [FIX] Format field

* Update src/schema/entities.yaml

Co-authored-by: Chris Markiewicz <[email protected]>

* Update src/schema/entities.yaml

Co-authored-by: Chris Markiewicz <[email protected]>

* Wording suggestion by @tsalo

Co-authored-by: Chris Markiewicz <[email protected]>
  • Loading branch information
agahkarakuzu and effigies authored Nov 23, 2020
1 parent addbdde commit ddc16b7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 14 deletions.
26 changes: 20 additions & 6 deletions src/99-appendices/09-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,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

0 comments on commit ddc16b7

Please sign in to comment.