README.md 1.91 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 at *CSST GitLab*:
BO ZHANG's avatar
BO ZHANG committed
9
- [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
10

BO ZHANG's avatar
BO ZHANG committed
11
## documentation
BO ZHANG's avatar
BO ZHANG committed
12

BO ZHANG's avatar
BO ZHANG committed
13
14
A sphinx-based documentation is available at
- [https://csst-proto.readthedocs.io/en/latest/](https://csst-proto.readthedocs.io/en/latest/)
BO ZHANG's avatar
BO ZHANG committed
15

BO ZHANG's avatar
BO ZHANG committed
16
17
18
19
20
21
## dependency

- numpy~=1.20.3
- joblib~=1.1.0
- astropy~=5.1

BO ZHANG's avatar
BO ZHANG committed
22
## installation
BO ZHANG's avatar
BO ZHANG committed
23

BO ZHANG's avatar
BO ZHANG committed
24
25
26
27
`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
28
cd csst_proto
BO ZHANG's avatar
BO ZHANG committed
29
30
31
32
33
34
35
36
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
37
38
```

BO ZHANG's avatar
BO ZHANG committed
39
40
41
42
43
## instruction

A simple example on how to use this package:

```python
BO ZHANG's avatar
BO ZHANG committed
44
from csst_proto.api import flip_image
BO ZHANG's avatar
BO ZHANG committed
45
46
47
from astropy.io import fits

# read an L0 image
BO ZHANG's avatar
BO ZHANG committed
48
img = fits.getdata("CSST_MS_SCI_06_L0_img.fits")
BO ZHANG's avatar
BO ZHANG committed
49
50
51
52
# flip the image
img_flipped = flip_image(img=img)
```

BO ZHANG's avatar
BO ZHANG committed
53
## algorithm description
BO ZHANG's avatar
BO ZHANG committed
54
55

The `csst_proto` uses an awesome algorithm based on `numpy.ndarray` indices to flip images.
BO ZHANG's avatar
BO ZHANG committed
56

BO ZHANG's avatar
BO ZHANG committed
57
---
BO ZHANG's avatar
BO ZHANG committed
58

BO ZHANG's avatar
BO ZHANG committed
59
## useful links
BO ZHANG's avatar
BO ZHANG committed
60
61
62
63
64
65
66
- python packaging user guide: https://packaging.python.org/en/latest/
- packaging binary extensions (C/C++): https://packaging.python.org/en/latest/guides/packaging-binary-extensions
- `setuptools`: https://packaging.python.org/en/latest/tutorials/installing-packages/
- gitlab CI/CD pipeline: https://docs.gitlab.com/ee/ci/pipelines/
- gitlab runners: https://docs.gitlab.com/runner/
- `sphinx`: https://www.sphinx-doc.org/en/master/index.html
- markdown: https://www.markdownguide.org/
BO ZHANG's avatar
BO ZHANG committed
67
- restructured text: https://docutils.sourceforge.io/rst.html
BO ZHANG's avatar
BO ZHANG committed
68
- readthedocs: https://readthedocs.io/ or https://rtfd.io/