From d869ddc03942e28715cbce64586e235d1d11ef11 Mon Sep 17 00:00:00 2001 From: Paul Huwe <42071634+PaulHuwe@users.noreply.github.com> Date: Thu, 28 Mar 2024 22:28:34 -0400 Subject: [PATCH] RAD-149: Split cal_step into L2 & L3 (#397) * Initial commit. * Updated Changelog. * Update docs. --- CHANGES.rst | 2 + docs/schemas.rst | 3 +- .../resources/manifests/datamodels-1.0.yaml | 13 +++-- src/rad/resources/schemas/common-1.0.0.yaml | 2 +- .../schemas/ground_common-1.0.0.yaml | 2 +- ...step-1.0.0.yaml => l2_cal_step-1.0.0.yaml} | 21 +++----- .../resources/schemas/l3_cal_step-1.0.0.yaml | 53 +++++++++++++++++++ .../resources/schemas/wfi_mosaic-1.0.0.yaml | 2 +- .../schemas/wfi_science_raw-1.0.0.yaml | 1 - 9 files changed, 75 insertions(+), 24 deletions(-) rename src/rad/resources/schemas/{cal_step-1.0.0.yaml => l2_cal_step-1.0.0.yaml} (86%) create mode 100644 src/rad/resources/schemas/l3_cal_step-1.0.0.yaml diff --git a/CHANGES.rst b/CHANGES.rst index f0324435..c3660d5e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,6 +20,8 @@ - Add attributes under the ``basic`` schema to ``WfiMosaic.meta``. [#390] +- Split cal_step into L2 and L3 versions. [#397] + - Add Members Keyword to Resample Schema. [#396] - Create the flux step schema. [#395] diff --git a/docs/schemas.rst b/docs/schemas.rst index d93242c3..0193fd3b 100644 --- a/docs/schemas.rst +++ b/docs/schemas.rst @@ -33,7 +33,6 @@ Tags associations-1.0.0 basic-1.0.0 cal_logs-1.0.0 - cal_step-1.0.0 common-1.0.0 coordinates-1.0.0 ephemeris-1.0.0 @@ -43,6 +42,8 @@ Tags guidewindow_modes-1.0.0 guidewindow-1.0.0 individual_image_meta-1.0.0 + l2_cal_step-1.0.0 + l3_cal_step-1.0.0 mosaic_associations-1.0.0 mosaic_basic-1.0.0 mosaic_wcsinfo-1.0.0 diff --git a/src/rad/resources/manifests/datamodels-1.0.yaml b/src/rad/resources/manifests/datamodels-1.0.yaml index e2c0a5b7..cd9e2655 100644 --- a/src/rad/resources/manifests/datamodels-1.0.yaml +++ b/src/rad/resources/manifests/datamodels-1.0.yaml @@ -115,11 +115,16 @@ tags: title: Guidestar information description: |- Guidestar information -- tag_uri: asdf://stsci.edu/datamodels/roman/tags/cal_step-1.0.0 - schema_uri: asdf://stsci.edu/datamodels/roman/schemas/cal_step-1.0.0 - title: Calibration Step status information +- tag_uri: asdf://stsci.edu/datamodels/roman/tags/l2_cal_step-1.0.0 + schema_uri: asdf://stsci.edu/datamodels/roman/schemas/l2_cal_step-1.0.0 + title: Level 2 Calibration Step status information description: |- - Calibration Step status information + Level 2 Calibration Step status information +- tag_uri: asdf://stsci.edu/datamodels/roman/tags/l3_cal_step-1.0.0 + schema_uri: asdf://stsci.edu/datamodels/roman/schemas/l3_cal_step-1.0.0 + title: Level 3 Calibration Step status information + description: |- + Level 3 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 diff --git a/src/rad/resources/schemas/common-1.0.0.yaml b/src/rad/resources/schemas/common-1.0.0.yaml index c8eb0a49..6b268bd1 100644 --- a/src/rad/resources/schemas/common-1.0.0.yaml +++ b/src/rad/resources/schemas/common-1.0.0.yaml @@ -16,7 +16,7 @@ allOf: tag: asdf://stsci.edu/datamodels/roman/tags/aperture-1.0.0 cal_step: title: Tracker of Calibration Pipeline Steps - tag: asdf://stsci.edu/datamodels/roman/tags/cal_step-1.0.0 + tag: asdf://stsci.edu/datamodels/roman/tags/l2_cal_step-1.0.0 coordinates: title: Name Of The Coordinate Reference Frame tag: asdf://stsci.edu/datamodels/roman/tags/coordinates-1.0.0 diff --git a/src/rad/resources/schemas/ground_common-1.0.0.yaml b/src/rad/resources/schemas/ground_common-1.0.0.yaml index 86b6e17d..2246f756 100644 --- a/src/rad/resources/schemas/ground_common-1.0.0.yaml +++ b/src/rad/resources/schemas/ground_common-1.0.0.yaml @@ -12,7 +12,7 @@ allOf: properties: # Meta Objects cal_step: - tag: asdf://stsci.edu/datamodels/roman/tags/cal_step-1.0.0 + tag: asdf://stsci.edu/datamodels/roman/tags/l2_cal_step-1.0.0 exposure: tag: asdf://stsci.edu/datamodels/roman/tags/base_exposure-1.0.0 guidestar: diff --git a/src/rad/resources/schemas/cal_step-1.0.0.yaml b/src/rad/resources/schemas/l2_cal_step-1.0.0.yaml similarity index 86% rename from src/rad/resources/schemas/cal_step-1.0.0.yaml rename to src/rad/resources/schemas/l2_cal_step-1.0.0.yaml index 7c0179a1..f0ff6db6 100644 --- a/src/rad/resources/schemas/cal_step-1.0.0.yaml +++ b/src/rad/resources/schemas/l2_cal_step-1.0.0.yaml @@ -1,9 +1,9 @@ %YAML 1.1 --- $schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0 -id: asdf://stsci.edu/datamodels/roman/schemas/cal_step-1.0.0 +id: asdf://stsci.edu/datamodels/roman/schemas/l2_cal_step-1.0.0 -title: Calibration Status +title: Level 2 Calibration Status type: object properties: assign_wcs: @@ -158,19 +158,10 @@ properties: archive_catalog: datatype: nvarchar(15) destination: [ScienceRefData.s_skymatch, GuideWindow.s_skymatch, WFICommon.s_skymatch] - resample: - title: Resampling Input Data onto a Regular Grid Step - description: | - Step in ROMANCAL which resamples each input 2D image based on its WCS and - WCS distortion information on a grid that allows the combination of - multiple resampled images into a single, undistorted product. - type: string - enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE'] - archive_catalog: - datatype: nvarchar(15) - destination: [ScienceRefData.s_resample, GuideWindow.s_resample, WFICommon.s_resample] -propertyOrder: [assign_wcs, flat_field, dark, dq_init, flux, jump, linearity, photom, source_detection, outlier_detection, ramp_fit, refpix, saturation, skymatch, tweakreg, resample] +propertyOrder: [assign_wcs, flat_field, flux, dark, dq_init, jump, linearity, photom, source_detection, + outlier_detection, ramp_fit, refpix, saturation, skymatch, tweakreg] flowStyle: block -required: [assign_wcs, flat_field, dark, dq_init, flux, jump, linearity, outlier_detection, photom, source_detection, ramp_fit, refpix, resample, saturation, skymatch, tweakreg] +required: [assign_wcs, flat_field, flux, dark, dq_init, jump, linearity, outlier_detection, photom, + source_detection, ramp_fit, refpix, saturation, skymatch, tweakreg] additionalProperties: true ... diff --git a/src/rad/resources/schemas/l3_cal_step-1.0.0.yaml b/src/rad/resources/schemas/l3_cal_step-1.0.0.yaml new file mode 100644 index 00000000..4f2bf57d --- /dev/null +++ b/src/rad/resources/schemas/l3_cal_step-1.0.0.yaml @@ -0,0 +1,53 @@ +%YAML 1.1 +--- +$schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0 +id: asdf://stsci.edu/datamodels/roman/schemas/l3_cal_step-1.0.0 + +title: Level 3 Calibration Status +type: object +properties: + flux: + title: Flux Scale Application Step + description: | + Step in ROMANCAL which applies the scaling factors determined in the Photom calibrations step. + The data are converted from DN/s to MJy/sr. + type: string + enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE'] + archive_catalog: + datatype: nvarchar(15) + destination: [ScienceRefData.s_flux, GuideWindow.s_flux, WFIMosaic.s_flux] + outlier_detection: + title: Outlier Detection Step + description: | + Step in ROMANCAL which detects and flags outliers in a science image. + type: string + enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE'] + archive_catalog: + datatype: nvarchar(15) + destination: [ScienceRefData.s_outlier_detection, GuideWindow.s_outlier_detection, WFIMosaic.s_outlier_detection] + skymatch: + title: Sky Matching for Combining Overlapping Images Step + description: | + Step in ROMANCAL that computes sky background values of each input image + and derives scalings to equalize overlapping regions. + type: string + enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE'] + archive_catalog: + datatype: nvarchar(15) + destination: [ScienceRefData.s_skymatch, GuideWindow.s_skymatch, WFIMosaic.s_skymatch] + resample: + title: Resampling Input Data onto a Regular Grid Step + description: | + Step in ROMANCAL which resamples each input 2D image based on its WCS and + WCS distortion information on a grid that allows the combination of + multiple resampled images into a single, undistorted product. + type: string + enum: ['N/A', 'COMPLETE', 'SKIPPED', 'INCOMPLETE'] + archive_catalog: + datatype: nvarchar(15) + destination: [ScienceRefData.s_resample, GuideWindow.s_resample, WFIMosaic.s_resample] +propertyOrder: [flux, outlier_detection, skymatch, resample] +flowStyle: block +required: [flux, outlier_detection, resample, skymatch] +additionalProperties: true +... diff --git a/src/rad/resources/schemas/wfi_mosaic-1.0.0.yaml b/src/rad/resources/schemas/wfi_mosaic-1.0.0.yaml index 7d63482c..df3de2e4 100644 --- a/src/rad/resources/schemas/wfi_mosaic-1.0.0.yaml +++ b/src/rad/resources/schemas/wfi_mosaic-1.0.0.yaml @@ -22,7 +22,7 @@ properties: basic: tag: asdf://stsci.edu/datamodels/roman/tags/mosaic_basic-1.0.0 cal_step: - tag: asdf://stsci.edu/datamodels/roman/tags/cal_step-1.0.0 + tag: asdf://stsci.edu/datamodels/roman/tags/l3_cal_step-1.0.0 coordinates: tag: asdf://stsci.edu/datamodels/roman/tags/coordinates-1.0.0 individual_image_meta: diff --git a/src/rad/resources/schemas/wfi_science_raw-1.0.0.yaml b/src/rad/resources/schemas/wfi_science_raw-1.0.0.yaml index 68530a7b..5a39091a 100644 --- a/src/rad/resources/schemas/wfi_science_raw-1.0.0.yaml +++ b/src/rad/resources/schemas/wfi_science_raw-1.0.0.yaml @@ -27,7 +27,6 @@ properties: unit: tag: tag:astropy.org:astropy/units/unit-1.* enum: ["DN"] - amp33: title: Amplifier 33 Reference Pixel Data (DN) description: |