Commit 4af64a90 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

update sls 2

parent 4aee301e
......@@ -15,7 +15,7 @@ class Level2SpectraApi(object):
:param kwargs: Parameter dictionary, key items support:
level0_id: [str]
level1_id: [int]
spectra_id: [str]
file_type: [str]
create_time : (start, end),
qc2_status : [int],
prc_status : [int],
......@@ -65,8 +65,7 @@ class Level2SpectraApi(object):
:param kwargs: Parameter dictionary, key items support:
level0_id: [str]
level1_id: [int]
spectra_id : [str]
region : [str]
file_type : [str]
filename : [str]
file_path : [str]
prc_status : [int]
......
import os
import unittest
from astropy.io import fits
from csst_dfs_api.facility.level1 import Level1DataApi
class SLSLevel1DataTestCase(unittest.TestCase):
def setUp(self):
self.api = Level1DataApi()
def test_find_by_qc1_status(self):
recs = self.api.sls_find_by_qc1_status(qc1_status=-1)
print('find_by_qc1_status:', recs)
def test_find(self):
recs = self.api.find(
ra_cen = 1,
dec_cen =2,
radius_cen = 1
)
print('find:', recs)
......@@ -22,15 +22,14 @@ class SLSLevel2SpectraTestCase(unittest.TestCase):
rec = self.api.update_proc_status(id = 1, status = 4)
print('update_proc_status:', rec)
def test_update_qc1_status(self):
rec = self.api.update_qc1_status(id = 1, status = 7)
def test_update_qc2_status(self):
rec = self.api.update_qc2_status(id = 1, status = 7)
print('update_qc1_status:', rec)
def test_write(self):
rec = self.api.write(
level1_id=2,
spectra_id = "222",
region = "[12,13,24,24]",
file_type = "SPC",
prc_status = 3,
prc_time = '2021-10-22 11:12:13',
filename = "MSC_MS_210525120000_100000000_20_cat.fits",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment