Skip to content

Commit

Permalink
Schema nonsense
Browse files Browse the repository at this point in the history
  • Loading branch information
SolarDrew committed Jan 30, 2025
1 parent 28f19ab commit 3601236
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dkist/io/asdf/resources/manifests/dkist-1.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: ASDF schemas and tags for DKIST classes.
tags:
- schema_uri: "asdf://dkist.nso.edu/schemas/file_manager-1.0.0"
tag_uri: "asdf://dkist.nso.edu/tags/file_manager-1.0.0"
- schema_uri: "asdf://dkist.nso.edu/schemas/dataset-1.1.0"
- schema_uri: "asdf://dkist.nso.edu/schemas/dataset-1.2.0"
tag_uri: "asdf://dkist.nso.edu/tags/dataset-1.2.0"
- schema_uri: "asdf://dkist.nso.edu/schemas/tiled_dataset-1.0.0"
tag_uri: "asdf://dkist.nso.edu/tags/tiled_dataset-1.0.0"
49 changes: 49 additions & 0 deletions dkist/io/asdf/resources/schemas/dataset-1.2.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "asdf://dkist.nso.edu/schemas/dataset-1.2.0"

title: |
A DKIST Level 1 Dataset object.
description:
The container for a distributed dataset object.

type: object
properties:
data:
tag: "asdf://dkist.nso.edu/tags/file_manager-1.0.0"

wcs:
description: The coordinate system for the complete dataset.
tag: "tag:stsci.edu:gwcs/wcs-1.*"

mask:
tag: "tag:stsci.edu:asdf/core/ndarray-1.*"

unit:
tag: "tag:stsci.edu:asdf/unit/unit-1.*"

meta:
description: Dataset metadata, describing the whole dataset.
type: object
properties:
headers:
description: A table of all the headers for the constituent files.
anyOf:
- tag: "tag:astropy.org:astropy/table/table-1.*"
- null: true

quality:
description: A copy of the quality report of these observations.
type: object

inventory:
description: A copy of the inventory record for this dataset.
type: object

required: [headers, inventory]
additionalProperties: true

required: [data, wcs, unit]
additionalProperties: true
...
29 changes: 29 additions & 0 deletions dkist/io/asdf/resources/schemas/tiled_dataset-1.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "asdf://dkist.nso.edu/schemas/tiled_dataset-1.1.0"

title: |
A DKIST Tiled Dataset object.
description:
The container for a set of Dataset objects.

type: object
properties:
datasets:
description: A nested structure of Dataset objects
type: array
items:
type: array
items:
- tag: "asdf://dkist.nso.edu/tags/dataset-1.*"
inventory:
description: A copy of the inventory record for this dataset.
type: object
headers:
description: A table of all the headers for the constituent files.
tag: "tag:astropy.org:astropy/table/table-1.*"

required: [datasets, inventory, headers]
additionalProperties: false
...
2 changes: 2 additions & 0 deletions dkist/io/level_1_dataset_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ properties:
- $ref: "asdf://dkist.nso.edu/schemas/dataset-0.3.0"
- $ref: "asdf://dkist.nso.edu/schemas/dataset-1.0.0"
- $ref: "asdf://dkist.nso.edu/schemas/dataset-1.1.0"
- $ref: "asdf://dkist.nso.edu/schemas/dataset-1.2.0"
- $ref: "asdf://dkist.nso.edu/schemas/tiled_dataset-0.1.0"
- $ref: "asdf://dkist.nso.edu/schemas/tiled_dataset-1.0.0"
- $ref: "asdf://dkist.nso.edu/schemas/tiled_dataset-1.1.0"

required: [dataset]
additionalProperties: true

0 comments on commit 3601236

Please sign in to comment.