Skip to content

Commit

Permalink
Add WCS to schemas (spacetelescope#351)
Browse files Browse the repository at this point in the history
* add a WCS object to schemas

* using gwcs schemas

* add gwcs tag to valid schemas

* use 1.0.0 version of the wcs tag

* fix test

* add another wcs tag

* use wild card with wcs schema

* fix test_schema

* add a change log

* another fix for tesst_schemas

* make wcs required
  • Loading branch information
nden authored Jan 22, 2024
1 parent 269b368 commit 2c6ffc4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

- Remove the unused ``variance-1.0.0`` schema. [#344]

- Add wcs tag to wfi_image and wfi_mosaic schemas. [#351]

0.18.0 (2023-11-06)
-------------------

Expand Down
7 changes: 6 additions & 1 deletion src/rad/resources/schemas/wfi_image-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ properties:
- $ref: common-1.0.0
- type: object
properties:
wcs:
title: WCS object
anyOf:
- tag: tag:stsci.edu:gwcs/wcs-*
- type: "null"
photometry:
tag: asdf://stsci.edu/datamodels/roman/tags/photometry-1.0.0
source_detection:
tag: asdf://stsci.edu/datamodels/roman/tags/source_detection-1.0.0
required: [photometry]
required: [photometry, wcs]
data:
title: Science data, excluding border reference pixels.
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
Expand Down
7 changes: 6 additions & 1 deletion src/rad/resources/schemas/wfi_mosaic-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ properties:
tag: asdf://stsci.edu/datamodels/roman/tags/photometry-1.0.0
resample:
tag: asdf://stsci.edu/datamodels/roman/tags/resample-1.0.0
required: [photometry]
wcs:
title: WCS object
anyOf:
- tag: tag:stsci.edu:gwcs/wcs-*
- type: "null"
required: [photometry, wcs]
data:
title: Science data, excluding border reference pixels.
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
Expand Down
4 changes: 4 additions & 0 deletions tests/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ def valid_tag_uris(manifest):
"tag:stsci.edu:asdf/unit/quantity-1.1.0",
"tag:stsci.edu:asdf/unit/unit-1.0.0",
"tag:astropy.org:astropy/units/unit-1.0.0",
"tag:stsci.edu:gwcs/wcs-1.0.0",
"tag:stsci.edu:gwcs/wcs-1.1.0",
"tag:stsci.edu:gwcs/wcs-1.2.0",
"tag:stsci.edu:gwcs/wcs-*",
]
)
return uris
Expand Down

0 comments on commit 2c6ffc4

Please sign in to comment.