TL;DR
Cosmic rays are a persistent nuisance in astronomical images, obscuring valuable data. This paper introduces an "attention augmented" deep learning approach that significantly improves the accuracy of cosmic ray detection and removal in astronomical images, outperforming existing state-of-the-art methods. This advancement is crucial for producing cleaner astronomical data for scientific analysis.
What Problem Does This Paper Address?
Astronomical observations, especially those from solid-state detectors like CCDs, are frequently contaminated by cosmic rays (CRs). These high-energy particles can create spurious signals that mimic real astronomical objects, leading to false detections and degrading the sensitivity of scientific analyses. While manual inspection is impractical for the vast amounts of data generated by modern surveys, automated CR detection and masking are essential. Existing deep learning methods, while promising, can struggle with variations in CR rates and morphologies across different instruments and datasets, particularly the low CR density in ground-based observations. This paper aims to develop more robust and generalizable CR detection models.
Methods
The core of this work involves enhancing existing deep learning architectures for CR detection by incorporating Attention Gates (AGs). The authors use two popular U-Net based models, deepCR and Cosmic-CoNN, as baselines. These models are essentially semantic segmentation networks that classify each pixel as either a CR hit or not.
The novel aspect is the integration of AGs into the decoder blocks of the U-Net architecture. AGs are designed to help the network focus on relevant features and suppress irrelevant ones. In this context, they allow the model to better identify CR structures of varying sizes and shapes, even those that are faint or have complex morphologies. The AG module is differentiable and trained end-to-end with the rest of the network, adding minimal computational overhead.
Datasets
- DECam Dataset: A custom dataset was created using raw science images from the Dark Energy Camera (DECam) in its g, r, i, and z photometric bands. To generate ground truth CR masks, the authors used a synthetic approach:
- CR hits were identified and removed from images using Astro-SCRAPPY.
- Dark frames were used to synthetically add CR contamination to the cleaned images, with CR masks generated by thresholding dark frame pixel values.
- Images were then divided into 256x256 pixel patches for training.
- LCOGT CR Dataset: This publicly available dataset from Las Cumbres Observatory (LCO) was used for testing the generalization capabilities of the models. It consists of images from three different telescope classes (0.4m, 1m, and 2m) and was used as "previously unseen" data.
Key Insights and Ideas
- Attention Augmentation is Key for Generalization: The most significant insight is that adding Attention Gates to existing deep learning models (deepCR and Cosmic-CoNN) substantially improves their ability to generalize to new, unseen data from different telescopes and instruments.
- AGs Help Focus on Subtle CR Signatures: Attention mechanisms allow the models to better highlight and focus on the often subtle and varied spatial signatures of cosmic rays, leading to more accurate detection of CR peripherals.
- Synthetic Data Generation is Effective: The method of generating synthetic CR contamination using dark frames proved effective for creating a robust training dataset for DECam data, enabling the development of high-performing models.
- Cosmic-CoNN as a Strong Baseline: The Cosmic-CoNN model, pre-trained on LCO data, demonstrated strong performance on DECam data, highlighting its potential as a more generalizable baseline compared to deepCR.
Key Results
- DECam Performance: The attention-augmented models (Att deepCR and Att Cosmic-CoNN) showed marginal but consistent improvements in True Positive Rate (TPR) at 0.01% False Positive Rate (FPR) and Precision at 95% TPR on the DECam test set compared to their baseline counterparts.
- LCOGT Generalization: The attention-augmented models demonstrated significant gains in TPR at 0.01% FPR when tested on the previously unseen LCO data across three different telescope classes. This highlights their improved generalization capability.
- Outperforming State-of-the-Art: The proposed attention-augmented models outperformed existing methods like LACosmic, Astro-SCRAPPY, MaxiMask, and the pre-trained Cosmic-CoNN on the DECam dataset.
- Qualitative Improvements: Visual inspection of CR detection results showed that the attention-augmented models were better at detecting CR peripherals and produced fewer false positives compared to some other methods.
- Computational Cost: The addition of AGs resulted in a nominal increase (around 1%) in trainable parameters and minimal impact on computational cost.
Limitations and Future Work
- LCOGT Performance Gap: While the models generalized well to LCOGT data, their performance was not as high as on the DECam data. This is attributed to differences in CR morphology and data characteristics between the two datasets (e.g., DECam having longer CR streaks, LCOGT having more dot-like CRs).
- False Positives on LCOGT: The models still produced some false positives on LCOGT data, particularly for the 0.4-meter telescope class.
- Future Work: The authors plan to improve the generalization capabilities of their models to make them more independent of the underlying image generation process and instrument specifics. They also aim to address the differences in CR morphology observed between DECam and LCOGT data.
Summary updated