README.md 1.11 KB
Newer Older
BO ZHANG's avatar
BO ZHANG committed
1
## csst_proto 
BO ZHANG's avatar
BO ZHANG committed
2
3
[![Documentation Status](https://readthedocs.org/projects/csst/badge/?version=latest)](https://csst.readthedocs.io/en/latest/?badge=latest)
 
BO ZHANG's avatar
BO ZHANG committed
4
CSST L1 pipeline prototype.
BO ZHANG's avatar
BO ZHANG committed
5

BO ZHANG's avatar
BO ZHANG committed
6
## homepage
BO ZHANG's avatar
BO ZHANG committed
7

BO ZHANG's avatar
BO ZHANG committed
8
This code is available on *CSST GitLab*:
BO ZHANG's avatar
BO ZHANG committed
9

BO ZHANG's avatar
BO ZHANG committed
10
11
12
13
[https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto](https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto).


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

BO ZHANG's avatar
BO ZHANG committed
15
16
17
18
`csst_proto` can be installed with the following shell command

```bash
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
21
22
23
24
25
26
27
pip install -r requirements.txt
python setup.py install
```

or a single-line command

```bash
sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/install.sh)"
BO ZHANG's avatar
BO ZHANG committed
28
29
```

BO ZHANG's avatar
BO ZHANG committed
30
31
32
33
34
35
## instruction

A simple example on how to use this package:

```python
import numpy as np
BO ZHANG's avatar
BO ZHANG committed
36
from csst_proto.top_level_interface import flip_image, read_test_image
BO ZHANG's avatar
BO ZHANG committed
37
38
39
from astropy.io import fits

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

BO ZHANG's avatar
BO ZHANG committed
45
## algorithm description
BO ZHANG's avatar
BO ZHANG committed
46
47

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