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

Release V1.4.0 to stable #915

Merged
merged 96 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
7e5ed1c
set clip_on to avoid labels outside plot axes
mperrin Jun 11, 2024
f26a1e4
improve wfe_histogram arrows display; add min_wfe and max_wfe options
mperrin Jun 11, 2024
7aff283
pep8 style fixes
mperrin Jun 11, 2024
7c74ffb
Merge pull request #870 from mperrin/trending_plot_fixes
mperrin Jun 11, 2024
b0974f7
build(deps): bump photutils from 1.12.0 to 1.13.0
dependabot[bot] Jul 1, 2024
aa2ab6a
add dedicated cache workflow that can be called by other projects
zacharyburnett Jul 8, 2024
7e71ff5
test with this branch (remove before merge)
zacharyburnett Jul 8, 2024
4431c74
fix extract and path
zacharyburnett Jul 8, 2024
5557ff8
remove schedule trigger
zacharyburnett Jul 8, 2024
afbff70
add cycle 3 routine WFS PIDs
mperrin Jul 8, 2024
d4252a1
more strict units handling; fixes some issues for astropy 6.0.0 compa…
mperrin Jul 8, 2024
23c180e
Merge pull request #872 from spacetelescope/dependabot/pip/photutils-…
mperrin Jul 8, 2024
d36ca68
build(deps): bump scipy from 1.13.0 to 1.14.0
dependabot[bot] Jul 8, 2024
15f5374
some additional units handling
mperrin Jul 8, 2024
89fcb26
Merge pull request #879 from mperrin/fix_unit_bug_in_fast_datacube
obi-wan76 Jul 8, 2024
8c414eb
rename `cache.yml` to `download_data.yml`
zacharyburnett Jul 10, 2024
9ac4c72
retrieve latest cache key by default
zacharyburnett Jul 10, 2024
e79fdfd
also trigger data download on a WebbPSF GitHub release
zacharyburnett Jul 10, 2024
eea2012
small fix for WEBBPSF_PATH
zacharyburnett Jul 10, 2024
3796c0a
add comments to the top of the workflows indicating how to use them
zacharyburnett Jul 16, 2024
5c437b6
Merge pull request #877 from zacharyburnett/ci/cache
BradleySappington Jul 16, 2024
302c7ab
fix syntax error by just using == and ||
zacharyburnett Jul 16, 2024
0aec204
Merge pull request #882 from zacharyburnett/fix/download_data_workflow
mperrin Jul 16, 2024
0347188
add names to workflows
zacharyburnett Jul 16, 2024
cebb230
also fix version retrieval with echo
zacharyburnett Jul 16, 2024
15376a6
set a generalized cache path, allowing multiple data caches to be com…
zacharyburnett Jul 16, 2024
6b65649
Merge pull request #881 from zacharyburnett/ci/workflow_names
mperrin Jul 16, 2024
fb4dd05
Merge pull request #883 from zacharyburnett/ci/general_cache_path
mperrin Jul 16, 2024
e18aee2
create data directory when caching data
zacharyburnett Jul 17, 2024
63a2e08
correct path to version.txt
zacharyburnett Jul 17, 2024
5ce1724
use pathlib to handle paths with double slashes
zacharyburnett Jul 17, 2024
6dd0cd7
Merge pull request #885 from zacharyburnett/ci/create_data_dir
BradleySappington Jul 17, 2024
1b4bef6
remove extra whitespace to resolve pep8 linting
zacharyburnett Jul 17, 2024
5f3db8b
Merge pull request #886 from zacharyburnett/fix/paths_handling
BradleySappington Jul 17, 2024
b367271
fix typo
mperrin Jul 22, 2024
d4e4ea3
Merge pull request #889 from mperrin/fix_888
BradleySappington Jul 24, 2024
b499e1b
start implementation of framework for IFU broadening models
mperrin Jul 26, 2024
737835f
improve setup_sim_to_match_file for MIRI MRS files
mperrin Jul 26, 2024
aad7794
continue IFU effects implementation; add tests; tweak and improve log…
mperrin Jul 26, 2024
5f3aa29
code lint cleanup
mperrin Jul 26, 2024
04e05b9
fix tests
mperrin Jul 26, 2024
be50906
fix tests
mperrin Jul 26, 2024
350f65e
Use MASK_NRM to match AMI data
rcooper295 Jul 31, 2024
e22c3b1
Merge pull request #893 from rcooper295/match_data_ami
obi-wan76 Jul 31, 2024
cab6ef4
Merge pull request #878 from mperrin/trending_add_cyc3_pids
obi-wan76 Jul 31, 2024
f1679be
implement instrument rotation updates from SIAF for NIRSpec; fixes #868
mperrin Aug 2, 2024
c0bdd03
add new citation file
BradleySappington Aug 2, 2024
20ef963
update Liscence date range
BradleySappington Aug 2, 2024
21fb095
remove previous citation
BradleySappington Aug 2, 2024
c214bd8
add marcio
BradleySappington Aug 2, 2024
eb9acd1
improve docs for matching PSFs to data
mperrin Aug 2, 2024
05e2530
update psf_grid docs. Fixes #887
mperrin Aug 2, 2024
ecbff33
add Justin
BradleySappington Aug 2, 2024
d78b47e
Added Marshall and Charles
BradleySappington Aug 5, 2024
e41d43a
add Joseph Long
BradleySappington Aug 5, 2024
caa3540
typo fix and more docs
mperrin Aug 5, 2024
64bd6bc
adding Shannon Osborne
BradleySappington Aug 6, 2024
c46f71b
update Shannon Affiliation
BradleySappington Aug 6, 2024
04e765e
add Robel
BradleySappington Aug 6, 2024
9244107
Merge pull request #897 from mperrin/enhance_868_nrs_aper_pas
obi-wan76 Aug 7, 2024
ca74f05
Update requirements.txt
BradleySappington Aug 26, 2024
702792d
redoing order
BradleySappington Aug 27, 2024
53ebd2a
Merge pull request #874 from spacetelescope/dependabot/pip/scipy-1.14.0
BradleySappington Aug 27, 2024
8c246c9
further edits to matching psfs to data docs page
mperrin Aug 28, 2024
1afcd8e
Merge pull request #898 from BradleySappington/update_citations
mperrin Aug 28, 2024
250ccdc
great big docs update, including converging usage.rst to .ipynb
mperrin Aug 28, 2024
57ae29d
enhance capabilities to simulate PSFs with larger JWST pupil with a n…
obi-wan76 Sep 3, 2024
d39fa3d
using z range in requirements.txt
BradleySappington Sep 4, 2024
1c915ce
Merge pull request #909 from BradleySappington/z-range-for-dependencies
BradleySappington Sep 4, 2024
9f1d513
Remove deprecated astroconda text from dev notes on making a release
mperrin Sep 10, 2024
a40258a
update cross ref links, including for switch to nbsphinx
mperrin Sep 10, 2024
c6ec0ad
doc formatting and doc string updates
mperrin Sep 10, 2024
e728395
Delete the RST versions of these, which are now replaced by .ipynb ve…
mperrin Sep 10, 2024
cf9a57a
Merge branch 'develop' into ifu_mode_improvements_part2
mperrin Sep 10, 2024
e67280f
Merge branch 'develop' into ifu_mode_improvements_part2
mperrin Sep 10, 2024
37e6d4c
Initial updates of Roman figures, along with python script
Skyhawk172 Sep 11, 2024
a35e5d7
fixed markdown caption
Skyhawk172 Sep 11, 2024
1213260
Minor updates and rephrasing in docs page. Add docs into table of con…
mperrin Sep 11, 2024
187e449
A few more tweaks to figs and rst
Skyhawk172 Sep 11, 2024
02629e4
fixed rst captions
Skyhawk172 Sep 11, 2024
8d69ab9
fixed how_tos.py following lint
Skyhawk172 Sep 11, 2024
d37fb3d
add psf_grids.ipynb
mperrin Sep 11, 2024
883bbbd
Updated Roman notebook
Skyhawk172 Sep 11, 2024
95abd06
remove extra debug test cell
mperrin Sep 11, 2024
5380820
add test_mast_wss.py
mperrin Sep 11, 2024
e686a22
fixes from review
mperrin Sep 11, 2024
b45d82d
Merge pull request #899 from mperrin/docs_improvements_v131
obi-wan76 Sep 11, 2024
923748f
lint fixes
mperrin Sep 12, 2024
d99fa5e
Merge branch 'ifu_mode_improvements_part2' of github.com:mperrin/webb…
mperrin Sep 12, 2024
9cf185a
Merge pull request #908 from spacetelescope/webbpsf_load_wss_pupil_size
mperrin Sep 12, 2024
2c128b5
Merge pull request #890 from mperrin/ifu_mode_improvements_part2
obi-wan76 Sep 12, 2024
be0f790
Merge pull request #910 from Skyhawk172/roman-docs-updates
obi-wan76 Sep 12, 2024
6a616bd
Merge pull request #911 from mperrin/add_test_mast_wss
obi-wan76 Sep 12, 2024
9b26e0d
update versions of webbpsf-data and documentation
BradleySappington Sep 13, 2024
cbfa5dc
more pre-release upates
BradleySappington Sep 13, 2024
beda656
Merge pull request #912 from spacetelescope/pre-release-140
BradleySappington Sep 13, 2024
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
18 changes: 13 additions & 5 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name: CI
on: [push, pull_request]

