From c9d7381ed283fd32048b7e9e7a26b738c7b76567 Mon Sep 17 00:00:00 2001 From: Paul Huwe <42071634+PaulHuwe@users.noreply.github.com> Date: Tue, 14 May 2024 16:04:48 -0400 Subject: [PATCH] RAD-171: Add statistics field to TVAC and FPS schemas (#423) * Initial save. * Corrected unit tag types. * Updated Changelog. --- CHANGES.rst | 2 + .../resources/manifests/datamodels-1.0.yaml | 10 ++ .../schemas/fps/statistics-1.0.0.yaml | 95 +++++++++++++++++++ .../schemas/tvac/statistics-1.0.0.yaml | 95 +++++++++++++++++++ 4 files changed, 202 insertions(+) create mode 100644 src/rad/resources/schemas/fps/statistics-1.0.0.yaml create mode 100644 src/rad/resources/schemas/tvac/statistics-1.0.0.yaml diff --git a/CHANGES.rst b/CHANGES.rst index ac5071c8..da8b1e86 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,8 @@ - Separated TVAC and FPS schemas into their own suite of files. [#414] +- Added statistics schemas to both FPS and TVAC. [#423] + - Removed filepath_level_pnt5 from TVAC/FPS database. [#422] - Removed the db entries for filename_l1a and filename_pnt5 in TVAC and FPS schemas. [#421] diff --git a/src/rad/resources/manifests/datamodels-1.0.yaml b/src/rad/resources/manifests/datamodels-1.0.yaml index 453ac61b..ec3ab3c4 100644 --- a/src/rad/resources/manifests/datamodels-1.0.yaml +++ b/src/rad/resources/manifests/datamodels-1.0.yaml @@ -329,6 +329,11 @@ tags: title: FPS Guidestar information description: |- FPS Guidestar information +- tag_uri: asdf://stsci.edu/datamodels/roman/tags/fps/statistics-1.0.0 + schema_uri: asdf://stsci.edu/datamodels/roman/schemas/fps/statistics-1.0.0 + title: FPS Summary Statistics + description: |- + FPS Summary Statistics - tag_uri: asdf://stsci.edu/datamodels/roman/tags/fps/ref_file-1.0.0 schema_uri: asdf://stsci.edu/datamodels/roman/schemas/fps/ref_file-1.0.0 title: FPS Calibration reference file names. @@ -406,6 +411,11 @@ tags: title: TVAC Guidestar information description: |- TVAC Guidestar information +- tag_uri: asdf://stsci.edu/datamodels/roman/tags/tvac/statistics-1.0.0 + schema_uri: asdf://stsci.edu/datamodels/roman/schemas/tvac/statistics-1.0.0 + title: TVAC Summary Statistics + description: |- + TVAC Summary Statistics - tag_uri: asdf://stsci.edu/datamodels/roman/tags/tvac/ref_file-1.0.0 schema_uri: asdf://stsci.edu/datamodels/roman/schemas/tvac/ref_file-1.0.0 title: TVAC Calibration reference file names. diff --git a/src/rad/resources/schemas/fps/statistics-1.0.0.yaml b/src/rad/resources/schemas/fps/statistics-1.0.0.yaml new file mode 100644 index 00000000..ecea2908 --- /dev/null +++ b/src/rad/resources/schemas/fps/statistics-1.0.0.yaml @@ -0,0 +1,95 @@ +%YAML 1.1 +--- +$schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0 +id: asdf://stsci.edu/datamodels/roman/schemas/fps/statistics-1.0.0 + + +title: | + FPS Summary Statistics + +type: object +properties: + mean_counts_per_sec: + title: Mean number of counts per second + description: | + Mean number of counts per second of the data cube + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + properties: + datatype: + enum: ["float64"] + unit: + tag: tag:astropy.org:astropy/units/unit-1.* + enum: ["DN / s"] + - type: "null" + sdf: + special_processing: VALUE_REQUIRED + source: + origin: TBD + archive_catalog: + datatype: float + destination: [WFICommon.mean_counts_per_sec] + median_counts_per_sec: + title: Median number of counts per second + description: | + Median number of counts per second of the data cube + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + properties: + datatype: + enum: ["float64"] + unit: + tag: tag:astropy.org:astropy/units/unit-1.* + enum: ["DN / s"] + - type: "null" + sdf: + special_processing: VALUE_REQUIRED + source: + origin: TBD + archive_catalog: + datatype: float + destination: [WFICommon.median_counts_per_sec] + max_counts: + title: Maximum number of counts + description: | + Maximum number of counts in the data cube + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + properties: + datatype: + enum: ["int32"] + unit: + tag: tag:astropy.org:astropy/units/unit-1.* + enum: ["DN"] + - type: "null" + sdf: + special_processing: VALUE_REQUIRED + source: + origin: TBD + archive_catalog: + datatype: int + destination: [WFICommon.max_counts] + min_counts: + title: Minimum number of counts + description: | + Minimum number of counts in the data cube + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + properties: + datatype: + enum: ["int32"] + unit: + tag: tag:astropy.org:astropy/units/unit-1.* + enum: ["DN"] + - type: "null" + sdf: + special_processing: VALUE_REQUIRED + source: + origin: TBD + archive_catalog: + datatype: int + destination: [WFICommon.min_counts] +propertyOrder: [mean_counts_per_sec, median_counts_per_sec, max_counts, min_counts] +flowStyle: block +required: [mean_counts_per_sec, median_counts_per_sec, max_counts, min_counts] +... diff --git a/src/rad/resources/schemas/tvac/statistics-1.0.0.yaml b/src/rad/resources/schemas/tvac/statistics-1.0.0.yaml new file mode 100644 index 00000000..2208df43 --- /dev/null +++ b/src/rad/resources/schemas/tvac/statistics-1.0.0.yaml @@ -0,0 +1,95 @@ +%YAML 1.1 +--- +$schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0 +id: asdf://stsci.edu/datamodels/roman/schemas/tvac/statistics-1.0.0 + + +title: | + TVAC Summary Statistics + +type: object +properties: + mean_counts_per_sec: + title: Mean number of counts per second + description: | + Mean number of counts per second of the data cube + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + properties: + datatype: + enum: ["float64"] + unit: + tag: tag:astropy.org:astropy/units/unit-1.* + enum: ["DN / s"] + - type: "null" + sdf: + special_processing: VALUE_REQUIRED + source: + origin: TBD + archive_catalog: + datatype: float + destination: [WFICommon.mean_counts_per_sec] + median_counts_per_sec: + title: Median number of counts per second + description: | + Median number of counts per second of the data cube + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + properties: + datatype: + enum: ["float64"] + unit: + tag: tag:astropy.org:astropy/units/unit-1.* + enum: ["DN / s"] + - type: "null" + sdf: + special_processing: VALUE_REQUIRED + source: + origin: TBD + archive_catalog: + datatype: float + destination: [WFICommon.median_counts_per_sec] + max_counts: + title: Maximum number of counts + description: | + Maximum number of counts in the data cube + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + properties: + datatype: + enum: ["int32"] + unit: + tag: tag:astropy.org:astropy/units/unit-1.* + enum: ["DN"] + - type: "null" + sdf: + special_processing: VALUE_REQUIRED + source: + origin: TBD + archive_catalog: + datatype: int + destination: [WFICommon.max_counts] + min_counts: + title: Minimum number of counts + description: | + Minimum number of counts in the data cube + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + properties: + datatype: + enum: ["int32"] + unit: + tag: tag:astropy.org:astropy/units/unit-1.* + enum: ["DN"] + - type: "null" + sdf: + special_processing: VALUE_REQUIRED + source: + origin: TBD + archive_catalog: + datatype: int + destination: [WFICommon.min_counts] +propertyOrder: [mean_counts_per_sec, median_counts_per_sec, max_counts, min_counts] +flowStyle: block +required: [mean_counts_per_sec, median_counts_per_sec, max_counts, min_counts] +...