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 10 forks source link

Get host star position from Coron3Pipeline reductions #74

Open kammerje opened 1 year ago

kammerje commented 1 year ago

Currently, the read_jwst_s3_data function in database.py assigns np.nan for the CRPIX1 and CRPIX2 values if they are not present in the input FITS file header. This is the case for Coron3Pipeline reductions. We need to figure out how to compute the host star position in the Coron3Pipeline reductions only from their headers.

Bug because the CRPIX1 and CRPIX2 values are required for the contrast calculation step and it currently crashes with Coron3Pipeline reductions.

JarronL commented 1 year ago

Have a look at webbpsf_ext.imreg_tools.get_expected_loc(). I use this to get some initial expected location, then perform PSF cross correlation within a few pixels to fine tune the sub-pixel location.

Can use either a FITS header of jwst datamodel as input.