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

WebbPSF to STPSF #951

Merged
merged 29 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ecf2002
import stpsf
BradleySappington Dec 13, 2024
2ede7a0
update workflow
BradleySappington Dec 16, 2024
8142535
read the docs redirect
BradleySappington Dec 16, 2024
202371f
remove webbpsf conftest.py
BradleySappington Dec 16, 2024
7374e06
update workflows
BradleySappington Dec 16, 2024
31fa455
simplify tox
BradleySappington Dec 16, 2024
cfad72e
remove workflows
BradleySappington Dec 18, 2024
a4247d5
update warning
BradleySappington Dec 18, 2024
3e13ca5
update warning
BradleySappington Dec 18, 2024
3c1936b
only warn once
BradleySappington Dec 18, 2024
f35f759
spelling
BradleySappington Dec 18, 2024
53806a8
Simplify warning
BradleySappington Dec 18, 2024
320da5d
update warning
BradleySappington Dec 19, 2024
4f03e61
Update warning message to include link
BradleySappington Feb 11, 2025
f3e4cec
re-establish testing suite
BradleySappington Feb 11, 2025
9f52133
update deprecated action
BradleySappington Feb 11, 2025
87e95c6
remove coverage
BradleySappington Feb 11, 2025
558b537
add tests back to ci_workflows
BradleySappington Feb 11, 2025
7c81372
try to not mess with tests
BradleySappington Feb 11, 2025
09fc028
temp check for tox update
BradleySappington Feb 11, 2025
f5de270
update __init__ with proper link
BradleySappington Feb 12, 2025
559544c
update test suite
BradleySappington Feb 12, 2025
6816694
update ci_workflow env
BradleySappington Feb 12, 2025
b8ae710
update test
BradleySappington Feb 12, 2025
9c0d4b2
add import-mode
BradleySappington Feb 12, 2025
312c715
another try to get local test running
BradleySappington Feb 12, 2025
9ad7902
another take with a setenv
BradleySappington Feb 12, 2025
33b7f3c
and agian
BradleySappington Feb 12, 2025
fbe7749
remove tests
BradleySappington Feb 12, 2025
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
48 changes: 2 additions & 46 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,11 @@ jobs:
matrix:
include:

- name: Coverage test in Python 3
os: ubuntu-latest
python: '3.11'
toxenv: py311-poppydev-pysiafdev-cov

- name: Check for Sphinx doc build errors
os: ubuntu-latest
python: '3.10'
toxenv: docbuild

- name: Try Astropy development version
os: ubuntu-latest
python: '3.10'
toxenv: py310-astropydev-test

- name: Try latest versions of all dependencies
os: ubuntu-latest
python: '3.11'
toxenv: py311-latest-test

- name: Try minimum supported versions
os: ubuntu-latest
python: '3.10'
toxenv: py310-legacy-test

- name: Try released POPPY and PySIAF
os: ubuntu-latest
python: '3.10'
toxenv: py310-stable-test
continue-on-error: 'true'

steps:
- name: Checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
Expand All @@ -68,28 +42,10 @@ jobs:
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
run: echo "WEBBPSF_PATH=${{ needs.retrieve_cache.outputs.cache_path }}/stpsf-data/" >> $GITHUB_ENV

- name: Check conda info
run: conda info

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

- name: Run tests
if: ${{ matrix.continue-on-error == null && contains(matrix.toxenv,'-latest') != true }}
- name: Run Sphinx doc build
run: tox -e ${{ matrix.toxenv }}

- name: Run tests and allow failures
if: matrix.continue-on-error
continue-on-error: true
run: tox -e ${{ matrix.toxenv }}

- name: Upload coverage to codecov
if: ${{ contains(matrix.toxenv,'-cov') }}
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
file: ./coverage.xml
2 changes: 0 additions & 2 deletions .github/workflows/download_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ on:
type: boolean
required: false
default: true
schedule:
- cron: "0 0 * * 0"
release:
push:
branches:
Expand Down
115 changes: 2 additions & 113 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,113 +1,2 @@
Documentation for WebbPSF
===============================

WebbPSF is a Python package that computes simulated point spread functions (PSFs) for NASA's James Webb Space Telescope (JWST) and Nancy Grace Roman Space Telescope. WebbPSF transforms models of telescope and instrument optical state into PSFs, taking into account detector pixel scales, rotations, filter profiles, and point source spectra. It is rather a tool for transforming optical path difference (OPD) maps, created with observatory systems engineering models, into the resulting PSFs as observed with JWST's or Roman's instruments.

.. figure:: ./fig_instrument_comparison.png
:scale: 45 %
:align: center
:alt: Sample PSFs for JWST's instruments.

Sample PSFs for JWST's instrument suite, all on the same angular scale and display stretch.

.. figure:: ./roman_figures/webbpsf-roman_page_header.png
:scale: 70 %
:align: center
:alt: 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:**
WebbPSF has been developed by Marshall Perrin, Marcio Meléndez, Shannon Osborne, Robel Geda, Brad Sappington, Charles-Philippe Lajoie, Joseph Long, Justin Otor, Jarron Leisenring, Neil Zimmerman, Keira Brooks, and Anand Sivaramakrishnan, with contributions from Alden Jurling, Lauren Chambers, Ewan Douglas, and `others <https://github.com/spacetelescope/webbpsf/graphs/contributors>`_.

Getting Started with WebbPSF
----------------------------

See `Using WebbPSF <usage.html>`_.

