README.md 808 Bytes
Newer Older
BO ZHANG's avatar
BO ZHANG committed
1
## csst_proto 
BO ZHANG's avatar
BO ZHANG committed
2
 
BO ZHANG's avatar
BO ZHANG committed
3
CSST 流水线原型,用于展示示例代码。
BO ZHANG's avatar
BO ZHANG committed
4

BO ZHANG's avatar
BO ZHANG committed
5
6
## dependency

BO ZHANG's avatar
BO ZHANG committed
7
8
9
10
- numpy==1.26.1
- scipy==1.11.3
- astropy==5.3.4
- joblib==1.3.0
BO ZHANG's avatar
BO ZHANG committed
11
- toml==0.10.2
BO ZHANG's avatar
BO ZHANG committed
12

BO ZHANG's avatar
BO ZHANG committed
13
## installation
BO ZHANG's avatar
BO ZHANG committed
14

BO ZHANG's avatar
BO ZHANG committed
15
`csst_proto` 可用如下方式安装
BO ZHANG's avatar
BO ZHANG committed
16

BO ZHANG's avatar
BO ZHANG committed
17
```shell
BO ZHANG's avatar
BO ZHANG committed
18
git clone https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto.git
BO ZHANG's avatar
BO ZHANG committed
19
cd csst_proto
BO ZHANG's avatar
BO ZHANG committed
20
pip install .
BO ZHANG's avatar
BO ZHANG committed
21
22
```

BO ZHANG's avatar
BO ZHANG committed
23
或者单行命令:
BO ZHANG's avatar
BO ZHANG committed
24

BO ZHANG's avatar
BO ZHANG committed
25
26
```shell
pip install --force-reinstall git+https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto.git
BO ZHANG's avatar
BO ZHANG committed
27
28
```

BO ZHANG's avatar
BO ZHANG committed
29
## tutorial
BO ZHANG's avatar
BO ZHANG committed
30

BO ZHANG's avatar
BO ZHANG committed
31
一个简单使用教程
BO ZHANG's avatar
BO ZHANG committed
32
33

```python
BO ZHANG's avatar
BO ZHANG committed
34
from csst_proto import flip_image
BO ZHANG's avatar
BO ZHANG committed
35
36
37
from astropy.io import fits

# read an L0 image
BO ZHANG's avatar
BO ZHANG committed
38
img = fits.getdata("CSST_MS_SCI_06_L0_img.fits")
BO ZHANG's avatar
BO ZHANG committed
39
# flip the image
BO ZHANG's avatar
BO ZHANG committed
40
img_flipped = flip_image(image=img)
BO ZHANG's avatar
BO ZHANG committed
41
42
```

BO ZHANG's avatar
BO ZHANG committed
43
## algorithm description
BO ZHANG's avatar
BO ZHANG committed
44
45

The `csst_proto` uses an awesome algorithm based on `numpy.ndarray` indices to flip images.