Commit 4fb80b27 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

deleted CsstMbiDataManager

parent fba83d1e
Loading
Loading
Loading
Loading
+4 −48
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ Modified-History:
    2022-09-29, Bo Zhang, favor CsstMsDataManager instead of CsstMbiDataManager
    2022-10-26, Bo Zhang, reconstruct CsstMsDataManager, deprecate CsstMbiDataManager
    2022-10-28, Bo Zhang, added CsstMsDataManager.query_rc(), dm.dfs_mode, dm.node
    2022-11-06, Bo Zhang, deleted CsstMbiDataManager
"""
import glob
import os
@@ -278,7 +279,7 @@ class CsstMsDataManager:
                                 )

    @staticmethod
    def glob_image(dir_l0, ver_sim="C5"):
    def glob_image(dir_l0, ver_sim="C5.2"):
        """ glob files in L0 data directory """
        if ver_sim == "C3":
            pattern = os.path.join(dir_l0, "MSC_MS_*_raw.fits")
@@ -489,7 +490,8 @@ class CsstMsDataManager:
            print("Error occurred during the query!")
            return None

    def test_dfs(self):
    @property
    def dfs_available(self):
        """ Test if DFS works. """
        try:
            tbl = gaia_query_from_dfs(radius=0.001)
@@ -524,49 +526,3 @@ class CsstMsDataManager:
        l1api = get_l1api()
        l1api.write()
        return


class CsstMbiDataManager:

    def __init__(self, ver_sim="C5.2", dir_l0="", dir_l1="", dir_pcref="", path_aux="", force_all_detectors=False):
        """ initialize the multi-band imaging data manager

        Parameters
        ----------
        ver_sim: str
            version of simulation data, see csst_common.params.CP
        dir_l0: str
            L0 directory
        dir_l1: str
            L1 directory
        dir_pcref: str
            position calibration data directory
        path_aux: str
            aux data directory (bias, flat, dark)
        force_all_detectors: bool
            if True, assert data for all detectors are available

        Examples
        --------
        >>> dm_mbi = CsstMbiDataManager(...)
        >>> # access L0 directory
        >>> dm_mbi.dir_l0
        >>> # access L1 directory
        >>> dm_mbi.dir_l1
        >>> # access dir_pcref
        >>> dm_mbi.dir_pcref
        >>> # access path_aux
        >>> dm_mbi.path_aux
        >>> # access ver_sim
        >>> dm_mbi.ver_sim
        >>> # access target detectors
        >>> dm_mbi.target_detectors
        >>> # access available detectors
        >>> dm_mbi.available_detectors
        >>> # define an L1 file (detector-specified)
        >>> dm_mbi.l1_detector(detector=6)
        >>> # define an L1 file (non-detector-specified)
        >>> dm_mbi.l1_file("flipped_image.fits")
        """
        raise DeprecationWarning(
            "CsstMbiDataManager will no longer be available in some days, please use CsstMsDataManager instead.")