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

Implementing Calibrated Contrast Measurements #91

Closed AarynnCarter closed 8 months ago

AarynnCarter commented 1 year ago

Putting together all the code necessary to perform calibrated contrast measurements.

Resolves #79, Resolves #85

Started by implementing the MIRI FQPM masking, this is improved from original spaceKLIP and uses rectangles instead of pizza slices.

image
AarynnCarter commented 1 year ago

The SpaceTelescope(Data) class that was in pyklippipeline.py has now been removed. Instead, I have ported this over to pyKLIP itself under a new jwst_new branch: https://bitbucket.org/pyKLIP/pyklip/src/jwst_new/pyklip/instruments/JWST.py.

Important: We shouldn't merge this spaceKLIP branch until we are happy with the pyKLIP file / have merged things into pyKLIP's jwst branch.

EDIT: Don't worry about failing checks at the moment, they are related to the code wanting to use the older version of pyKLIP.

AarynnCarter commented 1 year ago

Companion injection and recovery is now coded up, based on fitting 2D Gaussians to estimate the peak flux of injected sources after KLIP subtraction. For MIRI this is probably okay, but perhaps we should do something smarter for NIRCam in the future.

AarynnCarter commented 1 year ago

Okay calibrated contrast curves can now be calculated. I won't merge in just yet, as I think further thought needs to go into retrieved throughputs >1. Plus, it would be great if a few people could test this first. @mperrin, @kammerje, I know you are on vacation right now, but perhaps when you get back you could review what I've done.

image image
AarynnCarter commented 1 year ago

Added some minor bug fixes.

Resolves #88, Resolves #92

mperrin commented 1 year ago

@AarynnCarter FYI I'm back from vacation, still playing catchup on many things. I see & acknowledge your request for me to take a look at this, and will try to do so within the next ~2 weeks (i.e. before the conference in a couple weeks here).

Is this "ready to go" from your perspective? I see it's still a Draft PR. And can you remind me if there's a plan yet for timing re the related pyKLIP branch merges etc?

AarynnCarter commented 1 year ago

@mperrin This should be good for review, yes. I might add some minor bug fixes in if needed. This is a somewhat complicated PR as we'll need to make sure pyKLIP is updated first, so once you think it's good to go I will coordinate with Jason so that everything gets updated together.

AarynnCarter commented 11 months ago

@AarynnCarter Add logging for calibrated contrast steps

AarynnCarter commented 9 months ago

Latest commit Resolves #119