Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_common
Commits
6dbfe879
Commit
6dbfe879
authored
Aug 29, 2022
by
BO ZHANG
🏀
Browse files
updated README.md
parent
bc26046d
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
6dbfe879
## csst_
proto
## csst_
common
[
![Documentation Status
](
https://readthedocs.org/projects/csst-proto/badge/?version=latest
)
](https://csst-proto.readthedocs.io/en/latest/?badge=latest)
CSST L1 pipeline prototype.
...
...
@@ -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
...
...
@@ -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
```
...
...
@@ -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`
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment