Metadata-Version: 2.4
Name: weightmask
Version: 0.1.0
Summary: Per-pixel weight, mask, inverse-variance, and sky maps for astronomical FITS images.
Author-email: Seb Fabbro <sebfabbro@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/astroai/weightmask
Project-URL: Issues, https://github.com/astroai/weightmask/issues
Project-URL: Changelog, https://github.com/astroai/weightmask/blob/main/CHANGELOG.md
Project-URL: Source, https://github.com/astroai/weightmask
Project-URL: PyPI, https://pypi.org/project/weightmask/
Keywords: astronomy,FITS,weight,mask,variance
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: astropy
Requires-Dist: fitsio
Requires-Dist: scipy
Requires-Dist: scikit-image
Requires-Dist: sep
Requires-Dist: PyYAML
Requires-Dist: astroscrappy
Dynamic: license-file

# weightmask

[![CI](https://github.com/astroai/weightmask/actions/workflows/ci.yml/badge.svg)](https://github.com/astroai/weightmask/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/weightmask.svg)](https://pypi.org/project/weightmask/)
[![Python](https://img.shields.io/pypi/pyversions/weightmask.svg)](https://pypi.org/project/weightmask/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

weightmask reads a detrended FITS or MEF science image and writes a per-pixel
weight, quality mask, inverse-variance map, and sky.

Those products are for any measurement that should ignore bad pixels and
down-weight the rest: coaddition, shape measurement, forced photometry,
profile fitting, and difference imaging.

## Install

```bash
pip install weightmask
```

Python 3.10+. Copy [`weightmask.yml`](weightmask.yml) into the working directory;
it is not bundled in the wheel.

Pixi (development):

```bash
git clone https://github.com/astroai/weightmask.git
cd weightmask
pixi install
```

Details: [docs/installation.md](docs/installation.md).

## Run

```bash
weightmask science.fits --config weightmask.yml --flat_image flat.fits \
  -o weight.fits --output_mask mask.fits
```

## Docs

- [Installation](docs/installation.md)
- [Usage](docs/usage.md)
- [Algorithms](docs/algorithms.md)
- [API](docs/api.md)
- [CHANGELOG](CHANGELOG.md)

## License

MIT
