Loading csst_common/data_manager.py +34 −28 Original line number Diff line number Diff line Loading @@ -615,15 +615,15 @@ class CsstMsDataManager: return info @staticmethod def quickstart(ver_sim="C5.2", datatype="mbi", dir_l1=".", exposure_id=100, use_dfs=False, dfs_node="kmust", clear_l1=False, n_jobs=18, backend="multiprocessing"): def quickstart(ver_sim="C6.2", datatype="mbi", dir_l1=".", exposure_id=100, use_dfs=False, dfs_node="kmust", n_jobs=18, backend="multiprocessing"): """ Quick dataset generator for tests on dandelion or PML Parameters ---------- ver_sim : str {"C5.2"} "C6.2" datatype : str {"mbi", "sls"} dir_l1 : str Loading @@ -634,8 +634,6 @@ class CsstMsDataManager: If True, use DFS. dfs_node : str The DFS node. Defaults to "kmust", could be "pml". clear_l1 : bool If True, clear dir_l1. n_jobs : int The number of jobs. backend : str Loading @@ -646,32 +644,40 @@ class CsstMsDataManager: CsstMsDataManager The Main Survey Data Manager instance. """ try: assert ver_sim == "C6.2" and exposure_id == 100 except BaseException: raise ValueError("Please use ver_sim = 'C6.2'!") assert datatype in ["mbi", "sls"] # auto identify node name hostname = os.uname()[1] assert hostname in ["dandelion", "tulip", "ubuntu"] assert hostname in ["dandelion", "tulip", ] # dandelion if hostname in ["dandelion", "tulip"] and datatype == "mbi": dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/multipleBandsImaging/" \ "NGP_AstrometryON_shearOFF/MSC_{:07d}/".format(exposure_id) path_aux = "/nfsdata/users/csstpipeline/L1Pipeline/aux" elif hostname in ["dandelion", "tulip"] and datatype == "sls": dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/slitlessSpectroscopy/" \ "NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id) dir_l0 = "/nfsdata/share/csst_unittest/C6.2/MSC_0000100" path_aux = "/nfsdata/users/csstpipeline/L1Pipeline/aux" # PMO elif hostname == "ubuntu" and datatype == "mbi": dir_l0 = "/share/simudata/CSSOSDataProductsSims/data/CSSTSimImage_C5/" \ "NGP_AstrometryON_shearOFF/MSC_{:07d}/".format(exposure_id) path_aux = "/L1Pipeline/aux" elif hostname == "ubuntu" and datatype == "sls": dir_l0 = "/share/simudata/CSSOSDataProductsSims/data/CSSTSimImage_C5/" \ "NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id) path_aux = "/L1Pipeline/aux" else: raise ValueError("@DM: invalid hostname {} or datatype {}!".format(hostname, datatype)) # # dandelion # if hostname in ["dandelion", "tulip"] and datatype == "mbi": # # dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/multipleBandsImaging/" \ # # "NGP_AstrometryON_shearOFF/MSC_{:07d}/".format(exposure_id) # path_aux = "/nfsdata/users/csstpipeline/L1Pipeline/aux" # elif hostname in ["dandelion", "tulip"] and datatype == "sls": # dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/slitlessSpectroscopy/" \ # "NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id) # path_aux = "/nfsdata/users/csstpipeline/L1Pipeline/aux" # # # PMO # elif hostname == "ubuntu" and datatype == "mbi": # dir_l0 = "/share/simudata/CSSOSDataProductsSims/data/CSSTSimImage_C5/" \ # "NGP_AstrometryON_shearOFF/MSC_{:07d}/".format(exposure_id) # path_aux = "/L1Pipeline/aux" # elif hostname == "ubuntu" and datatype == "sls": # dir_l0 = "/share/simudata/CSSOSDataProductsSims/data/CSSTSimImage_C5/" \ # "NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id) # path_aux = "/L1Pipeline/aux" # else: # raise ValueError("@DM: invalid hostname {} or datatype {}!".format(hostname, datatype)) return CsstMsDataManager.from_dir( ver_sim=ver_sim, datatype=datatype, dir_l0=dir_l0, dir_l1=dir_l1, path_aux=path_aux, Loading Loading
csst_common/data_manager.py +34 −28 Original line number Diff line number Diff line Loading @@ -615,15 +615,15 @@ class CsstMsDataManager: return info @staticmethod def quickstart(ver_sim="C5.2", datatype="mbi", dir_l1=".", exposure_id=100, use_dfs=False, dfs_node="kmust", clear_l1=False, n_jobs=18, backend="multiprocessing"): def quickstart(ver_sim="C6.2", datatype="mbi", dir_l1=".", exposure_id=100, use_dfs=False, dfs_node="kmust", n_jobs=18, backend="multiprocessing"): """ Quick dataset generator for tests on dandelion or PML Parameters ---------- ver_sim : str {"C5.2"} "C6.2" datatype : str {"mbi", "sls"} dir_l1 : str Loading @@ -634,8 +634,6 @@ class CsstMsDataManager: If True, use DFS. dfs_node : str The DFS node. Defaults to "kmust", could be "pml". clear_l1 : bool If True, clear dir_l1. n_jobs : int The number of jobs. backend : str Loading @@ -646,32 +644,40 @@ class CsstMsDataManager: CsstMsDataManager The Main Survey Data Manager instance. """ try: assert ver_sim == "C6.2" and exposure_id == 100 except BaseException: raise ValueError("Please use ver_sim = 'C6.2'!") assert datatype in ["mbi", "sls"] # auto identify node name hostname = os.uname()[1] assert hostname in ["dandelion", "tulip", "ubuntu"] assert hostname in ["dandelion", "tulip", ] # dandelion if hostname in ["dandelion", "tulip"] and datatype == "mbi": dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/multipleBandsImaging/" \ "NGP_AstrometryON_shearOFF/MSC_{:07d}/".format(exposure_id) path_aux = "/nfsdata/users/csstpipeline/L1Pipeline/aux" elif hostname in ["dandelion", "tulip"] and datatype == "sls": dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/slitlessSpectroscopy/" \ "NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id) dir_l0 = "/nfsdata/share/csst_unittest/C6.2/MSC_0000100" path_aux = "/nfsdata/users/csstpipeline/L1Pipeline/aux" # PMO elif hostname == "ubuntu" and datatype == "mbi": dir_l0 = "/share/simudata/CSSOSDataProductsSims/data/CSSTSimImage_C5/" \ "NGP_AstrometryON_shearOFF/MSC_{:07d}/".format(exposure_id) path_aux = "/L1Pipeline/aux" elif hostname == "ubuntu" and datatype == "sls": dir_l0 = "/share/simudata/CSSOSDataProductsSims/data/CSSTSimImage_C5/" \ "NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id) path_aux = "/L1Pipeline/aux" else: raise ValueError("@DM: invalid hostname {} or datatype {}!".format(hostname, datatype)) # # dandelion # if hostname in ["dandelion", "tulip"] and datatype == "mbi": # # dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/multipleBandsImaging/" \ # # "NGP_AstrometryON_shearOFF/MSC_{:07d}/".format(exposure_id) # path_aux = "/nfsdata/users/csstpipeline/L1Pipeline/aux" # elif hostname in ["dandelion", "tulip"] and datatype == "sls": # dir_l0 = "/nfsdata/share/csst_simulation_data/Cycle-5-SimuData/slitlessSpectroscopy/" \ # "NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id) # path_aux = "/nfsdata/users/csstpipeline/L1Pipeline/aux" # # # PMO # elif hostname == "ubuntu" and datatype == "mbi": # dir_l0 = "/share/simudata/CSSOSDataProductsSims/data/CSSTSimImage_C5/" \ # "NGP_AstrometryON_shearOFF/MSC_{:07d}/".format(exposure_id) # path_aux = "/L1Pipeline/aux" # elif hostname == "ubuntu" and datatype == "sls": # dir_l0 = "/share/simudata/CSSOSDataProductsSims/data/CSSTSimImage_C5/" \ # "NGP_AstrometryON_shearOFF_Spec/MSC_{:07d}/".format(exposure_id) # path_aux = "/L1Pipeline/aux" # else: # raise ValueError("@DM: invalid hostname {} or datatype {}!".format(hostname, datatype)) return CsstMsDataManager.from_dir( ver_sim=ver_sim, datatype=datatype, dir_l0=dir_l0, dir_l1=dir_l1, path_aux=path_aux, Loading