Metadata-Version: 2.1
Name: cmos-noise-map
Version: 0.1.1
Summary: A tool to create a read noise map for CMOS detectors by modelling Random Telegraph Signal. This was originally created for use by LCOGT's BANZAI pipeline.
Author: Prerana Kottapalli
Requires-Python: >=3.8,<3.12
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Provides-Extra: docs
Requires-Dist: astropy (>=5.2.1,<6.0.0)
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: glob2 (>=0.7,<0.8)
Requires-Dist: ipython (>=8.9.0,<9.0.0)
Requires-Dist: matplotlib (>=3.6.3,<4.0.0)
Requires-Dist: myst-parser (>=0.18.1,<0.19.0)
Requires-Dist: nbsphinx (>=0.8.12,<0.9.0)
Requires-Dist: numpy (>=1.24.1,<2.0.0)
Requires-Dist: pandas (>=1.5.3,<2.0.0)
Requires-Dist: pandoc (>=2.3,<3.0)
Requires-Dist: pytest (>=7.2.1,<8.0.0)
Requires-Dist: scikit-learn (>=1.2.1,<2.0.0)
Requires-Dist: scipy (>=1.10.0,<2.0.0)
Requires-Dist: sphinx (>=4,<6) ; extra == "docs"
Description-Content-Type: text/markdown

# CMOS Noise Map
[![Python application](https://github.com/LCOGT/cmos-noise-map/actions/workflows/python-app.yml/badge.svg)](https://github.com/LCOGT/cmos-noise-map/actions/workflows/python-app.yml)

[![Documentation Status](https://readthedocs.org/projects/cmos-noise-map/badge/?version=latest)](https://cmos-noise-map.readthedocs.io/en/latest/?badge=latest)

Code to model random telegraph noise in a CMOS detector. Originally designed for the Las Cumbres Observatory BANZAI pipeline.
Authors: Prerana Kottapalli, Matt Daily, Curtis McCully

Read the docs: https://cmos-noise-map.readthedocs.io/en/latest/index.html

## Installation
### From PyPi
```
pip install cmos-noise-map
```

### From Github
To install the tool, clone this repository and run:

```
pip install poetry
cd cmos-noise-map
poetry install
```
## Tests
To run the unit tests, simply run:

`poetry run pytest`

## Usage
Once you've installed the tool, it can be run simply by:
`rts-maker <path> <options> <write filename>`

```
Usage: rts-maker [OPTIONS] PATH FILENAME [METHOD]

  This script builds a noise map with the chosen method.

  path: Path to input without the .fits at the end

  filename: Path to write file, including the filename ending in .fits

  method: Default method is std. Available methods are std, rts, and param.
  See docs for more information about each method.

Options:
  -r, --data_ext INTEGER          Extension of fits file that contains the
                                  image data
  -uq, --upper_quantile FLOAT     Standard deviation cutoff for pixel noise
                                  evaluation
  -t, --tolerance FLOAT           The minimum difference between silhouette
                                  scores. See docs for more information.
  -m, --min_peak_separation FLOAT
                                  Minimum difference between pixel value
                                  cluster centers to be considered separate
                                  clusters
  -o, --out_hdu_name TEXT         Name for the header in which the data will
                                  be stored
  -f, --fpack BOOLEAN             Adding this option will fpack your output
                                  fits file
  --help                          Show this message and exit.

```

