Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyword to allow flagging of pixels below median #10

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

bhilbert4
Copy link
Contributor

In experimenting with using rcselfcal to flag bad pixels in NIRCam, I've found that there is a small population of pixels with signals well below the median that it would be helpful to flag.

You already had a commented out line for flagging pixels below the median. This PR just adds a keyword to toggle this line on and off, and sets the default to be False.

@jdavies-st
Copy link
Collaborator

This looks great! Could you rebase against master? I did a little cleanup for the next release, which includes renaming this step and changing the source code filename. RcSelfCal -> OpenPixelStep

Btw, how stable are these open pixels? Is it possible to just flag these in the flats, or is there too much structure in the flats to find them at this low level, and it's better to flag them in flattened sky/zodi fields?

@jdavies-st
Copy link
Collaborator

Oh, and are the pixels below the median level the "center" OPEN pixel and those above the median level the ADJ_OPEN flagged?

Btw, we see these same artifacts on the NISP detectors on board Euclid. Euclid folks call them "flowers", as they look like tulips.

After some discussion with the Euclid NISP folks and seeing how they're detecting and tracking them, I'm thinking about using a 2D laplace kernel to make them stand out more. Something like:

[[0,  1, 0],
 [1, -4, 1],
 [0,  1, 0]]

Thoughts?

@jdavies-st
Copy link
Collaborator

Nevermind, I added a commit, checks pass. Merging.

@jdavies-st jdavies-st added the enhancement New feature or request label Jul 1, 2024
@jdavies-st jdavies-st merged commit 9c42fb1 into mpi-astronomy:main Jul 1, 2024
3 checks passed
@bhilbert4
Copy link
Contributor Author

I know a closed PR isn't the best place for a discussion, but just for completeness:

I'm not sure if the low pixels will be found in the flats. I can take a look, but I figure as long as we're here flagging the high pixels, it's minimal effort to flag the low ones. NIRCam also doesn't have a lamp, so updating flats is on a slow cadence given that they need to be built up from on sky observations.

The typical definition of OPEN pixels that we've used is that open pixels have zero signal. Everything leaks out to neighboring pixels. So in that sense this pixels aren't open. But in practical terms, it might be ok to label them as open. I haven't looked exhaustively at the neighbors to see if they have abnormally high signal, which would be an indicator of signal leakage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants