diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..abfb5f27 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: ".github/workflows" # Location of package manifests + schedule: + interval: "monthly" + reviewers: + - "zacharyburnett" + groups: + actions: + patterns: + - "*" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 12215c1f..947bfb8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: jobs: build: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 + uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0 with: upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }} secrets: diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index cb5c44f4..d0580d22 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -18,10 +18,10 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }} runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v5 + - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: 3 - - uses: actions/checkout@v4 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: fetch-depth: 0 - run: pip install . diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32812c1b..92b8350a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ on: jobs: test: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0 with: envs: | - linux: py310-xdist diff --git a/.github/workflows/ci_cron.yml b/.github/workflows/ci_cron.yml index 4324706a..21a74402 100644 --- a/.github/workflows/ci_cron.yml +++ b/.github/workflows/ci_cron.yml @@ -16,7 +16,7 @@ on: jobs: test: - uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0 if: (github.repository == 'spacetelescope/rad' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Weekly CI'))) with: envs: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38411858..961efc89 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: ref: main fetch-depth: 0 @@ -38,7 +38,7 @@ jobs: git push origin ${{ steps.set_release_date.outputs.version }} - name: Create GitHub release (triggers publish-to-pypi workflow) - uses: zendesk/action-create-release@v1 + uses: zendesk/action-create-release@746afbc52c1d78025a1a55b59ccd4f89208d4474 # master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07f9af03..8ddf97b3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -34,13 +34,13 @@ repos: - tomli - repo: https://github.com/asottile/pyupgrade - rev: 'v3.17.0' + rev: 'v3.18.0' hooks: - id: pyupgrade args: ["--py38-plus"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.6.8' + rev: 'v0.6.9' hooks: - id: ruff args: ["--fix"] @@ -51,7 +51,7 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black diff --git a/changes/452.feature.rst b/changes/452.feature.rst new file mode 100644 index 00000000..73ad4c73 --- /dev/null +++ b/changes/452.feature.rst @@ -0,0 +1 @@ +Added ePSF, ABVegaOffset, and ApCorr schemas diff --git a/changes/458.doc.rst b/changes/458.doc.rst new file mode 100644 index 00000000..c4975419 --- /dev/null +++ b/changes/458.doc.rst @@ -0,0 +1 @@ +Added ``refpix`` entry in ``ref_file``. diff --git a/changes/462.feature.rst b/changes/462.feature.rst new file mode 100644 index 00000000..ce8acea6 --- /dev/null +++ b/changes/462.feature.rst @@ -0,0 +1 @@ +remove var_flat from list of required mosaic attributes diff --git a/changes/485.removal.rst b/changes/485.removal.rst new file mode 100644 index 00000000..4cb8ace1 --- /dev/null +++ b/changes/485.removal.rst @@ -0,0 +1 @@ +Remove units from rad schema. diff --git a/src/rad/resources/manifests/datamodels-1.0.yaml b/src/rad/resources/manifests/datamodels-1.0.yaml index c2c3371c..886227fb 100644 --- a/src/rad/resources/manifests/datamodels-1.0.yaml +++ b/src/rad/resources/manifests/datamodels-1.0.yaml @@ -161,6 +161,16 @@ tags: description: |- Mosaic WCS parameters # Reference Modules +- tag_uri: asdf://stsci.edu/datamodels/roman/tags/reference_files/abvegaoffset-1.0.0 + schema_uri: asdf://stsci.edu/datamodels/roman/schemas/reference_files/abvegaoffset-1.0.0 + title: AB Vega Offset reference schema + description: |- + AB Vega Offset reference schema +- tag_uri: asdf://stsci.edu/datamodels/roman/tags/reference_files/apcorr-1.0.0 + schema_uri: asdf://stsci.edu/datamodels/roman/schemas/reference_files/apcorr-1.0.0 + title: Aperture correction reference schema + description: |- + Aperture correction reference schema - tag_uri: asdf://stsci.edu/datamodels/roman/tags/reference_files/dark-1.0.0 schema_uri: asdf://stsci.edu/datamodels/roman/schemas/reference_files/dark-1.0.0 title: Dark reference schema @@ -171,6 +181,11 @@ tags: title: Distortion reference schema description: |- Distortion reference schema +- tag_uri: asdf://stsci.edu/datamodels/roman/tags/reference_files/epsf-1.0.0 + schema_uri: asdf://stsci.edu/datamodels/roman/schemas/reference_files/epsf-1.0.0 + title: ePSF reference schema + description: |- + ePSF reference schema - tag_uri: asdf://stsci.edu/datamodels/roman/tags/reference_files/flat-1.0.0 schema_uri: asdf://stsci.edu/datamodels/roman/schemas/reference_files/flat-1.0.0 title: Flat reference schema diff --git a/src/rad/resources/schemas/photometry-1.0.0.yaml b/src/rad/resources/schemas/photometry-1.0.0.yaml index 32601ecf..3aad104e 100644 --- a/src/rad/resources/schemas/photometry-1.0.0.yaml +++ b/src/rad/resources/schemas/photometry-1.0.0.yaml @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/src/rad/resources/schemas/ramp-1.0.0.yaml b/src/rad/resources/schemas/ramp-1.0.0.yaml index d9291fbd..c5963140 100644 --- a/src/rad/resources/schemas/ramp-1.0.0.yaml +++ b/src/rad/resources/schemas/ramp-1.0.0.yaml @@ -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: | @@ -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: | diff --git a/src/rad/resources/schemas/ramp_fit_output-1.0.0.yaml b/src/rad/resources/schemas/ramp_fit_output-1.0.0.yaml index 102866ad..786d2748 100644 --- a/src/rad/resources/schemas/ramp_fit_output-1.0.0.yaml +++ b/src/rad/resources/schemas/ramp_fit_output-1.0.0.yaml @@ -17,16 +17,11 @@ properties: Slope of a specific segment for a ramp with uneven resultants, in units of electrons per second. A segment is a set of contiguous resultants where none of the resultants are saturated or cosmic ray-affected. - 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: ["electron / s"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + ndim: 3 + datatype: float32 + exact_datatype: true + unit: "electron / s" sigslope: title: Uncertainty on Slope for Specific Segment (electrons / s) description: | @@ -34,112 +29,78 @@ properties: resultants in units of electrons per second. A segment is a set of contiguous resultants where none of the resultants are saturated or cosmic ray-affected. - 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: ["electron / s"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + ndim: 3 + datatype: float32 + exact_datatype: true + unit: "electron / s" yint: title: Y-Intercept Derived for a Specific Segment (electrons) description: | Y-intercept derived for a specific segment (electrons). A segment is a set of contiguous resultants where none of the resultants are saturated or cosmic ray-affected. - 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: ["electron"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + ndim: 3 + datatype: float32 + exact_datatype: true + unit: "electron" sigyint: title: Uncertainty on Y-Intercept Derived for a Specific Segment (electrons) description: | Uncertainty on Y-intercept derived for a specific segment (electrons). A segment is a set of contiguous resultants where none of the resultants are saturated or cosmic ray-affected. - 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: ["electron"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + ndim: 3 + datatype: float32 + exact_datatype: true + unit: "electron" pedestal: title: Pedestal Array (electrons) description: | Signal at zero exposure time for each pixel in 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: 2 - unit: - tag: tag:astropy.org:astropy/units/unit-1.* - enum: ["electron"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + ndim: 2 + datatype: float32 + exact_datatype: true + unit: "electron" weights: title: Weights for Segment Specific Fit tag: tag:stsci.edu:asdf/core/ndarray-1.* ndim: 3 datatype: float32 exact_datatype: true + unit: "electron" crmag: title: Approximate Cosmic Ray Magnitudes (AB magnitude) description: | The magnitude of each segment that was flagged as having a cosmic ray hit. - 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: ["electron"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + ndim: 3 + datatype: float32 + exact_datatype: true + unit: "electron" var_poisson: title: Poisson Variance Associated with a Segment Specific Slope (electrons^2 / sec^2) description: | Poisson variance associated with a segment-specific slope, in units of electrons^2 / sec^2. - 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: ["electron2 / s2"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + ndim: 3 + datatype: float32 + exact_datatype: true + unit: "electron2 / s2" var_rnoise: title: Read Noise Variance Associated for a Segment Specific Slope (electrons^2 / sec^2) description: | Read noise-associated variance for a segment-specific slope, in units of electrons^2 / sec^2. - 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: ["electron2 / s2"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + ndim: 3 + datatype: float32 + exact_datatype: true + unit: "electron2 / s2" required: [meta, slope, sigslope, yint, sigyint, pedestal, weights, crmag, var_poisson, var_rnoise] propertyOrder: [meta, slope, sigslope, yint, sigyint, pedestal, weights, crmag, var_poisson, 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 new file mode 100644 index 00000000..2e5357dd --- /dev/null +++ b/src/rad/resources/schemas/reference_files/abvegaoffset-1.0.0.yaml @@ -0,0 +1,36 @@ +%YAML 1.1 +--- +$schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0 +id: asdf://stsci.edu/datamodels/roman/schemas/reference_files/abvegaoffset-1.0.0 + +title: AB Vega Offset Reference File Schema + +datamodel_name: AbvegaoffsetRefModel + +type: object +properties: + meta: + allOf: + - $ref: ref_common-1.0.0 + - type: object + properties: + reftype: + type: string + enum: [ABVEGAOFFSET] + data: + type: object + patternProperties: + "^(F062|F087|F106|F129|F146|F158|F184|F213|GRISM|PRISM|DARK)$": + type: object + properties: + abvega_offset: + title: AB-Vega Magntiude Offset + 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 + required: [abvega_offset] +required: [meta, data] +flowStyle: block +propertyOrder: [meta, data] +... 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 new file mode 100644 index 00000000..bc6ed9fd --- /dev/null +++ b/src/rad/resources/schemas/reference_files/apcorr-1.0.0.yaml @@ -0,0 +1,67 @@ +%YAML 1.1 +--- +$schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0 +id: asdf://stsci.edu/datamodels/roman/schemas/reference_files/apcorr-1.0.0 + +title: Aperture Correction Reference File Schema + +datamodel_name: ApcorrRefModel + +type: object +properties: + meta: + allOf: + - $ref: ref_common-1.0.0 + - type: object + properties: + reftype: + type: string + enum: [APCORR] + data: + type: object + patternProperties: + "^(F062|F087|F106|F129|F146|F158|F184|F213|GRISM|PRISM|DARK)$": + type: object + properties: + ap_corrections: + 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 + 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 + 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 + 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 + 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 + required: [ap_corrections, ee_fractions, ee_radii, sky_background_rin, sky_background_rout] +required: [meta, data] +flowStyle: block +propertyOrder: [meta, data] +... diff --git a/src/rad/resources/schemas/reference_files/epsf-1.0.0.yaml b/src/rad/resources/schemas/reference_files/epsf-1.0.0.yaml new file mode 100644 index 00000000..cbb09671 --- /dev/null +++ b/src/rad/resources/schemas/reference_files/epsf-1.0.0.yaml @@ -0,0 +1,75 @@ +%YAML 1.1 +--- +$schema: asdf://stsci.edu/datamodels/roman/schemas/rad_schema-1.0.0 +id: asdf://stsci.edu/datamodels/roman/schemas/reference_files/epsf-1.0.0 + +title: ePSF Reference File Schema + +datamodel_name: EpsfRefModel + +type: object +properties: + meta: + allOf: + - $ref: ref_common-1.0.0 + - $ref: ref_optical_element-1.0.0 + - type: object + properties: + reftype: + type: string + enum: [EPSF] + oversample: + title: Oversampling Factor + description: Factor by which the WFI pixels have been oversampled + to generate the PSF. + type: integer + effective_temperature: + title: Effective Temperature + description: Effective temperature (K) of the simulated source(s) + used to generate the PSF model. + type: array + items: + type: integer + defocus: + title: Defocus Waves + description: Number of defocus waves applied to the PSF. + type: array + items: + type: integer + pixel_x: + title: X Position + description: X-axis position of the PSF models. The order of the + positions corresponds to the order of the PSFs in the psf array. + type: array + items: + type: number + pixel_y: + title: Y Position + description: Y-axis position of the PSF models. The order of the + positions corresponds to the order of the PSFs in the psf array. + type: array + items: + type: number + required: [pixel_x, pixel_y] + psf: + title: ePSF Stamps + description: Postage stamps of ePSF models. The 4-dimensional array is + ordered by (defocus, effective_temperature, pixel_x, pixel_y) + in the file metadata. + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 4 + extended_psf: + title: Extended ePSF Stamp + description: Postage stamp of a bright ePSF model with extended wings. + If present, a single, in-focus, monochromatic ePSF is generated at + the center of the detector. + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 +required: [meta, psf] +flowStyle: block +propertyOrder: [meta, psf, extended_psf] +... diff --git a/src/rad/resources/schemas/sky_background-1.0.0.yaml b/src/rad/resources/schemas/sky_background-1.0.0.yaml index e9b4c924..c3c58541 100644 --- a/src/rad/resources/schemas/sky_background-1.0.0.yaml +++ b/src/rad/resources/schemas/sky_background-1.0.0.yaml @@ -9,18 +9,12 @@ properties: level: title: Sky Background Level description: | - The sky background level in DN / s. - anyOf: - - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - datatype: - enum: ["float64"] - unit: - oneOf: - - tag: tag:stsci.edu:asdf/unit/unit-1.* - - tag: tag:astropy.org:astropy/units/unit-1.* - enum: ["DN / s", "MJy.sr**-1"] - - type: "null" + The sky background level in DN / s or MJy.sr**-1. + value: + anyOf: + - type: number + - type: null + unit: ["DN / s", "MJy.sr**-1"] method: title: Sky Background Method description: | diff --git a/src/rad/resources/schemas/wfi_image-1.0.0.yaml b/src/rad/resources/schemas/wfi_image-1.0.0.yaml index 6b91544f..4ffa1a28 100644 --- a/src/rad/resources/schemas/wfi_image-1.0.0.yaml +++ b/src/rad/resources/schemas/wfi_image-1.0.0.yaml @@ -34,18 +34,11 @@ properties: description: | Science data, excluding border reference pixels, in DNs per second or MJ per steradian. - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - oneOf: - - tag: tag:stsci.edu:asdf/unit/unit-1.* - - tag: tag:astropy.org:astropy/units/unit-1.* - enum: ["DN / s", "MJy.sr**-1"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: ["DN / s", "MJy.sr**-1"] dq: title: Data Quality Flags description: | @@ -55,143 +48,89 @@ properties: exact_datatype: true ndim: 2 err: - title: Error (DN / s) or (MJy / sr) + title: Error (DN / s) description: | Error in units of DNs per second or MJ per steradian. - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - oneOf: - - tag: tag:stsci.edu:asdf/unit/unit-1.* - - tag: tag:astropy.org:astropy/units/unit-1.* - enum: ["DN / s", "MJy.sr**-1"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: ["DN / s", "MJy.sr**-1"] var_poisson: - title: Poisson Variance (DN^2 / s^2) or (MJy^2 / sr^2) + title: Poisson Variance (DN^2 / s^2) description: | - Poisson variance in units of DN^2 / second^2 - or MJ per steradian. - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - oneOf: - - tag: tag:stsci.edu:asdf/unit/unit-1.* - - tag: tag:astropy.org:astropy/units/unit-1.* - enum: ["DN2 / s2", "MJy**2.sr**-2"] + Poisson variance in units of DN^2 / second^2. + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: ["DN2 / s2", "MJy**2.sr**-2"] var_rnoise: - title: Read Noise (DN^2 / s^2) or (MJy^2 / sr^2) - description: | - Read noise in units of DN^2 / second^2 or MJ^2 per steradian^2. - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - oneOf: - - tag: tag:stsci.edu:asdf/unit/unit-1.* - - tag: tag:astropy.org:astropy/units/unit-1.* - enum: ["DN2 / s2", "MJy**2.sr**-2"] + title: Read Noise (DN^2 / s^2) + description: | + Read noise in units of DN^2 / second^2. + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: ["DN2 / s2", "MJy**2.sr**-2"] var_flat: - title: Variance for Estimate of Flat Pixel Flux (DN^2 / s^2) or (MJy^2 / sr^2) + title: Variance for Estimate of Flat Pixel Flux (DN^2 / s^2). description: | Variance for estimate of flat pixel flux in units of - DN^2 / second^2 or MJ^2 per steradian^2. - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - oneOf: - - tag: tag:stsci.edu:asdf/unit/unit-1.* - - tag: tag:astropy.org:astropy/units/unit-1.* - enum: ["DN2 / s2", "MJy**2.sr**-2"] + DN^2 / second^2. + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: ["DN2 / s2", "MJy**2.sr**-2"] 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.* + datatype: uint16 + exact_datatype: true + ndim: 3 + unit: "DN" 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.* - 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.* + datatype: float32 + exact_datatype: true + ndim: 3 + unit: "DN" 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.* + datatype: float32 + exact_datatype: true + ndim: 3 + unit: "DN" 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.* + datatype: float32 + exact_datatype: true + ndim: 3 + unit: "DN" 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.* + datatype: float32 + exact_datatype: true + ndim: 3 + unit: "DN" 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: | 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 df3de2e4..f62f8be4 100644 --- a/src/rad/resources/schemas/wfi_mosaic-1.0.0.yaml +++ b/src/rad/resources/schemas/wfi_mosaic-1.0.0.yaml @@ -48,28 +48,18 @@ properties: description: | The science data array, excluding the border reference pixels in units of MJy / steradian. - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - tag: tag:stsci.edu:asdf/unit/unit-1.* - enum: ["MJy.sr**-1"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: "MJy.sr**-1" err: title: Error Data (MJy / steradian) - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - tag: tag:stsci.edu:asdf/unit/unit-1.* - enum: ["MJy.sr**-1"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: "MJy.sr**-1" context: title: Context Data tag: tag:stsci.edu:asdf/core/ndarray-1.* @@ -84,45 +74,30 @@ properties: ndim: 2 var_poisson: title: Poisson Variability (MJy^2 / steradian^2) - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - tag: tag:stsci.edu:asdf/unit/unit-1.* - enum: ["MJy**2.sr**-2"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: "MJy**2.sr**-2" var_rnoise: title: Read Noise Variance (MJy^2 / steradian^2 - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - tag: tag:stsci.edu:asdf/unit/unit-1.* - enum: ["MJy**2.sr**-2"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: "MJy**2.sr**-2" var_flat: title: Flat Field Variance (MJy^2 / steradian^2) - tag: tag:stsci.edu:asdf/unit/quantity-1.* - properties: - value: - tag: tag:stsci.edu:asdf/core/ndarray-1.* - datatype: float32 - exact_datatype: true - ndim: 2 - unit: - tag: tag:stsci.edu:asdf/unit/unit-1.* - enum: ["MJy**2.sr**-2"] + tag: tag:stsci.edu:asdf/core/ndarray-1.* + datatype: float32 + exact_datatype: true + ndim: 2 + unit: "MJy**2.sr**-2" cal_logs: tag: asdf://stsci.edu/datamodels/roman/tags/cal_logs-1.0.0 propertyOrder: [meta, data, context, err, weight, var_poisson, var_rnoise, var_flat, cal_logs] flowStyle: block -required: [meta, data, context, err, weight, var_poisson, var_rnoise, var_flat, +required: [meta, data, context, err, weight, var_poisson, var_rnoise, cal_logs] ... 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 5a39091a..78bd2fbf 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 @@ -17,30 +17,21 @@ properties: title: Science Data (DN) description: | Science data, including reference pixels 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 + amp33: title: Amplifier 33 Reference Pixel Data (DN) description: | Reference pixel data from amplifier 33 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 resultantdq: title: Resultant Data Quality Array