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

Removing COM substrate correction & bugfix with phase_cross_correlation #108

Closed kammerje closed 9 months ago

kammerje commented 10 months ago

After discussions with the NIRCam Team we are removing the COM substrate correction as it had already been accounted for in the JWST pipeline photometric calibration (@mperrin @AarynnCarter).

kammerje commented 10 months ago

Ok, I did not realize that I cannot make two separate PRs from the same branch. Anyway, the second change is going back to the integer pixel centering. There are several reasons for that. Firstly, the injection-recovery module only works correctly if the ImageTools recenter function uses the same absolute center as pyKLIP. This is obviously a little buggy, but that is how it works for now. We could also change the entire ImageTools recenter code to center on the pixel corner, but that was not done intentionally since we also want to use this function to get the peak value of PSFs for contrast curve calculations. In general, I prefer centering on an integer pixel instead of the pixel corner for that reason. One immediately gets the peak value of the centered PSF which is needed by pyKLIP. Of course, for the KLIP algo itself it doesn't really matter where the center is, but to be consistent throughout all of the code, I recommend always using integer pixel centering.

@AarynnCarter Opinions? Would your calibrated contrast curves code still work?

AarynnCarter commented 8 months ago

@kammerje I just noticed this was merged into develop but I don't think we've reached a consensus on the pixel centering. Could you give my earlier message a read through and let me know what you think? I'm really not sure that the current approach is correct.