.. admonition:: Quickstart Jupyter Notebook

This documentation is complemented by an `Jupyter Notebook format quickstart tutorial <http://nbviewer.jupyter.org/github/spacetelescope/webbpsf/blob/stable/notebooks/WebbPSF_tutorial.ipynb>`_. Downloading and running that notebook is a great way to get started using WebbPSF.


.. admonition:: Getting Help

For help using or installing webbpsf, you can contact the STScI JWST Help Desk at jwsthelp.stsci.edu, category WebbPSF/JWST Telescope.


:ref:`What's new in the latest release? <whatsnew>`

Contents
--------

.. toctree::
:maxdepth: 1
:caption: Getting Started

intro.rst
installation.rst
relnotes.rst
usage.ipynb
psf_grids.ipynb

.. toctree::
:maxdepth: 1
:caption: Modeling JWST PSFs

jwst.rst
more_examples.rst
jwst_measured_opds.ipynb
jwst_detector_effects.ipynb
jwst_matching_psfs_to_data.ipynb
jwst_ifu_datacubes.ipynb
jwst_large_psf.ipynb
jwst_optical_budgets.ipynb
jwst_psf_subtraction.ipynb
jwst_wavefront_deltas.ipynb
less_common_usage.rst

.. toctree::
:maxdepth: 1
:caption: Modeling Roman PSFs

roman.rst

.. toctree::
:maxdepth: 1
:caption: Package Documentation

api_reference.rst
help.rst
sampling.rst
fft_optimization.rst
poppy.rst

.. toctree::
:maxdepth: 1
:caption: Developer Reference

available_opds.rst
field_dependence/multifield_documentation.ipynb
references.rst
release.rst


.. admonition:: How to cite WebbPSF

In addition to this documentation, WebbPSF is described in the following references. Users of WebbPSF are encouraged to cite one of these.

* Perrin et al. 2014, `"Updated point spread function simulations for JWST with WebbPSF" <http://adsabs.harvard.edu/abs/2014SPIE.9143E..3XP>`_, Proc. SPIE. 9143,
* Perrin et al. 2012, `"Simulating point spread functions for the James Webb Space Telescope with WebbPSF", <http://adsabs.harvard.edu/abs/2012SPIE.8442E..3DP>`_ Proc SPIE 8842, and
* Perrin 2011, `Improved PSF Simulations for JWST: Methods, Algorithms, and Validation <Improved_PSFs_for_Webb.pdf>`_, JWST Technical report JWST-STScI-002469.

In particular, the 2012 SPIE paper gives a broad overview, the 2014 SPIE paper presents comparisons to instrument cryotest data, and the Technical Report document describes in more detail the relevant optical physics, explains design decisions and motivation for WebbPSF's architecture, and presents extensive validation tests demonstrating consistency between WebbPSF and other PSF simulation packages used throughout the JWST project.


* :ref:`genindex`
* :ref:`search`

**Mailing List**

If you would like to receive email announcements of future versions, please contact Marshall Perrin, or visit `maillist.stsci.edu <https://maillist.stsci.edu/scripts/wa.exe?SUBED1=webbpsf-users&A=1>` to subscribe yourself to the "[email protected]" list.
.. meta::
:http-equiv=Refresh: 0; url='https://stpsf.readthedocs.io/en/latest/'
10 changes: 1 addition & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,7 @@ dynamic = [
readme = "README.rst"
requires-python = ">=3.10"
dependencies = [
"numpy>=1.21.6",
"scipy>=1.5.0",
"matplotlib>=3.2.0",
"astropy>=5.1.0",
"photutils>=1.10.0",
"poppy>=1.0.0",
"pysiaf>=0.23.3",
"synphot>=1.0.0",
"astroquery>=0.4.6",
"stpsf>=1.5.2"
]

[project.license]
Expand Down
48 changes: 1 addition & 47 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,42 +1,8 @@
[tox]
envlist =
py{310,311,312}-test
py{310,311,312}-{poppydev,pysiafdev,astropydev,latest,stable}-test
py310-legacy-test
py{310,311,312}-{poppydev,pysiafdev}-cov
envlist = docbuild

isolated_build = true

[testenv]
setenv =
astropydev: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple
passenv = *
deps =
pytest
pytest-astropy
poppydev,legacy,astropydev,latest: git+https://github.com/spacetelescope/poppy.git#egg=poppy
pysiafdev,astropydev: git+https://github.com/spacetelescope/pysiaf.git#egg=pysiaf
legacy: numpy==1.21.6
legacy: pysiaf==0.11.0
legacy: astropy==5.1.0
legacy: astroquery==0.4.6
astropydev: astropy>=0.0.dev0
poppydev: synphot
latest: -rrequirements.txt
stable: poppy
stable: pysiaf
cov: pytest-cov
cov: coverage
conda deps =
scipy
matplotlib
cython
photutils
astroquery
commands=
test: pytest {posargs}
cov: pytest {posargs} --cov-config=pyproject.toml --cov-report=xml --cov=webbpsf webbpsf/tests/

[testenv:docbuild]
passenv= *
deps=
Expand All @@ -53,15 +19,3 @@ conda_deps=
pandoc
commands=
sphinx-build docs docs/_build

[testenv:codestyle]
skip_install = true
description = check package code style
deps =
pycodestyle
commands =
pycodestyle webbpsf

[testenv:flake8]
exclude= .git,__pycache__, test*
max-line-length = 120
Loading
Loading