Commit 082956f0 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

use local reference files as fallback

parent 6fb3c1db
Loading
Loading
Loading
Loading
Loading
+23 −20
Original line number Diff line number Diff line
@@ -529,13 +529,16 @@ class CsstMsDataManager:
             'shutter': '/crdsroot/references/msc/csst_msc_ms_shutter_11_000001.fits'}
        """
        if self.crds.is_available:
            try:
                print("CRDS available, use refs from CRDS ...")
                return self.crds.retry(
                    self.crds.get_refs, 3,
                    file_path=self.l0_detector(detector)
                )
        else:
            print("CRDS unavailable, use refs from local files ...")
            except BaseException as e:
                print("CRDS reference access failed! ", e)

        print("Use refs from local files ...")
        refs = dict()
        if self.datatype == "mbi":
            ref_types = ["bias", "dark", "ledflat", "shutter"]