Clean Cosmic Rays module is too aggressive
kelockhart opened this issue · comments
This is especially noticeable in data with a very narrow PSF, such as arc lamps or data taken with the new detector (early 2016 onwards). In data with a very narrow PSF, the peak of emission lines are being clipped and the flux misassigned to the wrong spaxels and wavelength channels.
Kbb/50 mas arc lamp, from 09/2016, after Clean Cosmic Ray but before cube assembly (e.g. still in 2D). Holes are seen at the peak of several bright emission lines:
And the bad pixel mask from the same. Dark spots indicates pixels that have been marked as bad, mostly by the Clean Cosmic Ray routine. These align with the holes seen in the previous image:
And the same, after assembly into the 3D cube. The top section of the figure shows a channel map of the entire cube, centered on the peak of one of the bright emission lines. The bottom section shows the spectrum in one spaxel (highlighted in green in the channel map). The peak of the emission line has been removed by the Clean Cosmic Ray module: