Commit f9e25589 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

compact examples

parent 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)
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
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
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
import os
import numpy as np
import pandas as pd
import logging
from astropy.io import fits
from csst_dfs_commons.logging import setup_logging
from csst_dfs_api.facility import Level0DataApi, CalMergeApi
from csst_dfs_api.ifs import Level1DataApi
from csst_dfs_api.ifs import Level0DataApi, CalMergeApi, Level1DataApi
setup_logging()
log = logging.getLogger('csst')
......
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