Skip to content
README.md 1.11 KiB
Newer Older
BO ZHANG's avatar
BO ZHANG committed
## csst_proto 
BO ZHANG's avatar
BO ZHANG committed
[![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
CSST L1 pipeline prototype.
BO ZHANG's avatar
BO ZHANG committed

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

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

BO ZHANG's avatar
BO ZHANG committed
[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

BO ZHANG's avatar
BO ZHANG committed
`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
cd csst_proto
BO ZHANG's avatar
BO ZHANG committed
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
```

BO ZHANG's avatar
BO ZHANG committed
## instruction

A simple example on how to use this package:

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

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

BO ZHANG's avatar
BO ZHANG committed
## algorithm description
BO ZHANG's avatar
BO ZHANG committed

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