jobs:
retrieve_cache:
uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@develop
with:
minimal: true
tests:
needs: [ retrieve_cache ]
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -57,18 +62,21 @@ jobs:
run: pip install tox tox-conda>=0.2

- name: Get WebbPSF Data
run: | # Get WebbPSF data files (just a subset of the full dataset!) and set up environment variable
wget https://stsci.box.com/shared/static/gkbnn3jwcootr9riwv0rv1t8rpvxl3vr.gz -O /tmp/minimal-webbpsf-data.tar.gz
tar -xzvf /tmp/minimal-webbpsf-data.tar.gz
echo "WEBBPSF_PATH=${{github.workspace}}/webbpsf-data" >> $GITHUB_ENV
uses: actions/cache/restore@v4
with:
path: ${{ needs.retrieve_cache.outputs.cache_path }}
key: ${{ needs.retrieve_cache.outputs.cache_key }}

- name: Set WebbPSF data path
run: echo "WEBBPSF_PATH=${{ needs.retrieve_cache.outputs.cache_path }}/webbpsf-data/" >> $GITHUB_ENV

- name: Check conda info
run: conda info

- name: Run tests with requirements file
if: ${{ contains(matrix.toxenv,'-latest') }}
run: |
cp $RUNNER_WORKSPACE/webbpsf/requirements.txt /tmp/
cp requirements.txt ${{ runner.temp }}
tox -e ${{ matrix.toxenv }}

