Loading README.md +37 −15 Original line number Diff line number Diff line ## csst_proto ## csst_common [](https://csst-proto.readthedocs.io/en/latest/?badge=latest) CSST L1 pipeline prototype. Loading @@ -6,7 +6,7 @@ CSST L1 pipeline prototype. ## homepage 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 Loading @@ -21,11 +21,11 @@ A sphinx-based documentation is available at ## installation `csst_proto` can be installed with the following shell command `csst_common` can be installed with the following shell command ```bash git clone https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto.git cd csst_proto git clone https://csst-tb.bao.ac.cn/code/csst-l1/csst_common.git cd csst_common pip install -r requirements.txt python setup.py install ``` Loading @@ -33,23 +33,45 @@ 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)" sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_common/-/raw/main/install.sh)" ``` ## instruction A simple example on how to use this package: how to import CSST parameters: ```python from csst_proto.top_level_interface import flip_image from astropy.io import fits from csst_common.params import cp print(cp) print(cp.mbi.DETECTOR2FILTER) ``` # read an L0 image img = fits.getdata("CSST_MS_SCI_06_L0_img.fits") # flip the image img_flipped = flip_image(img=img) how to use data_manager ```python from csst_common.data_manager import CsstMbiDataManager 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 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` Loading
README.md +37 −15 Original line number Diff line number Diff line ## csst_proto ## csst_common [](https://csst-proto.readthedocs.io/en/latest/?badge=latest) CSST L1 pipeline prototype. Loading @@ -6,7 +6,7 @@ CSST L1 pipeline prototype. ## homepage 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 Loading @@ -21,11 +21,11 @@ A sphinx-based documentation is available at ## installation `csst_proto` can be installed with the following shell command `csst_common` can be installed with the following shell command ```bash git clone https://csst-tb.bao.ac.cn/code/csst-l1/csst_proto.git cd csst_proto git clone https://csst-tb.bao.ac.cn/code/csst-l1/csst_common.git cd csst_common pip install -r requirements.txt python setup.py install ``` Loading @@ -33,23 +33,45 @@ 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)" sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_common/-/raw/main/install.sh)" ``` ## instruction A simple example on how to use this package: how to import CSST parameters: ```python from csst_proto.top_level_interface import flip_image from astropy.io import fits from csst_common.params import cp print(cp) print(cp.mbi.DETECTOR2FILTER) ``` # read an L0 image img = fits.getdata("CSST_MS_SCI_06_L0_img.fits") # flip the image img_flipped = flip_image(img=img) how to use data_manager ```python from csst_common.data_manager import CsstMbiDataManager 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 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`