README.md 1.03 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
7
## homepage
*Gitlab*: [https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto](https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto)
BO ZHANG's avatar
BO ZHANG committed
8
9


BO ZHANG's avatar
BO ZHANG committed
10
## install
BO ZHANG's avatar
BO ZHANG committed
11

BO ZHANG's avatar
BO ZHANG committed
12
13
14
15
`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
16
cd csst_proto
BO ZHANG's avatar
BO ZHANG committed
17
18
19
20
21
22
23
24
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
25
26
```

BO ZHANG's avatar
BO ZHANG committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
## instruction

A simple example on how to use this package:

```python
import numpy as np
from csst_proto import flip_image, print_data
from astropy.io import fits

# read an L0 image
img = fits.getdata("CSST_L0_img.fits")
# flip the image
img_flipped = flip_image(img=img)
```

## algorithm

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