From 48203a1de1c432200f87df841e857eb45f531bb6 Mon Sep 17 00:00:00 2001 From: Paul Huwe <42071634+PaulHuwe@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:36:37 -0500 Subject: [PATCH] RAD-189: APCORR and ABVEGAOFFSET optional nulls (#516) * Initial commit. * Added change log. --- changes/516.misc.rst | 1 + .../reference_files/abvegaoffset-1.0.0.yaml | 4 +- .../schemas/reference_files/apcorr-1.0.0.yaml | 38 ++++++++++++------- 3 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 changes/516.misc.rst diff --git a/changes/516.misc.rst b/changes/516.misc.rst new file mode 100644 index 00000000..91741626 --- /dev/null +++ b/changes/516.misc.rst @@ -0,0 +1 @@ +Added null values to allowed APCORR and ABVEGAOFFSET keyword values. diff --git a/src/rad/resources/schemas/reference_files/abvegaoffset-1.0.0.yaml b/src/rad/resources/schemas/reference_files/abvegaoffset-1.0.0.yaml index 2e5357dd..e9a7c282 100644 --- a/src/rad/resources/schemas/reference_files/abvegaoffset-1.0.0.yaml +++ b/src/rad/resources/schemas/reference_files/abvegaoffset-1.0.0.yaml @@ -28,7 +28,9 @@ properties: description: Magnitude difference between the AB and Vega magnitude systems. Found by calculating the AB magnitude of Vega within the optical element bandpass. - type: number + anyOf: + - type: number + - type: "null" required: [abvega_offset] required: [meta, data] flowStyle: block diff --git a/src/rad/resources/schemas/reference_files/apcorr-1.0.0.yaml b/src/rad/resources/schemas/reference_files/apcorr-1.0.0.yaml index bc6ed9fd..a0a01819 100644 --- a/src/rad/resources/schemas/reference_files/apcorr-1.0.0.yaml +++ b/src/rad/resources/schemas/reference_files/apcorr-1.0.0.yaml @@ -27,39 +27,49 @@ properties: title: Aperture Corrections description: The aperture correction for each enclosed energy fraction, corresponding to 1 / ee_fractions. - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float64 - exact_datatype: true - ndim: 1 + anyOf: + - tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float64 + exact_datatype: true + ndim: 1 + - type: "null" ee_fractions: title: Enclosed Energy Fractions description: Fractions of the enclosed energy of the PSF at which to estimate the aperture correction and enclosed energy radii. - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float64 - exact_datatype: true - ndim: 1 + anyOf: + - tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float64 + exact_datatype: true + ndim: 1 + - type: "null" ee_radii: title: Enclosed Energy Radii description: Radius, in pixels, within which the enclosed energy fractions are met. The indexing matches that of "ee_fractions". - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float64 - exact_datatype: true - ndim: 1 + anyOf: + - tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float64 + exact_datatype: true + ndim: 1 + - type: "null" sky_background_rin: title: Inner Radius for the Sky Background description: Inner radius, in pixels, to use when estimating the local sky background within an annulus between this radius and "sky_background_rout". - type: number + anyOf: + - type: number + - type: "null" sky_background_rout: title: Outer Radius for the Sky Background description: Outer radius, in pixels, to use when estimating the local sky background within an annulus between this radius and "sky_background_rin". - type: number + anyOf: + - type: number + - type: "null" required: [ap_corrections, ee_fractions, ee_radii, sky_background_rin, sky_background_rout] required: [meta, data] flowStyle: block