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
1be038fd
Commit
1be038fd
authored
Dec 03, 2022
by
Wei Shoulin
Browse files
un level0
parent
3b1aed9a
Changes
43
Hide whitespace changes
Inline
Side-by-side
tests/sls/test_sls_cal_merge.py
deleted
100644 → 0
View file @
3b1aed9a
import
os
import
unittest
from
astropy.io
import
fits
from
csst_dfs_api.sls.calmerge
import
CalMergeApi
class
SLSCalMergeApiTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
api
=
CalMergeApi
()
# def test_find(self):
# recs = self.api.find(detector_no='CCD01',
# ref_type = "bias",
# obs_time = ("2021-06-01 11:12:13","2021-06-08 11:12:13"))
# print('find:', recs)
# def test_get_latest_by_l0(self):
# rec = self.api.get_latest_by_l0(level0_id='000001102', ref_type = "bias")
# print('get_latest_by_l0:', rec)
def
test_get
(
self
):
rec
=
self
.
api
.
get
(
id
=
2
)
print
(
'get by id:'
,
rec
)
rec
=
self
.
api
.
get
(
cal_id
=
'2'
)
print
(
'get by cal_id:'
,
rec
)
# def test_update_proc_status(self):
# rec = self.api.update_proc_status(id = 3, status = 1)
# print('update_proc_status:', rec)
# def test_update_qc1_status(self):
# rec = self.api.update_qc1_status(id = 3, status = 2)
# print('update_qc1_status:', rec)
# def test_write(self):
# rec = self.api.write(
# cal_id = '00002',
# detector_no = '01',
# ref_type = "bias",
# obs_time = "2021-06-04 11:12:13",
# exp_time = 150,
# filename = "/opt/dddasd1.params",
# file_path = "/opt/dddasd1.fits",
# prc_status = 3,
# prc_time = '2021-06-04 11:12:13',
# level0_ids = ['1','2','3','4'])
# print('write:', rec)
\ No newline at end of file
tests/sls/test_sls_level0_prc.py
deleted
100644 → 0
View file @
3b1aed9a
import
os
import
unittest
from
astropy.io
import
fits
from
csst_dfs_api.sls.level0prc
import
Level0PrcApi
class
SLSLevel0PrcTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
api
=
Level0PrcApi
()
def
test_find
(
self
):
recs
=
self
.
api
.
find
(
level0_id
=
'134'
)
print
(
'find:'
,
recs
)
def
test_update_proc_status
(
self
):
rec
=
self
.
api
.
update_proc_status
(
id
=
8
,
status
=
4
)
print
(
'update_proc_status:'
,
rec
)
def
test_write
(
self
):
rec
=
self
.
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
tests/sls/test_sls_level1.py
View file @
1be038fd
...
@@ -14,6 +14,10 @@ class SLSResult1TestCase(unittest.TestCase):
...
@@ -14,6 +14,10 @@ class SLSResult1TestCase(unittest.TestCase):
)
)
print
(
'find:'
,
recs
)
print
(
'find:'
,
recs
)
def
test_find_by_prc_status
(
self
):
recs
=
self
.
api
.
find_by_prc_status
()
print
(
'test_find_by_prc_status:'
,
recs
)
def
test_get
(
self
):
def
test_get
(
self
):
rec
=
self
.
api
.
get
(
id
=
1
)
rec
=
self
.
api
.
get
(
id
=
1
)
print
(
'get:'
,
rec
)
print
(
'get:'
,
rec
)
...
...
Prev
1
2
3
Next
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