Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSF fitting methods #794

Merged
merged 6 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll note here that this file on Box that is shared between several folks at INS. If changes are necessary in the future, contact Marcio Melendez and/or Brad Sappington.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes needed here, but for romanisim it's annoying that we have to update this each time a new webbpsf release happens. I haven't understood why this file can't have a name like webbpsf-latest-release-test.gz or something, and when a new version comes out the new test data file gets updated. That would mean that each new version doesn't require new CI updates.

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 @@ -96,6 +96,8 @@ general

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

- Add PSF photometry methods [#794]

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

Expand Down
3 changes: 2 additions & 1 deletion 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',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me like this is likely out now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last remaining and necessary addition to photutils is from astropy/photutils#1617. I'll ask @larrybradley if the next release is likely to be soon.

'pyparsing >=2.4.7',
'requests >=2.22',
'rad >= 0.17.1',
Expand All @@ -33,6 +33,7 @@ dependencies = [
'tweakwcs >=0.8.0',
'spherical-geometry >= 1.2.22',
'stsci.imagestats >= 1.6.3',
'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/spacetelescope/crds
git+https://github.com/spacetelescope/stcal
git+https://github.com/spacetelescope/tweakwcs
git+https://github.com/spacetelescope/metrics_logger
git+https://github.com/astropy/photutils.git
Loading