Open thespacedoctor opened 2 years ago
LACosmic is a good algorithm and experience has shown it works well.
Need to do a timing check on how long it will take to run it on the e2V CCD full frame. It can be lengthy for a full 4kx2k pixel frame. In PESSTO pipeline, for EFOSC2, only the few hundred pixels either side of the object trace were cleaned, which significantly improved speed.
The UV-VIS 4-order structure may allow us to do that too - only run it +/- 50 pixels around the traces, rather than whole frame. If run time is proportional to pixel count then this could reduce LACosmic run time by factor 5-10.
Will need to check if the NIR chip requires cosmic removal - usually HgCdTe chips don't suffer significantly from CR hits. So may not need it for IR arm. But let's double check.
The Kelson sky background subtraction will likely remove CRHs from stare mode observations, so LACosmic will be needed only for single nod / offset images (i.e. less than 3 images per nod location). Some notes:
The LACosmic method is a good technique to remove cosmic ray hits (CRHs) from single exposures. LACosmic was originally implemented in IRAF by Pieter G. van Dokkum. The method is implemented in Python within the Astro-SCRAPPY package.
Before using LACosmic:
The recommended level of sigma clip the CRHs is 5𝜎, but you should experiment.
In Python’s CCDProc the
cosmicray_lacosmic
function will return a new image with CRHs identified in a mask. Where CRHs are found, the data in the image has pixel values replaced with values interpolated from neighbouring pixels.see Craig, M. & Chambers, L. 'Cosmic Ray Removal with CCDProc.'
bookends://sonnysoftware.com/190278