README.md 2.32 KB
Newer Older
BO ZHANG's avatar
BO ZHANG committed
1
## csst_proto 
BO ZHANG's avatar
BO ZHANG committed
2
[![Documentation Status](https://readthedocs.org/projects/csst-proto/badge/?version=latest)](https://csst-proto.readthedocs.io/en/latest/?badge=latest)
BO ZHANG's avatar
BO ZHANG committed
3
 
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.
BO ZHANG's avatar
BO ZHANG committed
48
49
50
51


## timeline

BO ZHANG's avatar
BO ZHANG committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
| file / directory   | description                     | urgent | C6  | C7  |
|--------------------|---------------------------------|--------|-----|-----|
| `csst_proto/`      | source code & data              | √√     | √   |     |
| `doc/`             | sphinx-based documentation      |        |     | √   |
| `example/`         | code examples                   | -      | -   | -   |
| `tests/`           | unit tests                      |        |     | √   |
| `.gitignore`       | git file                        |        | √   |     |
| `.gitlab-ci.yml`   | gitlab CI/CD pipeline           |        |     | √   |
| `LICENSE`          | code license                    |        | √   |     |
| `README.md`        | readme file                     | √√     | √   |     |
| `install.sh`       | single-line installation script |        | √   |     |
| `install_local.sh` | local installation script       |        | √   |     |
| `readthedocs.yml`  | readthedocs.io configuration    |        |     | √   |
| `requirements.txt` | code requirements               | √      | √   |     |
| `setup.py`         | sphinx-based documentation      | √√     | √   |     |
BO ZHANG's avatar
BO ZHANG committed
67