Skip to content

Commit

Permalink
RAD-122: L3 DataModel Schemas (#241)
Browse files Browse the repository at this point in the history
* Save.

* Initial implementation.

* hanged context to unsigned int.

* Addressed PR comment.

* Rebase and update Changelog.

* Simplified units to only astropy supported ones.

---------

Co-authored-by: Nadia Dencheva <[email protected]>
  • Loading branch information
PaulHuwe and nden authored May 12, 2023
1 parent 145b0b4 commit 9e567b8
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
- Remove the unused ``pixelarea-1.0.0`` schema, which was replaced by the
``reference_files/pixelarea-1.0.0`` schema. [#245]

- Added support for level 3 mosaic model. [#241]

- Add further restrictions to the ``patternProperties`` keywords in the
``wfi_img_photom`` schema. [#254]


0.14.2 (2023-03-31)
-------------------

Expand Down
14 changes: 12 additions & 2 deletions src/rad/resources/manifests/datamodels-1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ tags:
title: Wfi level 2 image information
description: |-
Wfi level 2 image information
- tag_uri: asdf://stsci.edu/datamodels/roman/tags/wfi_mosaic-1.0.0
schema_uri: asdf://stsci.edu/datamodels/roman/schemas/wfi_mosaic-1.0.0
title: Wfi level 3 mosiac information
description: |-
Wfi level 3 mosaic information
- tag_uri: asdf://stsci.edu/datamodels/roman/tags/wfi_mode-1.0.0
schema_uri: asdf://stsci.edu/datamodels/roman/schemas/wfi_mode-1.0.0
title: Roman WFI Instrument Mode
Expand All @@ -47,9 +52,9 @@ tags:
Exposure information
- tag_uri: asdf://stsci.edu/datamodels/roman/tags/program-1.0.0
schema_uri: asdf://stsci.edu/datamodels/roman/schemas/program-1.0.0
title: Xprogram information
title: Program information
description: |-
Xprogram information
Program information
- tag_uri: asdf://stsci.edu/datamodels/roman/tags/observation-1.0.0
schema_uri: asdf://stsci.edu/datamodels/roman/schemas/observation-1.0.0
title: Observation information
Expand Down Expand Up @@ -115,6 +120,11 @@ tags:
title: Calibration Step status information
description: |-
Calibration Step status information
- tag_uri: asdf://stsci.edu/datamodels/roman/tags/resample-1.0.0
schema_uri: asdf://stsci.edu/datamodels/roman/schemas/resample-1.0.0
title: Resample information
description: |-
Resample information
# Reference Modules
- tag_uri: asdf://stsci.edu/datamodels/roman/tags/reference_files/dark-1.0.0
schema_uri: asdf://stsci.edu/datamodels/roman/schemas/reference_files/dark-1.0.0
Expand Down
28 changes: 28 additions & 0 deletions src/rad/resources/schemas/resample-1.0.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
%YAML 1.1
---
$schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0
id: asdf://stsci.edu/datamodels/roman/schemas/resample-1.0.0

title: Resample information
type: object
properties:
pixel_scale_ratio:
title: Pixel Scale Ratio of resample to input scale
type: number
pixfrac:
title: Fraction of pixel to use for pixel convolution
type: number
pointings:
title: Number of pointings in the resample
type: integer
product_exposure_time:
title: Total exposure time for resample product
type: number
weight_type:
title: Drizzle weight type for resample
type: string
enum: ["exptime", "ivm"]
propertyOrder: [pixel_scale_ratio, pixfrac, pointings, product_exposure_time, weight_type]
flowStyle: block
required: [pixel_scale_ratio, pixfrac, pointings, product_exposure_time, weight_type]
...
89 changes: 89 additions & 0 deletions src/rad/resources/schemas/wfi_mosaic-1.0.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
%YAML 1.1
---
$schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0
id: asdf://stsci.edu/datamodels/roman/schemas/wfi_mosaic-1.0.0

title: |
The schema for WFI Level 3 mosaics.
type: object
properties:
meta:
allOf:
- $ref: common-1.0.0
- type: object
properties:
# Placeholder for 'asn' schema tag
# Placeholder for 'dither' schema tag
photometry:
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]
data:
title: Science data, excluding border reference pixels.
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
unit:
tag: tag:astropy.org:astropy/units/unit-1.0.0
enum: ["electron / s"]
err:
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
unit:
tag: tag:astropy.org:astropy/units/unit-1.0.0
enum: ["electron / s"]
context:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint32
ndim: 3
weight:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
var_poisson:
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
unit:
tag: tag:astropy.org:astropy/units/unit-1.0.0
enum: ["electron2 / s2"]
var_rnoise:
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
unit:
tag: tag:astropy.org:astropy/units/unit-1.0.0
enum: ["electron2 / s2"]
var_flat:
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
unit:
tag: tag:astropy.org:astropy/units/unit-1.0.0
enum: ["electron2 / s2"]
cal_logs:
tag: asdf://stsci.edu/datamodels/roman/tags/cal_logs-1.0.0
propertyOrder: [meta, data, context, err, weight, var_poisson, var_rnoise, var_flat,
cal_logs]
flowStyle: block
required: [meta, data, context, err, weight, var_poisson, var_rnoise, var_flat,
cal_logs]
...

0 comments on commit 9e567b8

Please sign in to comment.