- name: Run tests
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/download_data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# downloads WebbPSF dataset and caches it to GitHub cache,
# making a new cache for a new data version
# the cache key is in the form `webbpsf-data-mini-1.3.0`,
# `webbpsf-data-full-1.2.6`, etc.
#
# To provide your own test workflow with the WebbPSF dataset,
# you should use this workflow to set up a cache in your repository,
# and then use `retrieve_cache.yml` to retrieve that cache so you
# don't have to download the entire dataset every time.
#
# to set up a cache of WebbPSF data in your own repository,
# create a workflow like the following:
#
# # .github/workflows/download_webbpsf.yml
# name: download and cache WebbPSF data
# on:
# schedule:
# - cron: "0 0 * * 0"
# jobs:
# download_webbpsf:
# uses: spacetelescope/webbpsf/.github/workflows/download_data.yml@develop
# with:
# minimal: true

name: download and cache data

on:
workflow_call:
inputs:
minimal:
description: minimal dataset
type: boolean
required: false
default: true
outputs:
version:
value: ${{ jobs.download.outputs.version }}
cache_path:
value: ${{ jobs.download.outputs.cache_path }}
cache_key:
value: ${{ jobs.download.outputs.cache_key }}
workflow_dispatch:
inputs:
minimal:
description: minimal dataset
type: boolean
required: false
default: true
schedule:
- cron: "0 0 * * 0"
release:

env:
DATA_URL: https://stsci.box.com/shared/static/qxpiaxsjwo15ml6m4pkhtk36c9jgj70k.gz
MINIMAL_DATA_URL: https://stsci.box.com/shared/static/0dt9z6b927iqgtify2a4cvls9hvapi6k.gz

