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
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 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 webbpsf
and webbpsf_ext
. Instructions to do this can be found at the respective package websites (WebbPSF, WebbPSF_ext). Ensure that if you edit your .bashrc file, close and reopen your terminal to fully apply the changes (source ~/.bashrc
or 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).
The current capabilities of the code are summarized below.
database.py
read_jwst_s012_data
: workingread_jwst_s3_data
: workingread_jwst_s4_data
: workingprint_obs
: workingprint_red
: workingprint_src
: workingupdate_obs
: workingupdate_src
: workingsummarize
: working
plotting.py
display_coron_image
: workingdisplay_coron_dataset
: working
utils.py
read_obs
: workingwrite_obs
: workingread_red
: working
coron1pipeline.py
run_obs
: working- custom saturation step: working
- custom reference pixel step: needs updating (side reference pixels not working for subarrays)
coron2pipeline.py
run_obs
: working- additional outlier detection step: working
coron3pipeline.py
make_asn_file
: workingrun_obs
: working
pyklippipeline.py
run_obs
: working- no absolute PSF alignment, this is now done using the
ImageTools
library - no relative frame alignment, this is now done using the
ImageTools
library - the old
JWST.py
is now implemented here - save individual rolls with
save_rolls = True
keyword
classpsfsubpipeline.py
run_obs
: working, under development- save individual rolls with
save_rolls = True
keyword
imagetools.py
remove_frames
: workingcrop_frames
: workingpad_frames
: workingcoadd_frames
: workingsubtract_median
: workingsubtract_background
: workingfix_bad_pixels
: workingreplace_nans
: workingblur_frames
: workingupdate_nircam_centers
: working with filter-dependent shiftsrecenter_frames
: working (absolute PSF alignment)align_frames
: working (relative frame alignment)
analysistools.py
raw_contrast
: working withpyklippipeline
products, not working withcoron3pipeline
products since PSF center not being trackedextract_companions
: working withpyklippipeline
products, not working withcoron3pipeline
products since PSF center not being tracked- combined coronagraphic throughput map: working
- `` calibrated_contrast`` working with
pyklippipeline
products
mast.py
query_coron_datasets
: working