snowblind: algorithms for cleaning JWST data
snowblind provides steps for JWST near-infrared data that improve on, or add to, steps of the official jwst pipeline. They run like the pipeline's own steps, on their own or as hooks inside the jwst pipelines.
Read the documentation for how each step works and how to choose its settings.
What it provides
SnowblindStepmasks the halos of cosmic-ray showers and snowballs by growing the shape of each jump-flagged region and the ring around its saturated core. It replaces the jump step'sexpand_large_events, which draws circles or ellipses around them, and works on rate products as well as ramps, so it can be applied after the fact.JumpPlusStepflags, in readouts that average several frames per group, the group after each jump and the group before saturation, which the jwst jump and saturation steps leave unflagged. It replaces the jump step'safter_jump_flagsettings.PersistenceFlagStepflags the pixels that saturated in an earlier exposure of the same detector, for a time measured for each detector and packaged with snowblind. The jwstpersistencestep (as of jwst 3.0) needs a time chosen by hand and the exposures run one after another; this step takes a whole set of finished_rateor_calfiles at once.OpenPixelStepfinds open and hot pixels that have appeared since the reference bad-pixel mask was made, by comparing the exposures of each detector. Experimental.StreamCleanStepremoves 1/f noise (striping) from the ramp along each output channel's readout stream. Unlike the jwstclean_flicker_noisestep, it applies the same linear filter to every group difference, so it adds no noise along the ramp and does better the more groups there are.ResetRampFitStepis the jwst likelihood ramp fit with the reset level as an extra point at the start, so pixels with only one unsaturated group, such as the cores of bright stars, still get a rate.snowblind_detector1iscalwebb_detector1with the stream clean, the reset likelihood ramp fit and the snowball and jump steps in place, and the SIRS reference-pixel correction. It works as a drop-in replacement.
Installation
pip install snowblind
snowblind needs jwst 2.0.0 or later; earlier releases of snowblind work with earlier jwst releases.
Getting started
Run Detector1 with the 1/f cleaning, the reset fit and the snowball masking (and the SIRS reference-pixel correction, which the 1/f cleaning is matched to):
strun snowblind_detector1 jw..._uncal.fits
Or add only the snowball and jump steps to the jwst pipeline, as hooks after its jump step:
from jwst.pipeline import Detector1Pipeline
from snowblind import JumpPlusStep, SnowblindStep
steps = {"jump": {"expand_large_events": False, "post_hooks": [SnowblindStep, JumpPlusStep]}}
Detector1Pipeline.call("jw..._uncal.fits", steps=steps, save_results=True)
Flag persistence in a set of _cal files, after calwebb_image2:
from glob import glob
from snowblind import PersistenceFlagStep
PersistenceFlagStep.call(sorted(glob("jw*_cal.fits")), save_results=True, suffix="cal", output_dir="persist")
This writes each file again in persist/, with DO_NOT_USE and
PERSISTENCE set where an earlier exposure of the same detector saturated
recently.
Results
StreamCleanStep on a dark exposure, against no cleaning and the jwst
clean_flicker_noise step:
The persistence of saturated stars against the time since their exposure
ended, which sets the time PersistenceFlagStep flags them for:
Citing snowblind
Please cite snowblind through its Zenodo record DOI,
10.5281/zenodo.15791614, that
always points to the latest release.
@software{snowblind,
author = {Davies, James E.},
title = {snowblind: algorithms for cleaning JWST data},
publisher = {Zenodo},
doi = {10.5281/zenodo.15791614},
url = {https://github.com/mpi-astronomy/snowblind}
}
The same information is in CITATION.cff.
Please open an issue if you have any problems!
Metadata
Release files for snowblind 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| snowblind-1.3.1.tar.gz | 3.8 MB | With provenance | Details for snowblind-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| snowblind-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for snowblind-1.3.1-py3-none-any.whl |
Total release size: 4.0 MB
Release files / snowblind-1.3.1.tar.gz
| Download URL | snowblind-1.3.1.tar.gz |
|---|---|
| Size | 3.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f40e606820e0b947256328fad5c6c595b9269101d41963e652b927c94990079
|
|
BLAKE2b-256 checksum How to use checksums |
6cec4326f13a2da213b73fea66941462fdc438b764ffe26ea79f0c3207a7e345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / snowblind-1.3.1-py3-none-any.whl
| Download URL | snowblind-1.3.1-py3-none-any.whl |
|---|---|
| Size | 145.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
087fc9602d2812f3571ed4175439f5f4ec4b4e685b0ab54d4a96ed5e7f83bc2e
|
|
BLAKE2b-256 checksum How to use checksums |
51b926c5c6e27679c3993fe19d4e470e1700eb9a7332c0da5218872afe47db84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for snowblind 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for snowblind-1.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.