Metadata-Version: 2.4
Name: hasp
Version: 1.2.3
Summary: Hubble Advanced Spectral Products creation code
Author-email: STScI <help@stsci.edu>
Project-URL: repository, https://github.com/spacetelescope/hasp
Project-URL: tracker, https://github.com/spacetelescope/hasp/issues
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: astropy>=5.0.4
Requires-Dist: ullyses>=4.1.0
Provides-Extra: docs
Requires-Dist: numpydoc; extra == "docs"
Requires-Dist: packaging>=17; extra == "docs"
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-astropy; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Requires-Dist: stsci-rtd-theme; extra == "docs"
Provides-Extra: test
Requires-Dist: psutil; extra == "test"
Requires-Dist: pytest>=4.6.0; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: opencv
Requires-Dist: opencv-python>=4.6.0.66; extra == "opencv"


# HASP

This repository contains the wrapper script that creates Hubble
Advanced Spectral Products and Hubble Spectral Legacy Archive products.

The script will create coadded spectral products for each target
in each visit (visit-level products) and each program (program-level products).
When used with the -x option, it will create products for all exposures in the
input directory, assuming they are all the same target (cross-program, or HSLA products).

Products include single grating products made from all exposures that use the same
grating, and abutted products that stitch together the single grating products
according to priorities and wavelength ranges set in the grating priorities table.

Installing the package will install the wrapper script: swrapper.

To run:

    swrapper -i . -o products

```
    -i INDIR, --input_directory INDIR

        The name of the directory containing the individual exposures to
        be coadded

    -o OUTDIR, --output_directory OUTDIR

        The name of the directory that will contain the coadded spectral products

    -t THRESHOLD, --threshold THRESHOLD

        Threshold for flux-based filtering.  Optional, default value is -50

    -c, --clobber

        If set, overwrite existing products.  Optional, if this keyword is not set,
        products will not be overwritten.

    -s SNRMAX, --snrmax SNRMAX
        Maximum SNR per pixel for flux-based filtering.  Optional, default value is 20.0

    -k, --no_keyword_filtering
        Disable keyword-based filtering (except for STIS PRISM data, which is always filtered)

    -x, --cross_program
        Create cross-program (HSLA) products only

    -g GRATING_TABLE, --grating_table GRATING_TABLE
        Name of custom grating priority table.  If a custom grating priority table is not
        selected, the default priorities will be set by the tables in hasp/grating_priority.py.
        Users can use the hasp/grating_priority_table.json as a template for creating their own
        custom grating priority table.
```
