Commit 5617dc34 authored by Fang Yuedong's avatar Fang Yuedong
Browse files

add run_csst_msc_instrument.py rearrange config into image module

parent ff118a41
......@@ -11,7 +11,7 @@ Modified-History:
from datetime import datetime
from typing import Optional
import csst_common
# import csst_common
import numpy as np
from itertools import product
from astropy.io import fits
......@@ -23,7 +23,7 @@ from astropy.stats import sigma_clipped_stats
# subtract_dark,
# FlagConfig,
# )
from csst_msc_instrument.image import (
from L1_pipeline.csst_msc_instrument.image import (
subtract_bias,
subtract_dark,
FlagConfig,
......@@ -46,7 +46,7 @@ def core_msc_l1_mbi_instrument(
config_ccd_info: Optional[str] = None,
config_bad_pixel: Optional[str] = None,
device: Optional[str] = "CPU",
) #-> CsstResult:
): #-> CsstResult:
"""
Make the instrument correction for one chip of CSST data.
......
......@@ -13,5 +13,8 @@ from .basic import subtract_bias, subtract_dark
from .crosstalk import remove_crosstalk
from .gain import apply_gain
from .overscan import correct_overscan
from .config import FlagConfig, CameraConfig, CCDArrayConfig, get_array_config
from .format import convert_format
__all__ = ['correct_overscan', 'apply_gain', 'subtract_bias', 'remove_crosstalk', 'subtract_dark', ]
\ No newline at end of file
__all__ = ['correct_overscan', 'apply_gain', 'subtract_bias', 'remove_crosstalk', 'subtract_dark',
'FlagConfig', 'CameraConfig', 'CCDArrayConfig', 'get_array_config','convert_format', ]
\ No newline at end of file
......@@ -11,7 +11,7 @@ Modified-History:
import numpy as np
from ..config import get_array_config
from .config import get_array_config
__all__ = ['apply_gain', 'make_gainmap_from_channel_value', ]
......
......@@ -18,7 +18,7 @@ from scipy.special import erf
from scipy.stats import trim_mean, t, sigmaclip
from astropy.stats import mad_std, sigma_clip
from ..config import get_array_config
from .config import get_array_config
__all__ = ["average_overscan", "smooth_overscan", "correct_overscan", ]
......
from L1_pipeline.csst_msc_instrument.csst_msc_mbi_instrument import core_msc_l1_mbi_instrument
# core_msc_l1_mbi_instrument(
# image_path=r"D:\Zhou\Desktop\data\data_09.fits",
# bias_path=r"D:\Zhou\Desktop\data\bias_09.fits",
# dark_path=r"D:\Zhou\Desktop\data\dark_09.fits",
# flat_path=r"D:\Zhou\Desktop\data\flat_09.fits",
# shutter_path=r"D:\Zhou\Desktop\data\csst_msc_ms_shutter_09_000001.fits",
# image_output_path=r"D:\Zhou\Desktop\data\result\image_test_output.fits",
# weight_output_path=r"D:\Zhou\Desktop\data\result\weight_test_output.fits",
# flag_output_path=r"D:\Zhou\Desktop\data\result\flag_test_output.fits",
# )
\ No newline at end of file
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