Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array Quantities #192

Merged
merged 12 commits into from
Dec 4, 2022
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

- Update guidwindow titles and descriptions. [#193]

- Changed science arrays to quantities. [#192]

0.14.0 (2022-11-04)
-------------------

Expand Down
27 changes: 18 additions & 9 deletions src/rad/resources/schemas/guidewindow-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,30 @@ properties:
pedestal_frames:
title: "Reconstituted and oriented pedestal frame GW images. Dimensions: num_frames,
num_combined_resultants (or num_uncombined_resultants), num_reads, x, y"
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 5
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know the exact unit/units involved here? If so should we try to enforce this as part of the schema?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same goes for the rest of the quantities involved.

properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 5
signal_frames:
title: "Reconstituted and oriented signal frames. Dimensions: num_frames,
num_combined_resultants (or num_uncombined_resultants), num_reads, x, y"
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 5
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 5
amp33:
title: "Amp 33 reference pixel data. Dimensions: num_frames,
num_combined_resultants (or num_uncombined_resultants), num_reads, x, y"
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 5
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 5
propertyOrder: [meta, pedestal_frames, signal_frames, amp33]
flowStyle: block
required: [meta, pedestal_frames, signal_frames, amp33]
Expand Down
62 changes: 41 additions & 21 deletions src/rad/resources/schemas/ramp-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ allOf:
- $ref: common-1.0.0
data:
title: Science data, including the border reference pixels.
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
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: 3
pixeldq:
title: 2-D data quality array for all planes
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
Expand All @@ -28,34 +31,51 @@ allOf:
datatype: uint8
err:
title: Error array containing the square root of the exposure-level combined variance
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
ndim: 3
datatype: float32
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: 3
amp33:
title: Amp 33 reference pixel data
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 3
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 3
border_ref_pix_left:
title: Original border reference pixels, on left (from viewers perspective).
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
border_ref_pix_right:
title: Original border reference pixels, on right (from viewers perspective).
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
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: 3
border_ref_pix_top:
title: Original border reference pixels, on top.
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
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: 3
border_ref_pix_bottom:
title: Original border reference pixels, on bottom.
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
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: 3
dq_border_ref_pix_left:
title: DQ for border reference pixels, on left (from viewers perspective).
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
Expand Down
36 changes: 24 additions & 12 deletions src/rad/resources/schemas/ramp_fit_output-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,41 @@ allOf:
datatype: float32
pedestal:
title: Pedestal array
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
ndim: 2
datatype: float32
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
weights:
title: Weights for segment-specific fits
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
ndim: 3
datatype: float32
crmag:
title: Approximate CR magnitudes
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
ndim: 3
datatype: float32
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: 3
var_poisson:
title: Variance due to poisson noise for segment-specific slope
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
ndim: 3
datatype: float32
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: 3
var_rnoise:
title: Variance due to read noise for segment-specific slope
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
ndim: 3
datatype: float32
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: 3
required: [meta, slope, sigslope, yint, sigyint, pedestal, weights, crmag, var_poisson,
var_rnoise]
propertyOrder: [meta, slope, sigslope, yint, sigyint, pedestal, weights, crmag, var_poisson,
Expand Down
90 changes: 60 additions & 30 deletions src/rad/resources/schemas/wfi_image-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,54 +18,84 @@ properties:
required: [photometry]
data:
title: Science data, excluding border reference pixels.
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
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
dq:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint32
ndim: 2
err:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
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
var_poisson:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
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
var_rnoise:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
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
var_flat:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 2
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
amp33:
title: Amp 33 reference pixel data
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 3
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 3
border_ref_pix_left:
title: Original border reference pixels, on left (from viewers perspective).
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
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: 3
border_ref_pix_right:
title: Original border reference pixels, on right (from viewers perspective).
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
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: 3
border_ref_pix_top:
title: Original border reference pixels, on top.
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
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: 3
border_ref_pix_bottom:
title: Original border reference pixels, on bottom.
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: float32
ndim: 3
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: 3
dq_border_ref_pix_left:
title: DQ for border reference pixels, on left (from viewers perspective).
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
Expand Down
18 changes: 12 additions & 6 deletions src/rad/resources/schemas/wfi_science_raw-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ properties:
- $ref: common-1.0.0
data:
title: Science data, including the border reference pixels.
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 3
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 3
amp33:
title: Amp 33 reference pixel data.
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 3
tag: tag:stsci.edu:asdf/unit/quantity-1.1.0
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.0.0
datatype: uint16
ndim: 3
propertyOrder: [meta, data, amp33]
flowStyle: block
required: [meta, data, amp33]
Expand Down