Skip to content

Commit 512f05a

Browse files
Remove units from the ref files (#490)
2 parents b9d7507 + 2b7a04a commit 512f05a

12 files changed

Lines changed: 70 additions & 160 deletions

changes/490.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove units from the reference file schemas.

src/rad/resources/schemas/reference_files/dark-1.0.0.yaml

Lines changed: 16 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,6 @@ properties:
2020
exposure:
2121
type: object
2222
properties:
23-
ngroups:
24-
title: Number of Resultants
25-
description: |
26-
The number of resultants averaged according to
27-
Multi-Accumulation (MA) Table read pattern.
28-
type: integer
29-
nframes:
30-
title: Number of frames per resultant # should be removed
31-
type: integer
32-
groupgap:
33-
title: Number of Skips Between Resultants
34-
description: |
35-
The number of frames skipped between resultants according to
36-
MA Table read pattern.
37-
type: integer
3823
ma_table_name:
3924
title: Multi-Accumulation Table Name
4025
description: |
@@ -48,7 +33,7 @@ properties:
4833
Table that keeps the same name will have a new
4934
ma_table_number.
5035
type: integer
51-
required: [ngroups, nframes, groupgap, ma_table_name, ma_table_number]
36+
required: [ma_table_name, ma_table_number]
5237
required: [exposure]
5338
- $ref: asdf://stsci.edu/datamodels/roman/schemas/reference_files/ref_exposure_type-1.0.0
5439
- $ref: asdf://stsci.edu/datamodels/roman/schemas/reference_files/ref_optical_element-1.0.0
@@ -57,16 +42,11 @@ properties:
5742
description: |
5843
The dark current array represents the integrated number of counts due to
5944
the accumulation of dark current electrons in the pixels.
60-
tag: tag:stsci.edu:asdf/unit/quantity-1.*
61-
properties:
62-
value:
63-
tag: tag:stsci.edu:asdf/core/ndarray-1.*
64-
datatype: float32
65-
exact_datatype: true
66-
ndim: 3
67-
unit:
68-
tag: tag:astropy.org:astropy/units/unit-1.*
69-
enum: ["DN"]
45+
tag: tag:stsci.edu:asdf/core/ndarray-1.*
46+
datatype: float32
47+
exact_datatype: true
48+
ndim: 3
49+
unit: DN
7050
dq:
7151
title: 2-D Data Quality Array
7252
description: |
@@ -81,31 +61,21 @@ properties:
8161
The dark current rate array represents the slope of the integrated number
8262
of counts due to the accumulation of dark current electrons in the pixels
8363
calculated from slope fitting the Dark Current Array.
84-
tag: tag:stsci.edu:asdf/unit/quantity-1.*
85-
properties:
86-
value:
87-
tag: tag:stsci.edu:asdf/core/ndarray-1.*
88-
datatype: float32
89-
exact_datatype: true
90-
ndim: 2
91-
unit:
92-
tag: tag:astropy.org:astropy/units/unit-1.*
93-
enum: ["DN / s"]
64+
tag: tag:stsci.edu:asdf/core/ndarray-1.*
65+
datatype: float32
66+
exact_datatype: true
67+
ndim: 2
68+
unit: DN / s
9469
dark_slope_error:
9570
title: Dark Current Rate Uncertainty Array
9671
description: |
9772
The uncertainty calculated from the slope fitting of the Dark Current
9873
Array.
99-
tag: tag:stsci.edu:asdf/unit/quantity-1.*
100-
properties:
101-
value:
102-
tag: tag:stsci.edu:asdf/core/ndarray-1.*
103-
datatype: float32
104-
exact_datatype: true
105-
ndim: 2
106-
unit:
107-
tag: tag:astropy.org:astropy/units/unit-1.*
108-
enum: ["DN / s"]
74+
tag: tag:stsci.edu:asdf/core/ndarray-1.*
75+
datatype: float32
76+
exact_datatype: true
77+
ndim: 2
78+
unit: DN / s
10979
required: [meta, data, dq, dark_slope, dark_slope_error]
11080
flowStyle: block
11181
propertyOrder: [meta, data, dq, dark_slope, dark_slope_error]

src/rad/resources/schemas/reference_files/distortion-1.0.0.yaml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,17 @@ properties:
1313
allOf:
1414
- $ref: asdf://stsci.edu/datamodels/roman/schemas/reference_files/ref_common-1.0.0
1515
- type: object
16+
17+
input_units: "pixel"
18+
output_units: "arcsec"
19+
1620
properties:
1721
reftype:
1822
type: string
1923
enum: [DISTORTION]
20-
input_units:
21-
title: Input Model Units
22-
description: |
23-
The pixel input units of the detector coordinate model.
24-
tag: tag:stsci.edu:asdf/unit/unit-1.*
25-
enum: ["pixel"]
26-
output_units:
27-
title: Output Model Units
28-
description: |
29-
The V2/V3 coordinates output units after the model is applied.
30-
tag: tag:stsci.edu:asdf/unit/unit-1.*
31-
enum: ["arcsec"]
32-
required: [output_units, input_units]
3324
- $ref: asdf://stsci.edu/datamodels/roman/schemas/reference_files/ref_optical_element-1.0.0
3425
coordinate_distortion_transform:
35-
title: Distortion Transform Model
26+
title: Distortion Transform Model with inputs in "pixel" and outputs in "arcsec"
3627
description: |
3728
The astropy.modeling.Model instance of of the distortion transform model.
3829
type: object

src/rad/resources/schemas/reference_files/gain-1.0.0.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,11 @@ properties:
2222
description: |
2323
The Gain Data Array represents the pixel to pixel conversion from digital
2424
numbers (DN) to electrons (e). The units are e/DN.
25-
tag: tag:stsci.edu:asdf/unit/quantity-1.*
26-
properties:
27-
value:
28-
tag: tag:stsci.edu:asdf/core/ndarray-1.*
29-
datatype: float32
30-
exact_datatype: true
31-
ndim: 2
32-
unit:
33-
tag: tag:astropy.org:astropy/units/unit-1.*
34-
enum: ["electron / DN"]
25+
tag: tag:stsci.edu:asdf/core/ndarray-1.*
26+
datatype: float32
27+
exact_datatype: true
28+
ndim: 2
29+
unit: electron / DN
3530
required: [meta, data]
3631
flowStyle: block
3732
propertyOrder: [meta, data]

src/rad/resources/schemas/reference_files/inverselinearity-1.0.0.yaml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ properties:
1313
allOf:
1414
- $ref: asdf://stsci.edu/datamodels/roman/schemas/reference_files/ref_common-1.0.0
1515
- type: object
16+
17+
input_units: "DN"
18+
output_units: "DN"
19+
1620
properties:
1721
reftype:
1822
type: string
1923
enum: [INVERSELINEARITY]
20-
input_units:
21-
title: Inverse Linearity Input Units
22-
description: |
23-
Units of the input to the inverse linearity polynomial.
24-
tag: tag:astropy.org:astropy/units/unit-1.*
25-
enum: ["DN"]
26-
output_units:
27-
title: Inverse Linearity Output Units
28-
description: |
29-
Units of the output of the inverse linearity polynomial.
30-
tag: tag:astropy.org:astropy/units/unit-1.*
31-
enum: ["DN"]
32-
required: [output_units, input_units]
3324
coeffs:
3425
title: Inverse Linearity Coefficients
3526
description: |

src/rad/resources/schemas/reference_files/linearity-1.0.0.yaml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ properties:
1313
allOf:
1414
- $ref: asdf://stsci.edu/datamodels/roman/schemas/reference_files/ref_common-1.0.0
1515
- type: object
16+
17+
input_units: "DN"
18+
output_units: "DN"
19+
1620
properties:
1721
reftype:
1822
type: string
1923
enum: [LINEARITY]
20-
input_units:
21-
title: Units of the Input to the Linearity Polynomial
22-
description: |
23-
Units of the input to the linearity polynomial.
24-
tag: tag:astropy.org:astropy/units/unit-1.*
25-
enum: ["DN"]
26-
output_units:
27-
title: Units of the Output of the Linearity Polynomial
28-
description: |
29-
Units of the output to the linearity polynomial.
30-
tag: tag:astropy.org:astropy/units/unit-1.*
31-
enum: ["DN"]
32-
required: [output_units, input_units]
3324
coeffs:
3425
title: Linearity Coefficients
3526
description: |

src/rad/resources/schemas/reference_files/pixelarea-1.0.0.yaml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,16 @@ properties:
2525
description: |
2626
The nominal pixel area in steradians.
2727
anyOf:
28-
- tag: tag:stsci.edu:asdf/unit/quantity-1.*
29-
properties:
30-
datatype:
31-
enum: ["float64"]
32-
unit:
33-
tag: tag:stsci.edu:asdf/unit/unit-1.*
34-
enum: ["sr"]
28+
- type: number
29+
unit: sr
3530
- type: "null"
3631
pixelarea_arcsecsq:
3732
title: Pixel Area (arcsec^2)
3833
description:
3934
The nominal pixel area in arcec^2.
4035
anyOf:
41-
- tag: tag:stsci.edu:asdf/unit/quantity-1.*
42-
properties:
43-
datatype:
44-
enum: ["float64"]
45-
unit:
46-
tag: tag:stsci.edu:asdf/unit/unit-1.*
47-
enum: ["arcsec**2"]
36+
- type: number
37+
unit: arcsec**2
4838
- type: "null"
4939
required: [pixelarea_steradians, pixelarea_arcsecsq]
5040
required: [photometry]

src/rad/resources/schemas/reference_files/readnoise-1.0.0.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,11 @@ properties:
2222
description: |
2323
The pixel-by-pixel map read noise data array is used in estimating the
2424
expected noise in each pixel.
25-
tag: tag:stsci.edu:asdf/unit/quantity-1.*
26-
properties:
27-
value:
28-
tag: tag:stsci.edu:asdf/core/ndarray-1.*
29-
datatype: float32
30-
exact_datatype: true
31-
ndim: 2
32-
unit:
33-
tag: tag:astropy.org:astropy/units/unit-1.*
34-
enum: ["DN"]
25+
tag: tag:stsci.edu:asdf/core/ndarray-1.*
26+
datatype: float32
27+
exact_datatype: true
28+
ndim: 2
29+
unit: DN
3530
required: [meta, data]
3631
flowStyle: block
3732
propertyOrder: [meta, data]

src/rad/resources/schemas/reference_files/refpix-1.0.0.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,14 @@ properties:
1515
allOf:
1616
- $ref: asdf://stsci.edu/datamodels/roman/schemas/reference_files/ref_common-1.0.0
1717
- type: object
18+
19+
input_units: "DN"
20+
output_units: "DN"
21+
1822
properties:
1923
reftype:
2024
type: string
2125
enum: [REFPIX]
22-
input_units:
23-
title: Units of the input to the linearity polynomial.
24-
tag: tag:astropy.org:astropy/units/unit-1.*
25-
enum: ["DN"]
26-
output_units:
27-
title: Units of the output of the linearity polynomial.
28-
tag: tag:astropy.org:astropy/units/unit-1.*
29-
enum: ["DN"]
30-
required: [output_units, input_units]
3126

3227
gamma:
3328
title: Left column correction coefficients

src/rad/resources/schemas/reference_files/saturation-1.0.0.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,11 @@ properties:
2222
description: |
2323
The pixel level threshold for determining saturation before non-linearity
2424
corrections are applied.
25-
tag: tag:stsci.edu:asdf/unit/quantity-1.*
26-
properties:
27-
value:
28-
tag: tag:stsci.edu:asdf/core/ndarray-1.*
29-
datatype: float32
30-
exact_datatype: true
31-
ndim: 2
32-
unit:
33-
tag: tag:astropy.org:astropy/units/unit-1.*
34-
enum: ["DN"]
25+
tag: tag:stsci.edu:asdf/core/ndarray-1.*
26+
datatype: float32
27+
exact_datatype: true
28+
ndim: 2
29+
unit: DN
3530
dq:
3631
title: 2-D Data Quality Array
3732
description: |

0 commit comments

Comments
 (0)