Skip to content

Commit

Permalink
PSF fitting methods (spacetelescope#794)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 authored and mairanteodoro committed Sep 12, 2023
1 parent 8c186dc commit db4aa8a
Show file tree
Hide file tree
Showing 8 changed files with 621 additions and 13 deletions.
45 changes: 35 additions & 10 deletions .github/workflows/roman_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,21 @@ concurrency:
cancel-in-progress: true

jobs:
crds:
name: retrieve current CRDS context
data:
name: retrieve current CRDS context, and WebbPSF data
runs-on: ubuntu-latest
env:
OBSERVATORY: roman
CRDS_SERVER_URL: https://roman-crds-test.stsci.edu
CRDS_PATH: /tmp/crds_cache
CRDS_PATH: /tmp/data
outputs:
context: ${{ steps.context.outputs.pmap }}
path: ${{ steps.path.outputs.path }}
server: ${{ steps.server.outputs.url }}
hash: ${{ steps.data_hash.outputs.hash }}
webbpsf_path: ${{ steps.webbpsf_path.outputs.path }}
steps:
# crds:
- id: context
run: >
echo "pmap=$(
Expand All @@ -40,10 +47,27 @@ jobs:
run: echo "path=${{ env.CRDS_PATH }}" >> $GITHUB_OUTPUT
- id: server
run: echo "url=${{ env.CRDS_SERVER_URL }}" >> $GITHUB_OUTPUT
outputs:
context: ${{ steps.context.outputs.pmap }}
path: ${{ steps.path.outputs.path }}
server: ${{ steps.server.outputs.url }}
# webbpsf:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: data
run: |
echo "webbpsf_url=https://stsci.box.com/shared/static/n1fealx9q0m6sdnass6wnyfikvxtc0zz.gz" >> $GITHUB_OUTPUT
echo "path=/tmp/data" >> $GITHUB_OUTPUT
- run: |
mkdir -p ${{ steps.data.outputs.path }}
wget ${{ steps.data.outputs.webbpsf_url }} -O ${{ steps.data.outputs.path }}/minimal-webbpsf-data.tar.gz
cd ${{ steps.data.outputs.path }}
tar -xzvf minimal-webbpsf-data.tar.gz
- id: data_hash
run: echo "hash=${{ steps.data.outputs.hash }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.data.outputs.path }}
key: data-${{ steps.data_hash.outputs.hash }}
- id: webbpsf_path
run: echo "path=${{ steps.data.outputs.path }}/webbpsf-data" >> $GITHUB_OUTPUT
check:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
Expand All @@ -53,7 +77,7 @@ jobs:
- linux: build-dist
test:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
needs: [ crds ]
needs: [ data ]
with:
setenv: |
CRDS_PATH: ${{ needs.crds.outputs.path }}
Expand All @@ -65,8 +89,9 @@ jobs:
DD_GIT_REPOSITORY_URL: ${{ github.repositoryUrl }}
DD_GIT_COMMIT_SHA: ${{ github.sha }}
DD_GIT_BRANCH: ${{ github.ref_name }}
cache-path: /tmp/crds_cache
cache-key: crds-${{ needs.crds_context.outputs.pmap }}
WEBBPSF_PATH: ${{ needs.data.outputs.webbpsf_path }}
cache-path: ${{ needs.data.outputs.path }}
cache-key: data-${{ needs.data.outputs.hash }}
envs: |
- linux: py39-oldestdeps-cov
pytest-results-summary: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/roman_ci_cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
env:
OBSERVATORY: roman
CRDS_PATH: /tmp/crds_cache
CRDS_PATH: /tmp/data
CRDS_SERVER_URL: https://roman-crds-test.stsci.edu
steps:
- id: context
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ general

- Add ``dev`` install option. [#835]

- Add PSF photometry methods [#794]

0.11.0 (2023-05-31)
===================

Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies = [
'gwcs >=0.18.1',
'jsonschema >=4.8',
'numpy >=1.22',
'photutils >=1.6.0',
'photutils @ git+https://github.com/astropy/photutils.git',
'pyparsing >=2.4.7',
'requests >=2.22',
'rad >= 0.17.1',
Expand All @@ -33,7 +33,8 @@ dependencies = [
'tweakwcs >=0.8.0',
'spherical-geometry >= 1.2.22',
'stsci.imagestats >= 1.6.3',
'drizzle >= 1.13.7'
'drizzle >= 1.13.7',
'webbpsf == 1.1.1',
]
dynamic = ['version']

Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ git+https://github.com/mairanteodoro/stcal.git@stcal-alignment
git+https://github.com/spacetelescope/crds
git+https://github.com/spacetelescope/tweakwcs
git+https://github.com/spacetelescope/metrics_logger
git+https://github.com/astropy/photutils.git
Loading

0 comments on commit db4aa8a

Please sign in to comment.