spike

spike: A Tool to Drizzle HST, JWST, and Roman PSFs for Improved Analyses - Published in JOSS (2025)

https://github.com/avapolzin/spike

Science Score: 98.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, joss.theoj.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Scientific Fields

Sociology Social Sciences - 87% confidence
Mathematics Computer Science - 84% confidence
Artificial Intelligence and Machine Learning Computer Science - 62% confidence
Last synced: 6 months ago · JSON representation ·

Repository

All-in-one tool to generate, and correctly drizzle, HST, JWST, and Roman PSFs.

Basic Info
Statistics
  • Stars: 11
  • Watchers: 1
  • Forks: 3
  • Open Issues: 0
  • Releases: 1
Created about 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation

README.md

spike_logo 004

Documentation Status arXiv status DOI

All-in-one tool to generate, and correctly drizzle, HST, JWST, and Roman PSFs.

Installation

To install: ```bash cd ~

git clone https://github.com/avapolzin/spike.git

cd spike

pip install .

` or bash pip install spike-psf ```

If you install from PyPI, you will also need to install DrizzlePac from the GitHub distribution.

To receive updates about the code, including notice of improvements and bug fixes, please fill out this form with your email.

Note that spike.psfgen.tinypsf and spike.psfgen.tinygillispsf require TinyTim for simulated PSFs. To use that module, please download TinyTim version 7.5 and follow the install instructions. Since that software is now unmaintained, refer to the STScI site for details and caveats.

If you plan to use the PSFEx empirical PSF modeling, that will similarly need to be downloaded from the GitHub repository and installed, as will SExtractor.

If you are using STPSF (formerly WebbPSF), you will need to install the relevant data and include it in your path. Instructions to do this are available here.

The jwst and romancal pipelines -- which house the tweak/resample steps for JWST and Roman -- require the setup of CRDSPATH and CRDSSERVER_URL environment variables. The amended version of the code also relies on crds, so it is necessary to set these environment variables according to the instructions here if you plan to use spike with JWST or Roman data.

If you install all of the optional dependencies described above, your shell's startup file will look something like:

``` bash

export TINYTIM="/path/to/tinytim-7.5" alias tiny1="$TINYTIM/tiny1" alias tiny2="$TINYTIM/tiny2" alias tiny3="$TINYTIM/tiny3"

export WEBBPSF_PATH="/path/to/webbpsf-data"

export STPSF_PATH="/path/to/STPSF-data"

export CRDSPATH="/path/to/crdscache/"

export CRDSSERVERURL="https://jwst-crds.stsci.edu"

export CRDSSERVERURL="https://roman-crds.stsci.edu"

```

Since both JWST and Roman CRDS servers may be used, these variables are defined directly within spike.psf.jwst and spike.psf.roman and do not need to be added to your startup file.

Additionally, spike is written to be backwards compatible with WebbPSF installations.

Getting Started

To get a drizzled PSF, only minimal inputs are required:

``` python

from spike import psf

acs_path = '/path/to/acs/data/'

psf.hst(imgdir = acspath, obj = 'M79', img_type = 'flc', inst = 'ACS', camera = 'WFC')

nircam_path = 'path/to/nircam/data/'

psf.jwst(imgdir = nircampath, obj = 'M79', img_type = 'cal', inst = 'NIRCam')

