Skip to content

Commit d66c823

Browse files
committed
schema: Factor out common PET and MRS entities
1 parent 4d97fd2 commit d66c823

File tree

4 files changed

+21
-24
lines changed

4 files changed

+21
-24
lines changed

src/schema/meta/templates.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ raw:
4141
direction: optional
4242
part: optional
4343

44+
pet:
45+
entities:
46+
$ref: meta.templates.raw.base.entities
47+
task: optional
48+
tracer: optional
49+
reconstruction: optional
50+
run: optional
51+
52+
mrs:
53+
entities:
54+
$ref: meta.templates.raw.recording.entities
55+
task: optional
56+
nucleus: optional
57+
volume: optional
58+
reconstruction: optional
59+
4460
# Entities that apply to most derivative files
4561
# Include thus:
4662
#

src/schema/rules/files/raw/events.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,11 @@ events__pet:
3939
datatypes:
4040
- pet
4141
entities:
42-
$ref: meta.templates.raw.task.entities
43-
tracer: optional
44-
reconstruction: optional
45-
# Most events allow acquisition, PET doesn't
46-
acquisition: null
42+
$ref: meta.templates.raw.pet.entities
4743

4844
events__mrs:
4945
$ref: rules.files.raw.events.events
5046
datatypes:
5147
- mrs
5248
entities:
53-
$ref: rules.files.raw.events.events.entities
54-
reconstruction: optional
55-
nucleus: optional
56-
volume: optional
49+
$ref: meta.templates.raw.mrs.entities

src/schema/rules/files/raw/mrs.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ mrs:
1212
datatypes:
1313
- mrs
1414
entities:
15-
$ref: meta.templates.raw.recording.entities
16-
task: optional
17-
reconstruction: optional
15+
$ref: meta.templates.raw.mrs.entities
1816
echo: optional
1917
inversion: optional
20-
nucleus: optional
21-
volume: optional

src/schema/rules/files/raw/pet.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ pet:
99
datatypes:
1010
- pet
1111
entities:
12-
$ref: meta.templates.raw.base.entities
13-
task: optional
14-
tracer: optional
15-
reconstruction: optional
16-
run: optional
12+
$ref: meta.templates.raw.pet.entities
1713

1814
blood:
1915
suffixes:
@@ -24,9 +20,5 @@ blood:
2420
datatypes:
2521
- pet
2622
entities:
27-
$ref: meta.templates.raw.base.entities
28-
task: optional
29-
tracer: optional
30-
reconstruction: optional
31-
run: optional
23+
$ref: meta.templates.raw.pet.entities
3224
recording: required

0 commit comments

Comments
 (0)