README.md 1.19 KB
Newer Older
Yi Hu's avatar
Yi Hu committed
1
# CSST-COMMOM-CRMASK - Introduction
Hu Yi's avatar
Hu Yi committed
2

Yi Hu's avatar
Yi Hu committed
3
**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.
Hu Yi's avatar
Hu Yi committed
4

Yi Hu's avatar
Yi Hu committed
5
# Python package dependencies
Hu Yi's avatar
Hu Yi committed
6

Yi Hu's avatar
Yi Hu committed
7
The following python packages are needed to **CRMask**:
Hu Yi's avatar
Hu Yi committed
8

Yi Hu's avatar
Yi Hu committed
9
10
11
12
13
14
15
* 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
Hu Yi's avatar
Hu Yi committed
16

Yi Hu's avatar
Yi Hu committed
17
Install these package under Ubuntu 20.04 LTS:
Hu Yi's avatar
Hu Yi committed
18

Yi Hu's avatar
Yi Hu committed
19
20
        sudo apt install python3-numpy python3-scipy python3-matplotlib python3-astropy python3-ccdproc
        python3 -m pip install pytorch deepCR
Hu Yi's avatar
Hu Yi committed
21

Yi Hu's avatar
Yi Hu committed
22
# Use guide
Hu Yi's avatar
Hu Yi committed
23
24
25
26
27
28
29

下载crmask.py,crmask.ini这两个文件。

./crmask.py your_file.fits your_model

其中your_file.fits是输入fits文件,your_model是扣除宇宙线的方法,可以是deepCR或者lacosmic。

Hu Yi's avatar
Hu Yi committed
30
31
32
33
如果需要使用CSST仿真数据训练得到的模型扣除宇宙线,下载CSST_2021-12-30_CCD23_epoch20.pth,该模型隐藏层数为50。

# 注意

Yi Hu's avatar
Yi Hu committed
34
如果使用deepCR自带用HST/ACS数据训练得到的模型,在配置文件中,要将hidden这个配置参数改为32。
Hu Yi's avatar
Hu Yi committed
35
36


Hu Yi's avatar
Hu Yi committed
37