Metadata-Version: 2.1
Name: acdc-hst
Version: 1.1
Summary: Software to perform an optimized FUV (Far Ultraviolet) dark correction to HST COS data (Hubble Space Telescope Cosmic Origins Spectrograph).
Author-email: Jo Taylor <jotaylor@stsci.edu>
License: BSD 3-Clause License
        
        Copyright (c) 2022, Jo Taylor
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, https://github.com/jotaylor/cos_dark
Project-URL: Documentation, https://github.com/jotaylor/cos_dark
Project-URL: Source, https://github.com/jotaylor/cos_dark
Project-URL: Tracker, https://github.com/jotaylor/cos_dark/issues
Keywords: astronomy,hst,hubble,cos,ultraviolet,uv,dark,instrumentation,calibration
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: asdf
Requires-Dist: astropy
Requires-Dist: calcos
Requires-Dist: crds
Requires-Dist: dask
Requires-Dist: shapely
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: pymysql
Requires-Dist: pyyaml
Requires-Dist: sqlalchemy
Requires-Dist: ullyses >=4.1.0
Requires-Dist: wget
Provides-Extra: docs
Requires-Dist: sphinx ; extra == 'docs'
Requires-Dist: sphinx-rtd-theme ; extra == 'docs'
Provides-Extra: viz
Requires-Dist: bokeh >=2.1.1 ; extra == 'viz'
Requires-Dist: datashader >=0.13.0 ; extra == 'viz'
Requires-Dist: holoviews >=1.14.4 ; extra == 'viz'
Requires-Dist: panel >=0.11.3 ; extra == 'viz'

# Another COS Dark Correction (ACDC) ⚡

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

## Another dark correction?
COS spectroscopic science in the extreme UV regime is limited by detector 
background noise. The COS pipeline, 
[`CalCOS`](https://github.com/spacetelescope/calcos) 
performs a basic background subtraction, but for low signal-to-noise ratio (SNR)
observations, a more nuanced approach is necessary to fully capitalize on COS's
FUV capabilities. In order to achieve the maximum scientific value of
the COS instrument, we have a designed a custom
characterization and correction of the COS FUV dark rate, `acdc`.

With `acdc`, we can: 
* create and maintain databases needed to measure the dark rate as a function of time, HST position, PHA, solar activity, and more
* create COS/FUV superdarks
* use superdarks to perform custom dark corrections
* analyze the efficacy of custom dark-corrected COS data

For full usage instructions, refer to the 
[documentation on ReadTheDocs](https://acdc-hst.readthedocs.io/). 

## Installation

### Create a conda environment
If you do not already have Conda installed, you need to download and install
either Miniconda or Anaconda. Miniconda provides a bare minimum Conda
environment. Anaconda provides a full Conda root environment along with
many other tools, libraries, and utilities.
* get [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
* get [Anaconda](https://www.anaconda.com/products/individual)

Create a conda enviornment to use `acdc`:

```
conda create -n <env_name> python=<version>
conda activate <env_name>
pip install .
```

where `<env_name>` is the name of the environment that will be created.
You need at least python version 3.9, so fill in `<version>` with whatever
version >=3.9 that you desire.

### Install the latest stable version
The easiest way to install `acdc` is to use `pip`:

```
pip install acdc-hst
```

> [!IMPORTANT]
> 
> The [package name on PyPi](https://pypi.org/project/acdc-hst/) and the name of this repo,
> `acdc-hst`, are different than the _imported_ package name, `acdc`. That is,
> you import the package as `import acdc`.

### Install the development version

First clone this repo. Then `cd` into the cloned repository and execute:

```
pip install .
```

## Usage

For full usage instructions, refer to the 
[documentation on ReadTheDocs](https://acdc-hst.readthedocs.io/). 

## Building the docs locally
To build the documentation locally, for testing, 
first clone this repository then navigate into the repo and follow these commands:

```
pip install ".[docs]"
cd docs/
make html
```

It will take a minute or two to build all the docs. Once finished, you can open the 
docs in your default web browser with the following command:

```
open _build/html/index.html 
```

From there you can click and navigate the webpage as if it were hosted online normally.
