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
csst_dfs_api/cpic/__init__.py
View file @
1be038fd
from
.calmerge
import
CalMergeApi
from
.level0
import
Level0DataApi
from
.level0prc
import
Level0PrcApi
from
.level1
import
Level1DataApi
\ No newline at end of file
from
.level1
import
Level1DataApi
from
.level1prc
import
Level1PrcApi
\ No newline at end of file
csst_dfs_api/cpic/level0.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
Level0DataApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"cpic"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"Level0DataApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve level0 records from database
:param kwargs: Parameter dictionary, key items support:
obs_id: [str]
detector_no: [str]
obs_type: [str]
obs_time : (start, end),
qc0_status : [int],
prc_status : [int],
file_name: [str]
limit: limits returns the number of records,default 0:no-limit
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
update_qc0_status
(
self
,
**
kwargs
):
''' update the status of QC0
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_qc0_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a level0 data record into database
:param kwargs: Parameter dictionary, key items support:
obs_id = [str],
detector_no = [str],
obs_type = [str],
obs_time = [str],
exp_time = [int],
detector_status_id = [int],
filename = [str],
file_path = [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/cpic/level0prc.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
Level0PrcApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"cpic"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"Level0PrcApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve level0 procedure records from database
:param kwargs: Parameter dictionary, key items support:
level0_id: [str]
pipeline_id: [str]
prc_module: [str]
prc_status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a level0 procedure record into database
:param kwargs: Parameter dictionary, key items support:
level0_id : [str]
pipeline_id : [str]
prc_module : [str]
params_file_path : [str]
prc_status : [int]
prc_time : [str]
result_file_path : [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/facility/__init__.py
View file @
1be038fd
from
.detector
import
DetectorApi
from
.brick
import
BrickApi
from
.level2producer
import
Level2ProducerApi
from
.observation
import
ObservationApi
\ No newline at end of file
from
.observation
import
ObservationApi
from
.calmerge
import
CalMergeApi
from
.level0
import
Level0DataApi
from
.level0prc
import
Level0PrcApi
\ No newline at end of file
csst_dfs_api/
cpic
/calmerge.py
→
csst_dfs_api/
facility
/calmerge.py
View file @
1be038fd
...
...
@@ -6,7 +6,7 @@ class CalMergeApi(object):
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"
cpic
"
)
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"
facility
"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"CalMergeApi"
)()
def
find
(
self
,
**
kwargs
):
...
...
csst_dfs_api/
msc
/level0.py
→
csst_dfs_api/
facility
/level0.py
View file @
1be038fd
...
...
@@ -6,7 +6,7 @@ class Level0DataApi(object):
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"
msc
"
)
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"
facility
"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"Level0DataApi"
)()
def
find
(
self
,
**
kwargs
):
...
...
@@ -23,7 +23,8 @@ class Level0DataApi(object):
ra_obj: [float],
dec_obj: [float],
radius: [float],
object_name: [str],
version: [str],
limit: limits returns the number of records,default 0:no-limit
:returns: csst_dfs_common.models.Result
...
...
@@ -36,6 +37,7 @@ class Level0DataApi(object):
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str]
obs_type: [str]
:returns: csst_dfs_common.models.Result
'''
...
...
@@ -47,6 +49,7 @@ class Level0DataApi(object):
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
obs_type: [str],
status : [int]
:returns: csst_dfs_common.models.Result
...
...
@@ -59,6 +62,7 @@ class Level0DataApi(object):
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
obs_type: [str],
status : [int]
:returns: csst_dfs_common.models.Result
...
...
csst_dfs_api/
msc
/level0prc.py
→
csst_dfs_api/
facility
/level0prc.py
View file @
1be038fd
...
...
@@ -6,7 +6,7 @@ class Level0PrcApi(object):
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"
msc
"
)
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"
facility
"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"Level0PrcApi"
)()
def
find
(
self
,
**
kwargs
):
...
...
csst_dfs_api/ifs/__init__.py
View file @
1be038fd
from
.calmerge
import
CalMergeApi
from
.level0
import
Level0DataApi
from
.level0prc
import
Level0PrcApi
from
.level1
import
Level1DataApi
from
.level1prc
import
Level1PrcApi
\ No newline at end of file
csst_dfs_api/ifs/calmerge.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
CalMergeApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"ifs"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"CalMergeApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve calibration merge records from database
:param kwargs: Parameter dictionary, key items support:
detector_no: [str],
ref_type: [str],
obs_time: (start,end),
qc1_status : [int],
prc_status : [int],
file_name: [str],
limit: limits returns the number of records,default 0:no-limit
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
get_latest_by_l0
(
self
,
**
kwargs
):
''' retrieve calibration merge records from database by level0 data
:param kwargs: Parameter dictionary, key items support:
level0_id: [str],
ref_type: [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get_latest_by_l0
(
**
kwargs
)
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
update_qc1_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_qc1_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a calibration merge record into database
:param kwargs: Parameter dictionary, key items support:
cal_id : [str],
detector_no : [str],
ref_type : [str],
obs_time : [str],
exp_time : [float],
prc_status : [int],
prc_time : [str],
filename : [str],
file_path : [str],
level0_ids : [list],
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/ifs/level0.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
Level0DataApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"ifs"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"Level0DataApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve level0 records from database
:param kwargs: Parameter dictionary, key items support:
obs_id: [str],
detector_no: [str],
obs_type: [str],
object_name: [str],
obs_time : (start, end),
qc0_status : [int],
prc_status : [int],
file_name: [str],
version: [str],
ra_obj: [float],
dec_obj: [float],
radius: [float],
limit: limits returns the number of records,default 0:no-limit
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
update_qc0_status
(
self
,
**
kwargs
):
''' update the status of QC0
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_qc0_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a level0 data record into database
:param kwargs: Parameter dictionary, key items support:
file_path = [str],
copyfiles = [boolean]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/ifs/level0prc.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
Level0PrcApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"ifs"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"Level0PrcApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve level0 procedure records from database
:param kwargs: Parameter dictionary, key items support:
level0_id: [str]
pipeline_id: [str]
prc_module: [str]
prc_status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a level0 procedure record into database
:param kwargs: Parameter dictionary, key items support:
level0_id : [str]
pipeline_id : [str]
prc_module : [str]
params_file_path : [str]
prc_status : [int]
prc_time : [str]
result_file_path : [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/mci/__init__.py
View file @
1be038fd
from
.calmerge
import
CalMergeApi
from
.level0
import
Level0DataApi
from
.level0prc
import
Level0PrcApi
from
.level1
import
Level1DataApi
from
.level1prc
import
Level1PrcApi
\ No newline at end of file
csst_dfs_api/mci/calmerge.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
CalMergeApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"mci"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"CalMergeApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve calibration merge records from database
:param kwargs: Parameter dictionary, key items support:
detector_no: [str],
ref_type: [str],
obs_time: (start,end),
qc1_status : [int],
prc_status : [int],
file_name: [str],
limit: limits returns the number of records,default 0:no-limit
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
get_latest_by_l0
(
self
,
**
kwargs
):
''' retrieve calibration merge records from database by level0 data
:param kwargs: Parameter dictionary, key items support:
level0_id: [str],
ref_type: [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get_latest_by_l0
(
**
kwargs
)
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
update_qc1_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_qc1_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a calibration merge record into database
:param kwargs: Parameter dictionary, key items support:
cal_id : [str],
detector_no : [str],
ref_type : [str],
obs_time : [str],
exp_time : [float],
prc_status : [int],
prc_time : [str],
filename : [str],
file_path : [str],
level0_ids : [list],
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/mci/level0.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
Level0DataApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"mci"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"Level0DataApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve level0 records from database
:param kwargs: Parameter dictionary, key items support:
obs_id: [str],
detector_no: [str],
obs_type: [str],
object_name: [str],
obs_time : (start, end),
qc0_status : [int],
prc_status : [int],
file_name: [str],
version: [str],
ra_obj: [float],
dec_obj: [float],
radius: [float],
limit: limits returns the number of records,default 0:no-limit
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
update_qc0_status
(
self
,
**
kwargs
):
''' update the status of QC0
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_qc0_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a level0 data record into database
:param kwargs: Parameter dictionary, key items support:
file_path = [str],
copyfiles = [boolean]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/mci/level0prc.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
Level0PrcApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"mci"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"Level0PrcApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve level0 procedure records from database
:param kwargs: Parameter dictionary, key items support:
level0_id: [str]
pipeline_id: [str]
prc_module: [str]
prc_status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a level0 procedure record into database
:param kwargs: Parameter dictionary, key items support:
level0_id : [str]
pipeline_id : [str]
prc_module : [str]
params_file_path : [str]
prc_status : [int]
prc_time : [str]
result_file_path : [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/msc/__init__.py
View file @
1be038fd
from
.calmerge
import
CalMergeApi
from
.level0
import
Level0DataApi
from
.level0prc
import
Level0PrcApi
from
.level1
import
Level1DataApi
from
.level1prc
import
Level1PrcApi
from
.level2
import
Level2DataApi
\ No newline at end of file
csst_dfs_api/msc/calmerge.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
CalMergeApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"msc"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"CalMergeApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve calibration merge records from database
:param kwargs: Parameter dictionary, key items support:
detector_no: [str],
ref_type: [str],
obs_time: (start,end),
qc1_status : [int],
prc_status : [int],
file_name: [str],
limit: limits returns the number of records,default 0:no-limit
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
get_latest_by_l0
(
self
,
**
kwargs
):
''' retrieve calibration merge records from database by level0 data
:param kwargs: Parameter dictionary, key items support:
level0_id: [str],
ref_type: [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get_latest_by_l0
(
**
kwargs
)
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
update_qc1_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_qc1_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a calibration merge record into database
:param kwargs: Parameter dictionary, key items support:
cal_id : [str],
detector_no : [str],
ref_type : [str],
obs_time : [str],
exp_time : [float],
prc_status : [int],
prc_time : [str],
filename : [str],
file_path : [str],
level0_ids : [list],
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/sls/__init__.py
View file @
1be038fd
from
.calmerge
import
CalMergeApi
from
.level0
import
Level0DataApi
from
.level0prc
import
Level0PrcApi
from
.level1
import
Level1DataApi
from
.level1prc
import
Level1PrcApi
from
.level2spectra
import
Level2SpectraApi
\ No newline at end of file
csst_dfs_api/sls/calmerge.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
CalMergeApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"sls"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"CalMergeApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve calibration merge records from database
:param kwargs: Parameter dictionary, key items support:
detector_no: [str],
ref_type: [str],
obs_time: (start,end),
qc1_status : [int],
prc_status : [int],
file_name: [str],
limit: limits returns the number of records,default 0:no-limit
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
get_latest_by_l0
(
self
,
**
kwargs
):
''' retrieve calibration merge records from database by level0 data
:param kwargs: Parameter dictionary, key items support:
level0_id: [str],
ref_type: [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get_latest_by_l0
(
**
kwargs
)
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
update_qc1_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
cal_id : [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_qc1_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a calibration merge record into database
:param kwargs: Parameter dictionary, key items support:
cal_id : [str],
detector_no : [str],
ref_type : [str],
obs_time : [str],
exp_time : [float],
prc_status : [int],
prc_time : [str],
filename : [str],
file_path : [str],
level0_ids : [list],
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
csst_dfs_api/sls/level0.py
deleted
100644 → 0
View file @
3b1aed9a
from
..common.delegate
import
Delegate
class
Level0DataApi
(
object
):
"""
Level 0 Data Operation API
"""
def
__init__
(
self
):
self
.
pymodule
=
Delegate
().
load
(
sub_module
=
"sls"
)
self
.
stub
=
getattr
(
self
.
pymodule
,
"Level0DataApi"
)()
def
find
(
self
,
**
kwargs
):
''' retrieve level0 records from database
:param kwargs: Parameter dictionary, key items support:
obs_id: [str]
detector_no: [str]
obs_type: [str]
obs_time : (start, end),
qc0_status : [int],
prc_status : [int],
file_name: [str]
limit: limits returns the number of records,default 0:no-limit
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
find
(
**
kwargs
)
def
get
(
self
,
**
kwargs
):
''' fetch a record from database
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
get
(
**
kwargs
)
def
update_proc_status
(
self
,
**
kwargs
):
''' update the status of reduction
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_proc_status
(
**
kwargs
)
def
update_qc0_status
(
self
,
**
kwargs
):
''' update the status of QC0
:param kwargs: Parameter dictionary, key items support:
id : [int],
level0_id: [str],
status : [int]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
update_qc0_status
(
**
kwargs
)
def
write
(
self
,
**
kwargs
):
''' insert a level0 data record into database
:param kwargs: Parameter dictionary, key items support:
obs_id = [str],
detector_no = [str],
obs_type = [str],
obs_time = [str],
exp_time = [int],
detector_status_id = [int],
filename = [str],
file_path = [str]
:returns: csst_dfs_common.models.Result
'''
return
self
.
stub
.
write
(
**
kwargs
)
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