Commit 7041526a authored by chenwei@shao.ac.cn's avatar chenwei@shao.ac.cn
Browse files

first update

parent 5ece85b1
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/csst_shao_interface_templet.iml" filepath="$PROJECT_DIR$/.idea/csst_shao_interface_templet.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
"""
Identifier: KSC-SJ6-csst_ifs_common/common.py
Name: Common.py
Description: CSST IFS COMMON
Author: Wei Chen
"""
from .ifs_status import CsstIFSStatus
from .exit_code_list import IFSExitCode
from .logger import get_logger
# from .ifs_status import IFSError
from .config import IFSConfig
import os
class CsstIFSInit:
def __init__(self):
self.exit_code = "100"
self.status = CsstIFSStatus
self.fun_exit_code = IFSExitCode()
self._env_init()
self._dm_init()
self.config_ifs_rss_env()
self.config_ifs_cube_env()
self.logger = get_logger()
def _env_init(self):
# code 100: "l1 normal exit"
exit_code = "100"
# self.logger.info("IFS Env Setting...")
try:
self.config = IFSConfig()
self.config.set_ifs_config("dir_log", self.config.get_ifs_config("dir_local"))
path_log = os.path.join(self.config.get_ifs_config("dir_log"), "./log.txt")
self.config.set_ifs_config("path_log", path_log)
self.logger = get_logger("CSST IFS log", self.config.get_ifs_config("path_log"))
# self.logger.info("IFS Env Set Finish!")
except Exception as e:
# code 101: "l1 Env Set Error",
exit_code = "101"
print("{}".format(e))
self.logger.error(self.fun_exit_code.get_ifs_exit_code('101'))
self.logger.error(e)
status = 2
assert status in [CsstIFSStatus.PERFECT, CsstIFSStatus.WARNING]
finally:
return exit_code
def _dm_init(self):
# code 100: "l1 normal exit"
exit_code = "100"
try:
from .data_manager import CsstIFSDataManager
self.dm = CsstIFSDataManager()
except Exception as e:
# code 102: "Not found DFS system",
# exit_code = "102"
exit_code = "103"
print(self.fun_exit_code.get_ifs_exit_code('103'))
# print("{}".format(e))
# self.logger.error(self.fun_exit_code.get_ifs_exit_code('102'))
# self.logger.error(e)
# status = 2
# assert status in [CsstIFSStatus.PERFECT, CsstIFSStatus.WARNING]
finally:
return exit_code
def config_ifs_rss_env(self):
# /L1Pipeline/test_shao/test_data/ this dir is cdrs dir
# self.config.set_ifs_config("path_RSSlog",
# "/L1Pipeline/integration/ifs/csst_ifs_rss/proc_data/path_RSSlog.txt")
# self.config.set_ifs_config("dir_rss_proc", "/L1Pipeline/integration/ifs/csst_ifs_rss/proc_data/")
# self.config.set_ifs_config("dir_aux", "/L1Pipeline/integration/ifs/csst_ifs_rss/cal_data/")
# self._config_ifs_rss_env_crds()
# # self.config.set_ifs_config("path_l0_rss", self.dm.get_data_path_l0_sci(self.config.get_ifs_config("obsid")))
# path_list = self.get_all_file_path("/L1Pipeline/integration/ifs/csst_ifs_rss/raw_data/")
# self.config.set_ifs_config("path_l0_rss", path_list)
#
# self.config.set_ifs_config("path_l1_wcs_output",
# "/L1Pipeline/test_shao/test_data/ifs/csst_ifs_wcs/temp_for_cube")
self.config.set_ifs_config(
"path_RSSlog",
"/CSST_test/l1_all/workspace/test_data/ifs/sim/L0/IFS_simData_2023-06-26/proc_data/path_RSSlog.txt")
# self.config.set_ifs_config(
# "dir_rss_proc", "/CSST_test/l1_all/workspace/test_data/ifs/sim/L0/IFS_simData_2023-06-26/proc_data/")
self.config.set_ifs_config(
"dir_rss_proc", "/datapool/CSST_PIPELINE/workspace/temp_data/ifs/sim/L1/sim_ver230725/proc_l1_rss/")
self.config.set_ifs_config(
"dir_aux",
"/CSST_test/l1_all/workspace/test_data/ifs/sim/L0/IFS_CRDS_20230725/")
self._config_ifs_rss_env_crds()
# self.config.set_ifs_config("path_l0_rss", self.dm.get_data_path_l0_sci(self.config.get_ifs_config("obsid")))
path_list = self.get_all_file_path(
"/CSST_test/l1_all/workspace/test_data/ifs/sim/L0/IFS_simData_2023-07-25/sky_Data_temp/")
self.config.set_ifs_config("path_l0_rss", path_list)
self.config.set_ifs_config(
"path_l1_wcs_output",
"/CSST_test/l1_all/workspace/test_data/ifs/sim/L0/IFS_simData_2023-07-25/temp_for_cube")
return
@staticmethod
def get_all_file_path(dir_temp):
path_list = list()
for root, dirs, names in os.walk(dir_temp):
for filename in names:
path_list.append(os.path.join(root, filename))
return path_list
@staticmethod
def get_file_path_include_keywords(dir_temp, keywords):
path_list = list()
for root, dirs, names in os.walk(dir_temp):
for filename in names:
if keywords in filename:
path_list.append(os.path.join(root, filename))
return path_list
def _config_ifs_rss_env_crds(self):
path = os.path.join(self.config.get_ifs_config("dir_aux"), self.dm.get_data_name_rss_bias_b())
self.config.set_ifs_config("path_rss_biasm_b", path)
path = os.path.join(self.config.get_ifs_config("dir_aux"), self.dm.get_data_name_rss_bias_r())
self.config.set_ifs_config("path_rss_biasm_r", path)
path = os.path.join(self.config.get_ifs_config("dir_aux"), self.dm.get_data_name_rss_flat_b())
self.config.set_ifs_config("path_rss_flatm_b", path)
path = os.path.join(self.config.get_ifs_config("dir_aux"), self.dm.get_data_name_rss_flat_r())
self.config.set_ifs_config("path_rss_flatm_r", path)
self.config.set_ifs_config("path_rss_dark_b", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_dark_b())
self.config.set_ifs_config("path_rss_dark_r", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_dark_r())
self.config.set_ifs_config("path_rss_flatnorm_b", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_flatnorm_b())
self.config.set_ifs_config("path_rss_flatnorm_r", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_flatnorm_r())
self.config.set_ifs_config("path_rss_trace_b", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_trace_b())
self.config.set_ifs_config("path_rss_trace_r", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_trace_r())
self.config.set_ifs_config("path_rss_ptow_b", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_ptow_b())
self.config.set_ifs_config("path_rss_ptow_r", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_ptow_r())
self.config.set_ifs_config("path_rss_starfile_b", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_starfile_b())
self.config.set_ifs_config("path_rss_starfile_r", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_starfile_r())
self.config.set_ifs_config("path_rss_arclab_b", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_arclab_b())
self.config.set_ifs_config("path_rss_arclab_r", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_arclab_r())
self.config.set_ifs_config("path_rss_starlab", self.config.get_ifs_config(
"dir_aux") + self.dm.get_data_name_rss_starlab())
return
def config_ifs_cube_env(self):
# self.config.set_ifs_config("dir_tmp",
# "/nfsdata/users/csstpipeline/L1Pipeline/integration/ifs/csst_ifs_cube/aimdir")
self.config.set_ifs_config("objid", "NGC6397")
# self.config.set_ifs_config("path_l0_cube", self.dm.get_data_path_l1_sci(self.config.get_ifs_config("obsid")))
# hdir = '/nfsdata/users/csstpipeline/L1Pipeline/integration/ifs/csst_ifs_cube/test_file/'
# aimdir = '/nfsdata/users/csstpipeline/L1Pipeline/integration/ifs/csst_ifs_cube/aimdir/'
target = 'NGC6397'
hdir = '/nfsdata/users/csstpipeline/L1Pipeline/integration/ifs/csst_ifs_cube/test_file/'
aimdir = '/nfsdata/users/csstpipeline/L1Pipeline/integration/ifs/csst_ifs_cube/aimdir/'
softver = 'R7201'
ver = 1
lamr = hdir + "CSST_IFS_LAMP_MASTER_20220610_R_L1_R7201_bew_____.fits"
lamb = hdir + "CSST_IFS_LAMP_MASTER_20220610_B_L1_R7201_bew_____.fits"
self.config.set_ifs_config('objid', target)
self.config.set_ifs_config('hdir', hdir)
self.config.set_ifs_config('aimdir', aimdir)
self.config.set_ifs_config('softver', softver)
self.config.set_ifs_config('ver', ver)
self.config.set_ifs_config('lamr', lamr)
self.config.set_ifs_config('lamb', lamb)
return
"""
Identifier: KSC-SJ6-csst_ifs_common/config.py
Name: config.py
Description: CSST IFS CONFIG
Author: Wei Chen
"""
import os
import threading
from .ifs_status import CsstIFSStatus
class IFSConfig(object):
"""
IFS Config as public parameters.
"""
_instance_lock = threading.Lock()
def __init__(self):
self._set_ifs_config_init()
def __new__(cls, *args, **kwargs):
if not hasattr(IFSConfig, "_instance"):
with IFSConfig._instance_lock:
if not hasattr(IFSConfig, "_instance"):
IFSConfig._instance = object.__new__(cls)
cls.config_dict = dict()
cls.public_variable_dict = dict()
return IFSConfig._instance
def _set_ifs_config_init(self):
local_path = os.getcwd()
config_dict = {
"dir_l0": ".",
"dir_l1": ".",
"dir_log": ".",
"dir_rss": ".",
"dir_cube": ".",
"dir_local": local_path,
"dir_rss_proc": "/L1Pipeline/integration/ifs/csst_ifs_rss/proc_data/"
}
if self.config_dict == {}:
self.config_dict = config_dict
def get_ifs_config(self, ifs_config_key):
"""
get ifs config.
Parameters
----------
ifs_config_key : str
The string of dict key
Returns
-------
dict_value : string
The string of dict_value.
"""
if ifs_config_key in self.config_dict:
ifs_config_value = self.config_dict[ifs_config_key]
return ifs_config_value
else:
print("Error: key "+ifs_config_key+" not exist")
status = 2
assert status in [CsstIFSStatus.PERFECT, CsstIFSStatus.WARNING]
def set_ifs_config(self, ifs_config_key, ifs_config_value):
"""
get ifs config.
Parameters
----------
ifs_config_key : str
The string of dict key
ifs_config_value : anytype
The string of dict value
Returns
-------
None
"""
# if ifs_config_key in self.config_dict:
# print("Warning: key "+ifs_config_key+" has exist, overwrite!")
# status = 1
# assert status in [CsstIFSStatus.PERFECT, CsstIFSStatus.WARNING]
self.config_dict[ifs_config_key] = ifs_config_value
"""
Identifier: KSC-SJ6-csst_ifs_common/exit_code_list.py
Name: exit_code_list.py
Description: CSST IFS Exit Code List
Author: Wei Chen
"""
import threading
class IFSExitCode(object):
"""
IFS Exit Code as public.
"""
_instance_lock = threading.Lock()
def __init__(self):
self.config_dict = {}
self._set_ifs_exit_code_init()
def __new__(cls, *args, **kwargs):
if not hasattr(IFSExitCode, "_instance"):
with IFSExitCode._instance_lock:
if not hasattr(IFSExitCode, "_instance"):
IFSExitCode._instance = object.__new__(cls)
return IFSExitCode._instance
# modify exit code here!
def _set_ifs_exit_code_init(self):
config_dict = {
"100": "l1 normal exit",
"101": "l1 Env Set Error",
"102": "Not found DFS system",
"103": "CSST Dummy DFS system Initialize",
"199": "l1 error exit",
"200": "rss normal exit",
"201": "rss error exit",
"300": "cube normal exit",
"301": "cube error exit",
"400": "qc normal exit",
"401": "qc error exit",
}
self.config_dict = config_dict
def get_ifs_exit_code(self, ifs_exit_code_key):
"""
get ifs config.
Parameters
----------
ifs_exit_code_key : str
The string of dict key
Returns
-------
dict_value : string
The exit_code of program status.
"""
if ifs_exit_code_key in self.config_dict:
ifs_exit_code_value = self.config_dict[ifs_exit_code_key]
return ifs_exit_code_value
else:
print("Error: key "+ifs_exit_code_key+" not exist")
def set_ifs_exit_code(self, ifs_exit_code_key, ifs_exit_code_value):
"""
get ifs config.
Parameters
----------
ifs_exit_code_key : str
The string of dict key
ifs_exit_code_value : str
The string of dict value
Returns
-------
None
"""
if ifs_exit_code_key in self.config_dict:
print("Warning: key "+ifs_exit_code_key+" has existed, overwrite!")
self.config_dict[ifs_exit_code_key] = ifs_exit_code_value
"""
Identifier: KSC-SJ6-csst_ifs_common/ifs_status.py
Name: ifs_status.py
Description: CSST IFS Status
Author: Wei Chen
"""
from enum import IntEnum
class CsstIFSStatus(IntEnum):
"""
The CSST IFS Status class.
This class provides a set of status which should be returned
from each CSST L1 IFS functional module.
Examples
--------
>>> def f(num):
>>> if num > 0:
>>> return CsstIFSStatus.PERFECT
>>> return CsstIFSStatus.ERROR
"""
PERFECT = 0
WARNING = 1
ERROR = 2
# status list to be completed
#
# class IFSError(Exception):
# def __init__(self, msg):
# self.msg = msg
#
# def __str__(self):
# return self.msg
# -*- coding: utf-8 -*-
from abc import abstractmethod, ABCMeta
from csst_ifs_common.common import CsstIFSInit
from csst_ifs_common.ifs_status import CsstIFSStatus
from csst_ifs_common.ifs_result import CsstIFSResult
csst_ifs = CsstIFSInit()
class BasePipelineInterface(metaclass=ABCMeta):
@abstractmethod
def run(self):
"""run the pipeline"""
pass
@abstractmethod
def para_set(self, *args):
pass
@abstractmethod
def result_check(self):
pass
# 数据处理软件编写主调用类范例
class L1Example(BasePipelineInterface):
def __init__(self):
self.result = CsstIFSStatus
self.logger = csst_ifs.logger
self.status = CsstIFSResult
# 在此处编写代码,使得用户通过执行此方法运行程序
def run(self):
pass
# 在此处编写代码,使得用户通过执行此方法配置参数,所有参数应当含有默认值,输入参数非必须。此处可以通过指定参数,给与不同情况的初始化参数配置
def para_set(self, list_para):
pass
# 在此处编写代码,使得用户通过执行此方法进行结果检查
def result_check(self):
pass
"""
Identifier: KSC-SJ6-csst_ifs_common/logger.py
Name: logger.py
Description: CSST IFS Logger
Author: Wei Chen
"""
import logging
def get_logger(name="CSST L1 IFS Pipeline", filename=""):
"""
Get a logger for CSST L1 Pipeline.
Just copy form bo zhang.
need mod for ifs
"""
# initialize logger
logger = logging.getLogger(name=name)
logger.handlers.clear()
logger.setLevel(logging.DEBUG)
# logging formatter
formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(module)s.py:%(lineno)d - %(message)s")
# stream handler
stream_handler = logging.StreamHandler()
stream_handler.setFormatter(formatter)
stream_handler.setLevel(logging.DEBUG)
logger.addHandler(stream_handler)
# file handler
if filename != "":
file_handler = logging.FileHandler(filename=filename, encoding="utf-8")
file_handler.setFormatter(formatter)
file_handler.setLevel(logging.INFO)
logger.addHandler(file_handler)
return logger
#
# def upload_logger(path_file=""):
# # logger upload code here
# print(path_file)
# return
#
#
# def check_logger(path_file=""):
# # check upload code here
# print(path_file)
# return
#
#
# if __name__ == "__main__":
# import os
# print(os.getcwd())
# logger = get_logger(filename="test_logger.log")
# print(type(logger), logger.name)
# logger.debug("Well ..")
# logger.info("Hello ...")
# logger.warning("There ...")
# logger.error("Good morning ...")
from .logger import get_logger
from .ifs_status import CsstIFSStatus
from .exit_code_list import IFSExitCode
from .data_manager import CsstIFSDataManager
from .config import IFSConfig
from .common import CsstIFSInit
__all__ = ["get_logger", "CsstIFSStatus", "IFSExitCode", "CsstIFSDataManager", "IFSConfig", "CsstIFSInit"]
# -*- coding: utf-8 -*-
from abc import abstractmethod, ABCMeta
from csst_ifs_common.common import CsstIFSInit
from csst_ifs_common.ifs_status import CsstIFSStatus
from csst_ifs_common.ifs_result import CsstIFSResult
csst_ifs = CsstIFSInit()
# 数据处理软件编写主调用类范例
class L1Example(BasePipelineInterface):
def __init__(self):
self.result = CsstIFSStatus
self.logger = csst_ifs.logger
self.status = CsstIFSResult
# 在此处编写代码,使得用户通过执行此方法运行程序
def run(self):
pass
# 在此处编写代码,使得用户通过执行此方法配置参数,所有参数应当含有默认值,输入参数非必须。此处可以通过指定参数,给与不同情况的初始化参数配置
def para_set(self, list_para):
pass
# 在此处编写代码,使得用户通过执行此方法进行结果检查
def result_check(self):
pass
# -*- coding: utf-8 -*-
from abc import abstractmethod, ABCMeta
from csst_ifs_common.common import CsstIFSInit
from csst_ifs_common.ifs_status import CsstIFSStatus
from csst_ifs_common.ifs_result import CsstIFSResult
from csst_ifs_common.interface import BasePipelineInterface
csst_ifs = CsstIFSInit()
class PipIFSL1RSS(BasePipelineInterface):
def __init__(self):
self.result = CsstIFSStatus
self.logger = csst_ifs.logger
self.status = CsstIFSResult
def run(self):
"""API, ...
Parameters
----------
Returns
-------
"""
from csst_ifs_rss.rss import run_all
self.exit_code = "200"
self.additionally_algorithm_01()
sci_fits_list = list()
sci_list = csst_ifs.config.get_ifs_config("path_l0_rss")
for path_sci in sci_list:
print(path_sci)
fits_output = run_all(path_sci)
for i in [2, 6, 7]:
sci_fits_list.append(fits_output[i])
csst_ifs.config.set_ifs_config("path_l1_rss", sci_fits_list)
def para_set(self):
"""API, ...
Parameters
----------
Returns
-------
"""
csst_ifs.config_ifs_rss_env()
csst_ifs.config.set_ifs_config(
"path_RSSlog",
"/nfsdata/share/pipeline-unittest/csst_ifs/data/dfs_dummy/L1/IFS_simData_2023-07-25/rss/path_RSSlog.txt")
csst_ifs.config.set_ifs_config(
"dir_rss_proc", "/nfsdata/share/pipeline-unittest/csst_ifs/data/dfs_dummy/L1/IFS_simData_2023-07-25/rss/")
path_list = csst_ifs.get_all_file_path(
"/nfsdata/share/pipeline-unittest/csst_ifs/data/dfs_dummy/L0/IFS_simData_2023-07-25/sky_data_case_1")
csst_ifs.config.set_ifs_config("path_l0_rss", path_list)
def result_check(self):
"""API, ...
Parameters
----------
Returns
-------
"""
something_wrong = True
if something_wrong:
status = 2
assert status in [CsstIFSStatus.PERFECT, CsstIFSStatus.WARNING]
# 可以或计划被外部调用的方法
def additionally_algorithm_01(self):
pass
# 内部方法,"_"前缀用于添加隐藏属性
def _additionally_algorithm_02(self):
pass
# -*- coding: utf-8 -*-
from abc import abstractmethod, ABCMeta
from csst_mci_common.common import CsstMCIInit
from csst_mci_common.mci_status import CsstMCIStatus
from csst_mci_common.mci_result import CsstMCIResult
from csst_mci_common.interface import BasePipelineInterface
csst_mci = CsstMCIInit()
class PipMCIL1RSS(BasePipelineInterface):
def __init__(self):
self.result = CsstMCIStatus
self.logger = csst_mci.logger
self.status = CsstMCIResult
def run(self):
"""API, ...
Parameters
----------
Returns
-------
"""
from csst_mci_rss.rss import run_all
self.exit_code = "200"
self.additionally_algorithm_01()
sci_fits_list = list()
sci_list = csst_mci.config.get_mci_config("path_l0_rss")
for path_sci in sci_list:
print(path_sci)
fits_output = run_all(path_sci)
for i in [2, 6, 7]:
sci_fits_list.append(fits_output[i])
csst_mci.config.set_mci_config("path_l1_rss", sci_fits_list)
def para_set(self):
"""API, ...
Parameters
----------
Returns
-------
"""
csst_mci.config_mci_rss_env()
csst_mci.config.set_mci_config(
"path_RSSlog",
"/nfsdata/share/pipeline-unittest/csst_mci/data/dfs_dummy/L1/MCI_simData_2023-07-25/rss/path_RSSlog.txt")
csst_mci.config.set_mci_config(
"dir_rss_proc", "/nfsdata/share/pipeline-unittest/csst_mci/data/dfs_dummy/L1/MCI_simData_2023-07-25/rss/")
path_list = csst_mci.get_all_file_path(
"/nfsdata/share/pipeline-unittest/csst_mci/data/dfs_dummy/L0/MCI_simData_2023-07-25/sky_data_case_1")
csst_mci.config.set_mci_config("path_l0_rss", path_list)
def result_check(self):
"""API, ...
Parameters
----------
Returns
-------
"""
something_wrong = True
if something_wrong:
status = 2
assert status in [CsstMCIStatus.PERFECT, CsstMCIStatus.WARNING]
# 可以或计划被外部调用的方法
def additionally_algorithm_01(self):
pass
# 内部方法,"_"前缀用于添加隐藏属性
def _additionally_algorithm_02(self):
pass
class L1Instrument(BasePipelineInterface):
def __init__(self):
self.result = CsstMCIStatus
self.logger = csst_mci.logger
self.status = CsstMCIResult
def run(self):
self.logger.info("instrument running...")
try:
fits_output, self.status = self.run_all()
except Exception as e:
self.logger.error(e)
self.logger.info("instrument pipeline finish!")
print(self.result)
return self.status
def para_set(self, list_para):
env_crds_set_ins_csst1()
env_dfs_set_l0_csst1(obsid=self.obsid)
target_detector = csst_mci.config.get_mci_config("target_detector")
env_dfs_set_ins_csst1(target_detector)
def result_check(self):
print(self.result)
def run_all(self):
bias_ref = csst_mci.config.get_mci_config("bias_ref")
dark_ref = csst_mci.config.get_mci_config("dark_ref")
flat_ref = csst_mci.config.get_mci_config("flat_ref")
shutter_ref = csst_mci.config.get_mci_config("shutter_ref")
sci_path = csst_mci.config.get_mci_config("sci_path")
output_dir = csst_mci.config.get_mci_config("ins_output")
self.status = inst_corr(
sci_path, bias_ref, dark_ref, flat_ref, shutter_ref, output_dir, logger=None, os_bias=False, cr_flag=False)
return self.status
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