```

spike is intended to be fairly simple and can require as little as a working directory for images, the coordinates of an object of interest (where the PSF will be generated), the suffix used to identify relevant data (e.g., 'flc', crf', 'cal'), and the instrument used to take the data. For ACS and WFC3, a camera should also be specified. spike handles filter and detector/chip identification automatically, and the default parameters are sufficient to produce PSFs in most cases. The top-level functions spike.psf.hst, spike.psf.jwst, and spike.psf.roman also take a number of keyword arguments that allow for near-complete customization of the generated PSFs.

Ultimately, some of the other functions included in spike may be useful. For instance, the functions in spike.psfgen are methods to compute and save (to .fits) various model PSFs for a variety of telescopes/instruments which share similar syntax and required inputs and are callable from python directly. Similarly, spike.tools houses generic functions, which may be broadly applicable, including a python wrapper for SExtractor (not to be confused with sep), a utility to convert PSFEx .psf files to images, and a means of rewriting FITS files to an ASDF format. Please refer to spike-psf.readthedocs.io for details.

Testing spike

Since spike has utility for working with data, the most useful test of the code is to actually generate and drizzle PSFs from imaging. The code to generate Figures 1 and 2 from Polzin (2025) is in tests/test_outputs.py, which can be used to confirm the package works. Note that the input file structure is such that each instrument's data should be partitioned in its own directory, where all included data may be part of the final drizzled product.

An example file structure:

working_directory - testoutputs.py - *acswfcimaging* - wfc3uvis_imaging - wfpc2_imaging - nircam_imaging - miri_imaging - niriss_imaging

testoutputs.py includes the information for the datasets used and can also serve as a guide for testing other data. Note that different user inputs may be required based on data used (as for PSF generation and drizzling). Each run generates quite a few files, so I recommend moving testoutputs.py into its own directory rather than running it in the cloned spike one.

Similarly, one can test spike by running the code from the example notebooks.

Data-independent utilities included in spike can be tested via the scripts included in the "tests" directory here. To run these tests follow the below steps from your locally installed spike directory.

bash pip install pytest #necessary if pytest is not installed or in your working environment python -m pytest tests/tests.py

All tests should pass by default.

Issues and Contributing

If you encounter a bug, first check the documentation or the FAQ; if you don't find a solution there, please feel free to open an issue that details what you ran and what error you are encountering (or a PR with a fix). If you have a question, please feel free to email me at apolzin at uchicago dot edu.

If you would like to contribute to spike, either enhancing what already exists here or working to add features (as for other telescopes/PSF models), please make a pull request. If you are unsure of how your enhancement will work with the existing code, reach out and we can discuss it.

Owner

  • Login: avapolzin
  • Kind: user
  • Company: The University of Chicago

JOSS Publication

spike: A Tool to Drizzle HST, JWST, and Roman PSFs for Improved Analyses
Published
July 24, 2025
Volume 10, Issue 111, Page 8200
Authors
Ava Polzin ORCID
Department of Astronomy and Astrophysics, The University of Chicago, USA
Editor
Ivelina Momcheva ORCID
Tags
astronomy point spread functions photometry

Citation (CITATION.cff)

cff-version: "1.2.0"
authors:
- family-names: Polzin
  given-names: Ava
  orcid: "https://orcid.org/0000-0002-5283-933X"
contact:
- family-names: Polzin
  given-names: Ava
  orcid: "https://orcid.org/0000-0002-5283-933X"
doi: 10.5281/zenodo.15791925
message: If you use this software, please cite our article in the
  Journal of Open Source Software.
preferred-citation:
  authors:
  - family-names: Polzin
    given-names: Ava
    orcid: "https://orcid.org/0000-0002-5283-933X"
  date-published: 2025-07-24
  doi: 10.21105/joss.08200
  issn: 2475-9066
  issue: 111
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 8200
  title: "spike: A Tool to Drizzle HST, JWST, and Roman PSFs for
    Improved Analyses"
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.08200"
  volume: 10
title: "spike: A Tool to Drizzle HST, JWST, and Roman PSFs for Improved
  Analyses"

GitHub Events

Total
  • Create event: 1
  • Release event: 1
  • Issues event: 14
  • Watch event: 10
  • Issue comment event: 21
  • Public event: 1
  • Push event: 137
  • Pull request event: 4
  • Fork event: 3
Last Year
  • Create event: 1
  • Release event: 1
  • Issues event: 14
  • Watch event: 10
  • Issue comment event: 21
  • Public event: 1
  • Push event: 137
  • Pull request event: 4
  • Fork event: 3

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 14 minutes
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 14 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • yaya-socute (3)
  • kkwang-astro (2)
  • obi-wan76 (1)
  • EdwardBerman (1)
Pull Request Authors
  • warrickball (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 37 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 11
  • Total maintainers: 1
pypi.org: spike-psf

Drizzle/resample HST, JWST, and Roman PSFs for improved analyses.

  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 37 Last month
Rankings
Dependent packages count: 9.5%
Average: 31.7%
Dependent repos count: 53.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/requirements_version.txt pypi
  • Jinja2 ==3.1.5
  • MarkupSafe ==3.0.2
  • Parsley ==1.3
  • PyPDF2 ==3.0.1
  • PyYAML ==6.0.2
  • Pygments ==2.18.0
  • Sphinx ==8.1.3
  • alabaster ==1.0.0
  • asdf ==3.5.0
  • asdf-astropy ==0.7.0
  • asdf_coordinates_schemas ==0.3.0
  • asdf_standard ==1.1.1
  • asdf_transform_schemas ==0.5.0
  • asdf_wcs_schemas ==0.4.0
  • astrocut ==0.9
  • astropy ==6.1.7
  • astropy-iers-data ==0.2024.12.30.0.33.36
  • astroquery ==0.4.7
  • asttokens ==3.0.0
  • attrs ==24.3.0
  • babel ==2.16.0
  • backports.tarfile ==1.2.0
  • beautifulsoup4 ==4.12.3
  • bokeh ==3.6.2
  • build ==1.2.2.post1
  • certifi ==2024.12.14
  • charset-normalizer ==3.4.1
  • contourpy ==1.3.1
  • crds ==12.0.9
  • cycler ==0.12.1
  • decorator ==5.1.1
  • docutils ==0.21.2
  • drizzle ==2.0.0
  • et_xmlfile ==2.0.0
  • exceptiongroup ==1.2.2
  • executing ==2.1.0
  • filelock ==3.16.1
  • fitsblender ==0.4.4
  • fonttools ==4.55.3
  • gwcs ==0.22.1
  • html5lib ==1.1
  • id ==1.5.0
  • idna ==3.10
  • imageio ==2.36.1
  • imagesize ==1.4.1
  • importlib_metadata ==8.5.0
  • iniconfig ==2.0.0
  • ipython ==8.31.0
  • jaraco.classes ==3.4.0
  • jaraco.context ==6.0.1
  • jaraco.functools ==4.1.0
  • jedi ==0.19.2
  • jmespath ==1.0.1
  • joblib ==1.4.2
  • jsonschema ==4.23.0
  • jsonschema-specifications ==2024.10.1
  • keyring ==25.6.0
  • kiwisolver ==1.4.8
  • lazy_loader ==0.4
  • lxml ==5.3.0
  • markdown-it-py ==3.0.0
  • matplotlib ==3.10.0
  • matplotlib-inline ==0.1.7
  • mdurl ==0.1.2
  • more-itertools ==10.5.0
  • networkx ==3.4.2
  • nh3 ==0.2.21
  • numpy ==2.2.1
  • openpyxl ==3.1.5
  • packaging ==24.2
  • pandas ==2.2.3
  • parso ==0.8.4
  • pexpect ==4.9.0
  • photutils ==2.0.2
  • pillow ==11.0.0
  • pluggy ==1.5.0
  • poppy ==1.1.1
  • prompt_toolkit ==3.0.48
  • psutil ==6.1.1
  • ptyprocess ==0.7.0
  • pure_eval ==0.2.3
  • pyerfa ==2.0.1.5
  • pyparsing ==3.2.0
  • pyproject_hooks ==1.2.0
  • pysiaf ==0.24.1
  • pytest ==8.3.5
  • python-dateutil ==2.9.0.post0
  • pytz ==2024.2
  • pyvo ==1.6
  • rad ==0.22.0
  • readme_renderer ==44.0
  • referencing ==0.35.1
  • requests ==2.32.3
  • requests-toolbelt ==1.0.0
  • rfc3986 ==2.0.0
  • rich ==13.9.4
  • roman_datamodels ==0.22.0
  • rpds-py ==0.22.3
  • scikit-image ==0.25.0
  • scikit-learn ==1.6.0
  • scipy ==1.14.1
  • semantic-version ==2.10.0
  • simplify_polyline ==0.1.0
  • six ==1.17.0
  • snowballstemmer ==2.2.0
  • soupsieve ==2.6
  • spherical_geometry ==1.3.2
  • sphinx-rtd-theme ==3.0.2
  • sphinxcontrib-applehelp ==2.0.0
  • sphinxcontrib-devhelp ==2.0.0
  • sphinxcontrib-htmlhelp ==2.1.0
  • sphinxcontrib-jquery ==4.1
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==2.0.0
  • sphinxcontrib-serializinghtml ==2.0.0
  • stack-data ==0.6.3
  • stdatamodels ==2.2.0
  • stregion ==1.1.9
  • stsci.image ==2.3.9
  • stsci.imagestats ==1.8.3
  • stsci.skypac ==1.0.10
  • stsci.stimage ==0.2.9
  • stsci.tools ==4.1.1
  • stwcs ==1.7.3
  • synphot ==1.5.0
  • threadpoolctl ==3.5.0
  • tifffile ==2024.12.12
  • tomli ==2.2.1
  • tornado ==6.4.2
  • traitlets ==5.14.3
  • tweakwcs ==0.8.9
  • twine ==6.1.0
  • typing_extensions ==4.12.2
  • tzdata ==2024.2
  • urllib3 ==2.3.0
  • wcwidth ==0.2.13
  • webbpsf ==1.5.0
  • webencodings ==0.5.1
  • xyzservices ==2024.9.0
  • zipp ==3.21.0
.github/workflows/draft-pdf.yml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • openjournals/openjournals-draft-action master composite
docs/requirements.txt pypi
  • asdf *
  • astropy *
  • crds *
  • drizzle *
  • gwcs *
  • jsonschema *
  • matplotlib *
  • numpy *
  • photutils *
  • psutil *
  • pyyaml *
  • roman-datamodels *
  • scipy *
  • spherical-geometry *
  • sphinx *
  • sphinx-rtd-theme *
  • stdatamodels *
  • tweakwcs *
  • webbpsf *
setup.py pypi
  • asdf *
  • drizzlepac *
  • jsonschema *
  • scipy *