kammerje / spaceKLIP

Pipeline for reducing JWST high-contrast imaging data. Published in Kammerer et al. 2022 and Carter et al. 2022.
https://ui.adsabs.harvard.edu/abs/2022SPIE12180E..3NK/abstract
MIT License
16 stars 9 forks source link

############## SpaceKLIP šŸš€šŸŖ ##############

.. image:: logo.png

SpaceKLIP is a data reduction pipeline for JWST high-contrast imaging. The current release has been tested with NIRCam and MIRI coronagraphy data.

Compatible test data: here <https://stsci.box.com/s/0oteh8smujl3pup07hyut6hr4ag1i2el>_

Documentation: here <https://spaceklip.readthedocs.io/en/latest/>_

Installation


At this stage it is recommended that you clone the Git repository directory for installation:

::

git clone https://github.com/kammerje/spaceKLIP.git

If you would like to install a specific branch:

::

git clone https://github.com/kammerje/spaceKLIP.git@branch

From here, it is highly recommended that you create a unique Anaconda environment to hold all of the spaceKLIP dependencies:

::

conda create -n spaceklip python=3.11
conda activate spaceklip

With the Anaconda environment created, move to the cloned directory and install the dependencies and spaceKLIP itself:

::

cd where/you/saved/the/git/repo
pip install -r requirements.txt
pip install -e .

NEW AS OF 1 JUNE 2023: you also need to make the custom PSF mask files before running spaceKLIP for the first time:

::

cd spaceKLIP/
    python make_psfmasks.py

Finally, and very importantly, you will need to download the reference files and set the environment variables supporting the functioning of :code:webbpsf and :code:webbpsf_ext. Instructions to do this can be found at the respective package websites (WebbPSF <https://webbpsf.readthedocs.io/en/latest/installation.html#installing-the-required-data-files>_, WebbPSF_ext <https://github.com/JarronL/webbpsf_ext>_). Ensure that if you edit your .bashrc file, close and reopen your terminal to fully apply the changes (:code:source ~/.bashrc or :code:source ~/.zshrc may also work).

SpaceKLIP also makes use of the JWST Calibration Reference Data System (CRDS) and you will need to set the corresponding environment variables. Follow the instructions here for bash or zsh: https://jwst-crds.stsci.edu/docs/cmdline_bestrefs/. Note that you do not have to install AstroConda, just set the environment variables (making sure that the CRDS path you set actually exists, i.e., you may need to create the directory).

Code status


The current capabilities of the code are summarized below.

::

database.py

::

plotting.py

::

utils.py

::

coron1pipeline.py

::

coron2pipeline.py

::

coron3pipeline.py

::

pyklippipeline.py

::

classpsfsubpipeline.py

::

imagetools.py

::

analysistools.py

::

mast.py