Metadata-Version: 2.1
Name: snowblind
Version: 0.1.1
Summary: Mask cosmic ray showers (snowballs) in JWST data
Author-email: James Davies <jdavies@mpia.de>
License: BSD 3-Clause License
        
        Copyright (c) 2022,  Max Planck Institute for Astronomy
        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: Bug Tracker, https://github.com/mpi-astronomy/snowblind/issues
Project-URL: Source Code, https://github.com/mpi-astronomy/snowblind
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jwst
Requires-Dist: numpy
Requires-Dist: scikit-image
Requires-Dist: stpipe
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-automodapi; extra == "docs"
Requires-Dist: numpydoc; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: flake8; extra == "test"
Requires-Dist: flake8-pyproject; extra == "test"
Requires-Dist: codecov; extra == "test"
Requires-Dist: pytest-cov; extra == "test"

Algorithms for cleaning JWST data.

 - `SnowBlindStep`: mask cosmic ray showers and snowballs
 - `JumpPlusStep`: flag jumps and saturated pixels caused by cosmic rays properly
                 when there are frame-averaged groups
 - `PersistenceFlagStep`: flag pixels due to persistence between exposures
 - `RcSelfCalStep`: flag new hot pixels


## Installation


    pip install snowblind


## Usage

The steps in snowblind run like any other pipeline steps.  From the command line:

    strun snowblind jw001234_010203_00001_nrcalong_jump.fits --suffix=snowblind

In Python:

    from snowblind import SnowblindStep
    from jwst.pipeline import Detector1Pipeline
    from jwst.ramp_fitting import RampFitStep


    steps = {
        "jump": {
            "save_results": True,
        }
        "ramp_fit": {
            "skip": True
        }
    }

    Detector1Pipeline.call("jw001234_010203_00001_nrcalong_uncal.fits", steps=steps)
    SnowblindStep.call("jw001234_010203_00001_nrcalong_jump.fits", save_results=True, suffix="snowblind")
    rate, rateints = RampFitStep.call("jw001234_010203_00001_nrcalong_snowblind.fits")
    rate.save(cal.meta.filename.replace("snowblind", "rate"))

More to come on the other steps available.
