Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/spacetelescope/rad into RAD…
Browse files Browse the repository at this point in the history
…-89_Pointing
  • Loading branch information
PaulHuwe committed Oct 19, 2024
2 parents ff51e7b + 9cb5a40 commit 26e5b2c
Show file tree
Hide file tree
Showing 23 changed files with 428 additions and 408 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"]
Expand All @@ -51,7 +51,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black

Expand Down
1 change: 1 addition & 0 deletions changes/452.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added ePSF, ABVegaOffset, and ApCorr schemas
1 change: 1 addition & 0 deletions changes/458.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added ``refpix`` entry in ``ref_file``.
1 change: 1 addition & 0 deletions changes/462.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remove var_flat from list of required mosaic attributes
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.
15 changes: 15 additions & 0 deletions src/rad/resources/manifests/datamodels-1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
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 26e5b2c

Please sign in to comment.