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

Incorrect SW filter mask when using LW coronagraph generated by make_psfmasks.py #184

Closed AarynnCarter closed 2 weeks ago

AarynnCarter commented 1 month ago

Generated mask files for the SW filters are not accurate when using a LW coronagraph. In this situation the field of view is compressed to 320x320 pixels and the ND squares are not visible. Nevertheless, these squares are present in the spaceKLIP generated masks and the coronagraph transmission also seems too focused. See attached images of Jdocs vs spaceKLIP.

Suggest removing hardcoding of file names in make_psfmasks.py, or at a minimum updating them to the current valid files.

Seems that many of the psfmask files are hardcoded, and may be out of date, driving this issue. image (7) image (8)

wbalmer commented 4 weeks ago

This is the case for the 400x256 subarray now used for the SW+LW bar mask observations too, but is slightly worse because in that case the 320x320 hardcoded file produces a size error in, e.g. the contrast curve steps.

kammerje commented 2 weeks ago

I saw that the PSF mask files on CRDS have been updated now so that we can pull them directly from there. This makes the entire make_psfmasks.py file obsolete (I suggest we remove it from the repo eventually) and simplifies the installation of spaceKLIP. I tested this with the ERS data and some of @AarynnCarter's new data and it worked correctly.

Fixed with this commit.