Usual deglitching methods that work on the time history of a given pixel are good to remove extremely deviant flux values. We can go further in the reduction of the noise level by working sky position by sky position instead of working on the time history of every pixel. For a given sky position (, ), we compare the pixels in the data cube that have seen that position with the average flux in the map at the vicinity of the position (, ).
Three cases are possible, and here is how we deal with each case: