Commit 6dbfe879 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

updated README.md

parent bc26046d
## csst_proto ## csst_common
[![Documentation Status](https://readthedocs.org/projects/csst-proto/badge/?version=latest)](https://csst-proto.readthedocs.io/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/csst-proto/badge/?version=latest)](https://csst-proto.readthedocs.io/en/latest/?badge=latest)
CSST L1 pipeline prototype. CSST L1 pipeline prototype.
...@@ -6,7 +6,7 @@ CSST L1 pipeline prototype. ...@@ -6,7 +6,7 @@ CSST L1 pipeline prototype.
## homepage ## homepage
This code is available at *CSST GitLab*: This code is available at *CSST GitLab*:
- [https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto](https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto). - [https://csst-tb.bao.ac.cn/code/csst-l1/csst_common](https://csst-tb.bao.ac.cn/code/csst-l1/csst_common).
## documentation ## documentation
...@@ -21,11 +21,11 @@ A sphinx-based documentation is available at ...@@ -21,11 +21,11 @@ A sphinx-based documentation is available at
## installation ## installation
`csst_proto` can be installed with the following shell command `csst_common` can be installed with the following shell command
```bash ```bash
git clone https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto.git git clone https://csst-tb.bao.ac.cn/code/csst-l1/csst_common.git
cd csst_proto cd csst_common
pip install -r requirements.txt pip install -r requirements.txt
python setup.py install python setup.py install
``` ```
...@@ -33,23 +33,45 @@ python setup.py install ...@@ -33,23 +33,45 @@ python setup.py install
or a single-line command or a single-line command
```bash ```bash
sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto/-/raw/main/install.sh)" sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_common/-/raw/main/install.sh)"
``` ```
## instruction ## instruction
A simple example on how to use this package: how to import CSST parameters:
```python ```python
from csst_proto.top_level_interface import flip_image from csst_common.params import cp
from astropy.io import fits print(cp)
print(cp.mbi.DETECTOR2FILTER)
```
# read an L0 image how to use data_manager
img = fits.getdata("CSST_MS_SCI_06_L0_img.fits") ```python
# flip the image from csst_common.data_manager import CsstMbiDataManager
img_flipped = flip_image(img=img) dm = CsstMbiDataManager(...)
# access L0 directory
dm.dir_l0
# access L1 directory
dm.dir_l1
# access dir_pcref
dm.dir_pcref
# access path_aux
dm.path_aux
# access ver_sim
dm.ver_sim
# access target detectors
dm.target_detectors
# access available detectors
dm.available_detectors
# define an L1 file (detector-specified)
dm.l1_detector(detector=6)
# define an L1 file (non-detector-specified)
dm.l1_file("flipped_image.fits")
``` ```
## algorithm description ## algorithm description
The `csst_proto` uses an awesome algorithm based on `numpy.ndarray` indices to flip images. The `csst_common` provides some common modules for CSST pipeline.
- `csst_common.parameters`
- `csst_common.data_manager`
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment