Skip to content

Commit

Permalink
RCAL-911 & 932: remove units from MOS and ELP pipelines. (spacetelesc…
Browse files Browse the repository at this point in the history
…ope#485)

* Remove units from MOS pipeline.

* Start removing units from ELP.

* Begin removing units from ELP.

* Address comments from PR 463.

* Add changelog entry.

* Simplify unit definition.

* Fix datatype for .

* Update sky_background-1.0.0.yaml

* Update sky_background-1.0.0.yaml

* Fix schema format.

* Another try at fixing schema format.

* Fix schema format.

---------

Co-authored-by: Eddie Schlafly <eschlafly@stsci.edu>
  • Loading branch information
mairanteodoro and schlafly authored Oct 17, 2024
1 parent b61c261 commit 974d82f
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 395 deletions.
1 change: 1 addition & 0 deletions changes/485.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove units from rad schema.
60 changes: 15 additions & 45 deletions src/rad/resources/schemas/photometry-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,21 @@ properties:
description: |
The conversion from DN / s to MJy / steradian.
anyOf:
- tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
datatype:
enum: ["float64"]
unit:
tag: tag:stsci.edu:asdf/unit/unit-1.*
enum: ["MJy.sr**-1"]
- type: number
- type: "null"
unit: "MJy.sr**-1"
archive_catalog:
datatype: float
destination: [WFIExposure.conversion_megajanskys, WFIMosaic.conversion_megajanskys,
SourceCatalog.conversion_megajanskys]
conversion_microjanskys:
title: Flux Density Producing 1 count per second (uJy / arcsec2)
title: Flux Density Producing 1 count per second (uJy / arcsec^2)
description: |
The conversion from DN / s to uJy / steradian.
The conversion from DN / s to uJy / arcsec^2.
anyOf:
- tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
datatype:
enum: ["float64"]
unit:
tag: tag:stsci.edu:asdf/unit/unit-1.*
enum: ["uJy.arcsec**-2"]
- type: number
- type: "null"
unit: "uJy.arcsec**-2"
archive_catalog:
datatype: float
destination: [WFIExposure.conversion_microjanskys, WFIMosaic.conversion_microjanskys,
Expand All @@ -45,14 +35,9 @@ properties:
description: |
The average pixel area in units of steradians.
anyOf:
- tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
datatype:
enum: ["float64"]
unit:
tag: tag:stsci.edu:asdf/unit/unit-1.*
enum: ["sr"]
- type: number
- type: "null"
unit: "sr"
archive_catalog:
datatype: float
destination: [WFIExposure.pixelarea_steradians, WFIMosaic.pixelarea_steradians,
Expand All @@ -62,14 +47,9 @@ properties:
description: |
The average pixel area in units of square arcseconds.
anyOf:
- tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
datatype:
enum: ["float64"]
unit:
tag: tag:stsci.edu:asdf/unit/unit-1.*
enum: ["arcsec**2"]
- type: number
- type: "null"
unit: "arcsec**2"
archive_catalog:
datatype: float
destination: [WFIExposure.pixelarea_arcsecsq, WFIMosaic.pixelarea_arcsecsq,
Expand All @@ -80,14 +60,9 @@ properties:
The uncertainty in the flux density conversion from DN to MJy /steradians
in units of MJy / steradians.
anyOf:
- tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
datatype:
enum: ["float64"]
unit:
tag: tag:stsci.edu:asdf/unit/unit-1.*
enum: ["MJy.sr**-1"]
- type: number
- type: "null"
unit: "MJy.sr**-1"
archive_catalog:
datatype: float
destination: [WFIExposure.conversion_megajanskys_uncertainty, WFIMosaic.conversion_megajanskys_uncertainty,
Expand All @@ -96,16 +71,11 @@ properties:
title: Uncertainty in Flux Density Conversion (from DN / s to uJy / arcsec^2)
description: |
The uncertainty in the flux density conversion from DN / s to
uJy /arcsec^2.
uJy / arcsec^2.
anyOf:
- tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
datatype:
enum: ["float64"]
unit:
tag: tag:stsci.edu:asdf/unit/unit-1.*
enum: ["uJy.arcsec**-2"]
- type: number
- type: "null"
unit: "uJy.arcsec**-2"
archive_catalog:
datatype: float
destination: [WFIExposure.conversion_microjanskys_uncertainty, WFIMosaic.conversion_microjanskys_uncertainty,
Expand Down
105 changes: 36 additions & 69 deletions src/rad/resources/schemas/ramp-1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@ properties:
description: |
Science Data Including Border Reference Pixels in units of DN or
electrons.
tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.*
datatype: float32
exact_datatype: true
ndim: 3
unit:
tag: tag:astropy.org:astropy/units/unit-1.*
enum: ["DN", "electron"]
tag: tag:stsci.edu:asdf/core/ndarray-1.*
ndim: 3
datatype: float32
unit: ["DN", "electron"]
exact_datatype: true

pixeldq:
title: Two Dimensional Data Quality Flags Array for Each Pixel
description: |
Expand All @@ -46,87 +42,58 @@ properties:
exact_datatype: true
err:
title: Error Array Containing the Square Root of the Exposure-level Combined Variance (DN, electrons)
tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.*
datatype: float32
exact_datatype: true
ndim: 3
unit:
tag: tag:astropy.org:astropy/units/unit-1.*
enum: ["DN", "electron"]
tag: tag:stsci.edu:asdf/core/ndarray-1.*
ndim: 3
datatype: float32
unit: ["DN", "electron"]
exact_datatype: true
amp33:
title: Amp 33 Reference Pixel Data (DN)
description: |
Amplifier 33 Reference Pixel Data in units of DN.
tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.*
datatype: uint16
exact_datatype: true
ndim: 3
unit:
tag: tag:astropy.org:astropy/units/unit-1.*
enum: ["DN"]
tag: tag:stsci.edu:asdf/core/ndarray-1.*
ndim: 3
datatype: uint16
unit: "DN"
exact_datatype: true
border_ref_pix_left:
title: Border Reference Pixels on the Left of the Detector, from the Instrument's Perspective (DN)
description: |
Border Reference Pixels on the Left of the Detector, from the instrument's
perspective in units of DN.
tag: tag:stsci.edu:asdf/unit/quantity-1.*
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.*
datatype: float32
exact_datatype: true
ndim: 3
unit:
tag: tag:astropy.org:astropy/units/unit-1.*
enum: ["DN"]
tag: tag:stsci.edu:asdf/core/ndarray-1.*
ndim: 3
datatype: float32
unit: "DN"
exact_datatype: true
border_ref_pix_right:
title: Border Reference Pixels on the Right of the Detector, from the Instrument's Perspective (DN)
description: |
Border Reference Pixels on the Right of the Detector, from the
instrument's perspective in units of DN.
tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.*
datatype: float32
exact_datatype: true
ndim: 3
unit:
tag: tag:astropy.org:astropy/units/unit-1.*
enum: ["DN"]
tag: tag:stsci.edu:asdf/core/ndarray-1.*
ndim: 3
datatype: float32
unit: "DN"
exact_datatype: true
border_ref_pix_top:
title: Border Reference Pixels on the Top of the Detector (DN)
description: |
Border Reference Pixels on the Top of the Detector in units of DN.
tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.*
datatype: float32
exact_datatype: true
ndim: 3
unit:
tag: tag:astropy.org:astropy/units/unit-1.*
enum: ["DN"]
tag: tag:stsci.edu:asdf/core/ndarray-1.*
ndim: 3
datatype: float32
unit: "DN"
exact_datatype: true
border_ref_pix_bottom:
title: Border Reference Pixels on the Bottom of the Detector (DN)
description: |
Border Reference Pixels on the Bottom of the Detector in units of DN.
tag: tag:stsci.edu:asdf/unit/quantity-1.*
properties:
value:
tag: tag:stsci.edu:asdf/core/ndarray-1.*
datatype: float32
exact_datatype: true
ndim: 3
unit:
tag: tag:astropy.org:astropy/units/unit-1.*
enum: ["DN"]
tag: tag:stsci.edu:asdf/core/ndarray-1.*
ndim: 3
datatype: float32
unit: "DN"
exact_datatype: true
dq_border_ref_pix_left:
title: Data Quality Flag for Border Reference Pixels, on the Left Edge of the Detector from the Instrument Perspective
description: |
Expand Down
Loading

0 comments on commit 974d82f

Please sign in to comment.