jobs:
download:
name: download and cache WebbPSF data
runs-on: ubuntu-latest
steps:
- run: wget ${{ (github.event_name == 'schedule' || github.event_name == 'release') && env.MINIMAL_DATA_URL || inputs.minimal && env.MINIMAL_DATA_URL || env.DATA_URL }} -O ${{ runner.temp }}/webbpsf-data.tar.gz
- run: mkdir ${{ runner.temp }}/data/
- run: tar -xzvf ${{ runner.temp }}/webbpsf-data.tar.gz -C ${{ runner.temp }}/data/
- id: cache_path
run: echo cache_path=${{ runner.temp }}/data/ >> $GITHUB_OUTPUT
- id: version
run: echo "version=$(cat ${{ steps.cache_path.outputs.cache_path }}/webbpsf-data/version.txt)" >> $GITHUB_OUTPUT
- id: cache_key
run: echo "cache_key=webbpsf-data-${{ (github.event_name == 'schedule' || github.event_name == 'release') && 'mini' || inputs.minimal && 'mini' || 'full' }}-${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
- uses: actions/cache/save@v4
with:
path: ${{ runner.temp }}/data/
key: ${{ steps.cache_key.outputs.cache_key }}
outputs:
version: ${{ steps.version.outputs.version }}
cache_path: ${{ steps.cache_path.outputs.cache_path }}
cache_key: ${{ steps.cache_key.outputs.cache_key }}

69 changes: 69 additions & 0 deletions .github/workflows/retrieve_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# retrieves the latest cache key for WebbPSF data;
# the cache key is in the form `webbpsf-data-mini-1.3.0`,
# `webbpsf-data-full-1.2.6`, etc.
#
# to retrieve the WebbPSF data cache in your test workflow,
# first create a cache of the dataset in your repository
# (see `download_data.yml` for instructions), then
# call this workflow as a needed job and use `actions/cache/restore`
# to place the data in your test job:
#
# # .github/workflows/tests.yml
# name: run tests
# ...
# jobs:
# webbpsf_data_cache_key:
# uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@develop
# with:
# minimal: true
# tests:
# needs: [ webbpsf_data_cache_key ]
# steps:
# ...
# - name: retrieve WebbPSF data cache
# uses: actions/cache/restore@v4
# with:
# path: ${{ runner.temp }}/webbpsf-data
# key: ${{ needs.webbpsf_data_cache_key.outputs.cache_key }}
# ...

name: retrieve latest data cache key

on:
workflow_call:
inputs:
minimal:
description: minimal dataset
type: boolean
required: false
default: true
outputs:
version:
value: ${{ jobs.retrieve_latest_cache_key.outputs.version }}
cache_path:
value: ${{ jobs.retrieve_latest_cache_key.outputs.cache_path }}
cache_key:
value: ${{ jobs.retrieve_latest_cache_key.outputs.cache_key }}

jobs:
retrieve_latest_cache_key:
name: retrieve latest WebbPSF data cache key
runs-on: ubuntu-latest
steps:
- name: retrieve latest data cache key
id: latest_cache_key
run: |
# use actions/gh-actions-cache to allow filtering by key
gh extension install actions/gh-actions-cache
CACHE_KEY=$(gh actions-cache list -R ${{ github.repository }} --key webbpsf-data-${{ inputs.minimal && 'mini' || 'full' }}- --sort created-at | cut -f 1 | head -n 1)
if [ "$CACHE_KEY" == '' ]; then exit 1; fi
echo cache_key=$CACHE_KEY >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}
- run: echo ${{ steps.latest_cache_key.outputs.cache_key }}
- id: version
run: echo "version=$(echo ${{ steps.latest_cache_key.outputs.cache_key }} | awk -F '-' '{print $4}')" >> $GITHUB_OUTPUT
outputs:
version: ${{ steps.version.outputs.version }}
cache_path: ${{ runner.temp }}/data/
cache_key: ${{ steps.latest_cache_key.outputs.cache_key }}
12 changes: 0 additions & 12 deletions CITATION

This file was deleted.

