Metadata-Version: 2.4
Name: nmfwisp
Version: 1.1.4
Summary: Subtract wisp artifacts in JWST NIRCam images with the non-negative matrix factorization (NMF) algorithm
Author-email: Zihao Wu <zihao.wu@cfa.harvard.edu>
License: MIT License
        
        Copyright (c) 2026 Zihao Wu
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/zihaowu-astro/nmfwisp
Project-URL: Repository, https://github.com/zihaowu-astro/nmfwisp
Project-URL: Issues, https://github.com/zihaowu-astro/nmfwisp/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: astropy
Requires-Dist: scipy
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: build>=0.10.0; extra == "test"
Requires-Dist: twine>=4.0.0; extra == "test"
Requires-Dist: flake8; extra == "test"
Provides-Extra: mask
Requires-Dist: drizzle>=1.14.4; extra == "mask"
Requires-Dist: jwst>=1.12.2; extra == "mask"
Requires-Dist: photutils>=2.0; extra == "mask"
Requires-Dist: reproject>=0.13.0; extra == "mask"
Dynamic: license-file

# NMFwisp

NMFwisp subtracts JWST/NIRCam wisp artifacts using multi-component,
detector- and filter-specific NMF templates.

For usage examples, source-mask generation, API details, developer notes, and
citation information, please see the documentation website:

https://zihaowu-astro.github.io/NMFwisp/

## Installation

Install from PyPI:

```bash
pip install nmfwisp
```

Development install from source:

```bash
git clone https://github.com/zihaowu-astro/NMFwisp.git
cd NMFwisp
pip install -e .
```

## Wisp Figures

Example wisp subtraction:

![Example NMFwisp subtraction](docs/example.png)

Multi-component NMF wisp features:

![Multi-component NMF wisp features](docs/wisp_components.png)

Wisp morphology in all contaminated NIRCam detectors:

![Wisp morphology across affected NIRCam detectors](docs/all_wisps.jpg)

## Reference

If you use NMFwisp, please cite the paper:

```bibtex
@ARTICLE{2026arXiv260115958W,
       author = {{Wu}, Zihao and {Johnson}, Benjamin D. and {Eisenstein}, Daniel J. and {Cargile}, Phillip and {Hainline}, Kevin and {Hausen}, Ryan and {Rinaldi}, Pierluigi and {Robertson}, Brant E. and {Tacchella}, Sandro and {Williams}, Christina C. and {Willmer}, Christopher N.~A.},
        title = "{JWST Advanced Deep Extragalactic Survey (JADES) Data Release 5: Wisp Subtraction with the Non-negative Matrix Factorization Algorithm}",
      journal = {arXiv e-prints},
     keywords = {Instrumentation and Methods for Astrophysics, Astrophysics of Galaxies},
         year = 2026,
        month = jan,
          eid = {arXiv:2601.15958},
        pages = {arXiv:2601.15958},
          doi = {10.48550/arXiv.2601.15958},
archivePrefix = {arXiv},
       eprint = {2601.15958},
 primaryClass = {astro-ph.IM},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2026arXiv260115958W},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
```
