# CSST-COMMOM-CRMASK - Introduction **CRMask** is a module for detecting cosmic rays on the CSST images using state-of-art models. It should be also applied for images from other telescopes, as long as the images have the same data structure as that of CSST. # Python package dependencies The following python packages are needed to **CRMask**: * astropy == 4.x (>= 5.0 will be tested in the future) * ccdproc >= 2.1.0 * deepCR >= 0.1.5 * matplotlib >= 3.1.2 * numpy >= 1.19.5 * pytorch >= 1.8.1 * scipy >= 1.3.3 Install these package under Ubuntu 20.04 LTS: sudo apt install python3-numpy python3-scipy python3-matplotlib python3-astropy python3-ccdproc python3 -m pip install pytorch deepCR # Use guide 下载crmask.py,crmask.ini这两个文件。 ./crmask.py your_file.fits your_model 其中your_file.fits是输入fits文件,your_model是扣除宇宙线的方法,可以是deepCR或者lacosmic。 如果需要使用CSST仿真数据训练得到的模型扣除宇宙线,下载CSST_2021-12-30_CCD23_epoch20.pth,该模型隐藏层数为50。 # 注意 如果使用deepCR自带用HST/ACS数据训练得到的模型,在配置文件中,要将hidden这个配置参数改为32。