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-dfs
csst-dfs-api
Commits
f9e25589
Commit
f9e25589
authored
Apr 23, 2022
by
Wei Shoulin
Browse files
compact examples
parent
21bc6ded
Changes
5
Hide whitespace changes
Inline
Side-by-side
examples/demo_facility_level0.py
deleted
100644 → 0
View file @
21bc6ded
from
csst_dfs_api.facility.brick
import
Level0DataApi
api
=
Level0DataApi
()
# find
recs
=
api
.
find
(
obs_id
=
'17'
,
obs_type
=
'sci'
,
limit
=
0
,
prc_status
=
-
1
)
print
(
'find:'
,
recs
)
# get
rec
=
api
.
get
(
level0_id
=
'100'
)
print
(
'get:'
,
rec
)
# update_proc_status
rec
=
api
.
update_proc_status
(
level0_id
=
'100'
,
status
=
6
)
print
(
'update_proc_status:'
,
rec
)
# update_qc0_status
rec
=
api
.
update_qc0_status
(
level0_id
=
'100'
,
status
=
7
)
print
(
'update_qc0_status:'
,
rec
)
examples/demo_facility_level0_prc.py
deleted
100644 → 0
View file @
21bc6ded
from
csst_dfs_api.facility.level0prc
import
Level0PrcApi
api
=
Level0PrcApi
()
#find
recs
=
api
.
find
(
level0_id
=
'134'
)
print
(
'find:'
,
recs
)
#update_proc_status
rec
=
api
.
update_proc_status
(
id
=
2
,
status
=
4
)
print
(
'update_proc_status:'
,
rec
)
#write
rec
=
api
.
write
(
level0_id
=
'134'
,
pipeline_id
=
"P1"
,
prc_module
=
"QC0"
,
params_file_path
=
"/opt/dddasd.params"
,
prc_status
=
3
,
prc_time
=
'2021-06-04 11:12:13'
,
result_file_path
=
"/opt/dddasd.header"
)
print
(
'write:'
,
rec
)
\ No newline at end of file
examples/demo_facility_level1_prc.py
deleted
100644 → 0
View file @
21bc6ded
from
csst_dfs_api.facility.level1prc
import
Level1PrcApi
api
=
Level1PrcApi
()
#find
recs
=
api
.
find
(
level1_id
=
3
)
print
(
'find:'
,
recs
)
#update_proc_status
rec
=
api
.
update_proc_status
(
id
=
2
,
status
=
4
)
print
(
'update_proc_status:'
,
rec
)
#write
rec
=
api
.
write
(
level1_id
=
3
,
pipeline_id
=
"P1"
,
prc_module
=
"QC0"
,
params_file_path
=
"/opt/dddasd.params"
,
prc_status
=
3
,
prc_time
=
'2021-06-04 11:12:13'
,
result_file_path
=
"/opt/dddasd.header"
)
print
(
'write:'
,
rec
)
\ No newline at end of file
examples/demo_facility_observation.py
deleted
100644 → 0
View file @
21bc6ded
from
csst_dfs_api.facility.observation
import
ObservationApi
api
=
ObservationApi
()
#find
recs
=
api
.
find
(
module_id
=
"MSC"
,
limit
=
0
,
prc_status
=-
1
)
print
(
'find:'
,
recs
)
# get
rec
=
api
.
get
(
obs_id
=
'17'
)
print
(
'get:'
,
rec
)
# update_proc_status
rec
=
api
.
update_proc_status
(
obs_id
=
'17'
,
status
=
3
,)
print
(
'update_proc_status:'
,
rec
)
# update_qc0_status
rec
=
api
.
update_qc0_status
(
obs_id
=
'17'
,
status
=
3
,)
print
(
'update_qc0_status:'
,
rec
)
\ No newline at end of file
examples/ifs_rss_pipeline.py
View file @
f9e25589
import
os
import
os
import
numpy
as
np
import
pandas
as
pd
import
logging
import
logging
from
astropy.io
import
fits
from
astropy.io
import
fits
from
csst_dfs_commons.logging
import
setup_logging
from
csst_dfs_commons.logging
import
setup_logging
from
csst_dfs_api.facility
import
Level0DataApi
,
CalMergeApi
from
csst_dfs_api.ifs
import
Level0DataApi
,
CalMergeApi
,
Level1DataApi
from
csst_dfs_api.ifs
import
Level1DataApi
setup_logging
()
setup_logging
()
log
=
logging
.
getLogger
(
'csst'
)
log
=
logging
.
getLogger
(
'csst'
)
...
...
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