Skip to content

Tests: cosmic ray module

kelockhart edited this page Jan 18, 2017 · 3 revisions

The problem

The current cosmic ray removal module is too aggressive, especially in data with a very narrow PSF (e.g. arc lamps, or data taken with the new detector, installed in early 2016). Running the Clean Cosmic Ray routine on these data produce artificial holes at the position of the brightest emission lines.

Example from a September 2016 Kbb/50 mas arc lamp, after running Clean Cosmic Ray but before assembling into a cube (e.g. data are still in their original 2D form). The dark holes at the position of several bright emission lines were produced by the Clean Cosmic Ray module erroneously clipping these emission lines:

And the bad pixel mask, from the same and showing the same region of the 2D detector. The dark spots indicate pixels that have been marked as bad, mostly by the Clean Cosmic Ray module. These correspond with the dark holes in the previous image:

This clipping of bright emission lines propagates into the reduced cube spectra. Below is the cube produced from the above data. The top section shows a channel map of the entire cube, centered on the peak of a bright emission line. The bottom section shows the spectrum at a single spaxel (indicated in green in the channel map). The peak of the emission line has been removed by the Clean Cosmic Ray:

Clean Cosmic Ray also clips some sky lines (though not as badly as arc lamp lines, in general). This propagates into increased noise and residuals after scaled sky subtraction, as the sky lines are not removed properly, and is thus more of a concern for general science data.

Quantifying the problem

The emission line flux clipped by Clean Cosmic Ray is placed in other spaxels and wavelength channels by the spatial rectification code. This can be quantified using the flux misassignment code. For the above data set, a cube that has had Clean Cosmic Ray performed shows roughly 75% of flux in the correct spaxel and wavelength channel. By turning off that module and keeping everything else the same during the reduction, that increases to 86% of flux assigned correctly. Overall, for 2016 (and onwards) arc lamp data, turning off the Clean Cosmic Ray module results in roughly 10 percentage points improvement in the flux misassignment.

For 2012 - 2015 data, turning off the Clean Cosmic Ray module produces a roughly 2 percentage point improvement in flux misassignment in arc lamp data.

Clean Cosmic Ray's effect on sky lines and the resulting poor sky subtraction has not yet been quantified.