mpi-astronomy / snowblind

Algorithms for cleaning JWST data
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Laplace filter self-cal stacks to find OPEN pixels #11

Open jdavies-st opened 3 months ago

jdavies-st commented 3 months ago

After some discussion with the Euclid NISP folks, it may make sense to use a 2D Laplace kernel to make OPEN and ADJ_OPEN pixels stand out more in OpenPixelStep. Convolving with a kernel something like:

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

before thresholding will make them stand out more.

jdavies-st commented 3 months ago

Given that the central pixel is set to NaN in RampFitStep, this short-circuits the Laplace filter if run on the _rate or _cal files. It might make more sense to make a stack from the first group of the constituent _jump files, i.e. before the pixel values are set to NaN for bad pixels.