add CsstMsFile
BO ZHANG authored
a9519212

csst_common

Documentation Status

CSST L1 pipeline prototype.

homepage

This code is available at CSST GitLab:

documentation

A sphinx-based documentation is available at

dependency

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

installation

csst_common can be installed with the following shell command

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

or a single-line command

sh -c "$(curl -fsSL https://csst-tb.bao.ac.cn/code/csst-l1/csst_common/-/raw/main/install.sh)"

instruction

how to import CSST parameters:

from csst_common.params import CSST_PARAMS as CP
print(CP)
print(CP["mbi"]["detector2filter"])

how to use data_manager

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")

a shortcut for test dataset

from csst_common.data_manager import CsstMbiDataManager

CsstMbiDataManager.quickstart(ver_sim="C5.2", dir_l1=".", exposure_id=100)

algorithm description

The csst_common provides some common modules for CSST pipeline.

  • csst_common.parameters
  • csst_common.data_manager