59 changes: 59 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: WebbPSF
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Marshall
family-names: Perrin
affiliation: Space Telescope Science Institute
orcid: 'https://orcid.org/0000-0002-3191-8151'
- given-names: Marcio
family-names: Melendez
email: [email protected]
affiliation: Space Telescope Science Institute
orcid: 'https://orcid.org/0000-0001-8485-0325'
- given-names: Shannon
family-names: Osborne
affiliation: Fred Hutchinson Cancer Center
orcid: https://orcid.org/0009-0001-8609-1518'
- given-names: Robel
family-names: Geda
affiliation: Princeton University
orcid: 'https://orcid.org/0000-0003-1509-9966'
- given-names: Bradley
family-names: Sappington
email: [email protected]
affiliation: Space Telescope Science Institute
orcid: 'https://orcid.org/0009-0008-2911-2555'
- given-names: Charles-Philippe
family-names: Lajoie
affiliation: Space Telescope Science Institute
orcid: 'https://orcid.org/0009-0003-3993-8338'
- given-names: Joseph
family-names: Long
affiliation: Flatiron Institute
orcid: 'https://orcid.org/0000-0003-1905-9443'
- given-names: "O. Justin"
family-names: "Otor"
affiliation: "Otor"
orcid: 'https://orcid.org/0000-0002-4679-5692'
repository-code: 'https://github.com/spacetelescope/webbpsf'
abstract: >-
WebbPSF produces simulated PSFs for the James Webb Space
Telescope, NASA's flagship infrared space telescope.
WebbPSF can simulate images for any of the four science
instruments plus the fine guidance sensor, including both
direct imaging, coronagraphic, and spectroscopic modes.


WebbPSF also supports simulating PSFs for the upcoming
Nancy Grace Roman Space Telescope (formerly WFIRST),
including its Wide Field Instrument and a preliminary
version of the Coronagraph Instrument.
license: BSD-3-Clause
version: 1.4.0
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2010-2018, Space Telescope Science Institute, AURA
Copyright (c) 2010-2024, Space Telescope Science Institute, AURA
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
54 changes: 41 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,18 @@
"numpydoc",
]


if on_rtd:
extensions.append('sphinx.ext.mathjax')

numpydoc_show_class_members = False

autosummary_generate = True
graphviz_dot = "dot"
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
# The suffix of source filenames.
source_suffix = ".rst"

# The master toctree document.
Expand All @@ -118,26 +119,53 @@
]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
pygments_style = "default"

intersphinx_mapping.update( # noqa - defined in star import
{
"poppy": ("http://poppy-optics.readthedocs.io/", None),
}
)
#intersphinx_mapping.update( # noqa - defined in star import
# {
# "poppy": ("http://poppy-optics.readthedocs.io/", None),
# }
#)


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "stsci_rtd_theme"
html_theme_path = [stsci_rtd_theme.get_html_theme_path()]
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
html_theme_options = {
"collapse_navigation": True,
"sticky_navigation": False,
# "nosidebar": "false",
# "sidebarbgcolor": "#4db8ff",
# "sidebartextcolor": "black",
# "sidebarlinkcolor": "black",
# "headbgcolor": "white",
}

html_logo = '_static/stsci_pri_combo_mark_white.png'

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# html_title = None

# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
10 changes: 6 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ WebbPSF is a Python package that computes simulated point spread functions (PSFs
:align: center
:alt: Sample PSFs for the filters in the Roman WFI.

Sample PSFs for the filters in the Roman WFI.
Sample PSFs for the filters in the Roman WFI on SCA01. Note that
the prism and grism PSFs shown here are monochromatic.


**Contributors:**
Expand All @@ -24,7 +25,7 @@ WebbPSF has been developed by Marshall Perrin, Marcio Meléndez, Shannon Osborne
Getting Started with WebbPSF
----------------------------

See :ref:`using_api`.
See `Using WebbPSF <usage.html>`_.

.. admonition:: Quickstart Jupyter Notebook

Expand All @@ -48,8 +49,8 @@ Contents
intro.rst
installation.rst
relnotes.rst
usage.rst
psf_grids.rst
usage.ipynb
psf_grids.ipynb

.. toctree::
:maxdepth: 1
Expand All @@ -60,6 +61,7 @@ Contents
jwst_measured_opds.ipynb
jwst_detector_effects.ipynb
jwst_matching_psfs_to_data.ipynb
jwst_large_psf.ipynb
jwst_optical_budgets.ipynb
jwst_psf_subtraction.ipynb
jwst_wavefront_deltas.ipynb
Expand Down
Loading
Loading