deepCR: Deep Learning Based Cosmic Ray Removal for Astronomical Images

Build Status codecov
alt:Documentation Status

Identify and remove cosmic rays from astronomical images using trained convolutional neural networks.


pip install deepCR

Or you can install from source:

git clone
cd deepCR/
pip install .
from deepCR import deepCR
import numpy as np
mdl = deepCR(mask="ACS-WFC", device="CPU")
image = np.zeros((1024, 1024))
binary_mask = mdl.clean(image, segment=True, n_jobs=-1)

Currently available models

from deepCR import deepCR
acswfc_model = deepCR(mask='ACS-WFC', inpaint='ACS-WFC-F606W-2-32')


For detailed descriptions and requirements of currently available models, please visit the model_zoo page below.

If you run into any issues, please don’t hesitate to open an issue on GitHub.