Loading csst_common/data_manager.py +18 −5 Original line number Original line Diff line number Diff line Loading @@ -81,6 +81,8 @@ class CsstMsDataManager: dfs_node : str dfs_node : str The environment in which the pipeline will run. The environment in which the pipeline will run. Use "pml" for Purple Mountain Lab cluster and "local" for others. Use "pml" for Purple Mountain Lab cluster and "local" for others. dfs_root : str The DFS root path. obs_id : int obs_id : int The exposure ID. The exposure ID. exp_start : int exp_start : int Loading Loading @@ -137,6 +139,7 @@ class CsstMsDataManager: path_aux: str = "", # bias dark flat path_aux: str = "", # bias dark flat use_dfs: bool = False, use_dfs: bool = False, dfs_node: str = "kmust", dfs_node: str = "kmust", dfs_root: str = "/share/dfs", obs_id: str = "100000100", obs_id: str = "100000100", exp_start: int = "20270810081950", exp_start: int = "20270810081950", exp_stop: int = "20270810082220", exp_stop: int = "20270810082220", Loading Loading @@ -198,6 +201,7 @@ class CsstMsDataManager: # DFS configuration # DFS configuration self.use_dfs = use_dfs self.use_dfs = use_dfs self.dfs_node = dfs_node self.dfs_node = dfs_node self.dfs_root = dfs_root # data directory # data directory self.dir_l0 = dir_l0 self.dir_l0 = dir_l0 Loading Loading @@ -615,6 +619,19 @@ class CsstMsDataManager: """ Push SLS spectra to DFS. """ """ Push SLS spectra to DFS. """ pass pass @staticmethod def from_l1id( l1_id="1000000001", datatype="sls", dir_l0="/L1Pipeline/L0", dir_l1="/L1Pipeline/L1", use_dfs=True, dfs_node="pml", clear_l1=False, dfs_root="/share/dfs" ): pass @staticmethod @staticmethod def from_dfs( def from_dfs( obs_id="100000100", obs_id="100000100", Loading @@ -624,6 +641,7 @@ class CsstMsDataManager: use_dfs=True, use_dfs=True, dfs_node="pml", dfs_node="pml", clear_l1=False, clear_l1=False, dfs_root="/share/dfs" ): ): """ Initialize CsstMsDataManager from DFS. """ """ Initialize CsstMsDataManager from DFS. """ # (clear and) make directories # (clear and) make directories Loading @@ -648,11 +666,6 @@ class CsstMsDataManager: tbl = Table([_.__dict__ for _ in records["data"]]) tbl = Table([_.__dict__ for _ in records["data"]]) tbl.sort(["detector_no", "obs_type"]) tbl.sort(["detector_no", "obs_type"]) if os.uname()[1] == "ubuntu": # use pml test node dfs_root = "/share/dfs" else: # in docker dfs_root = "/dfsroot" print("Making symbolic links ...") print("Making symbolic links ...") for i_rec in range(len(tbl)): for i_rec in range(len(tbl)): os.symlink( os.symlink( Loading Loading
csst_common/data_manager.py +18 −5 Original line number Original line Diff line number Diff line Loading @@ -81,6 +81,8 @@ class CsstMsDataManager: dfs_node : str dfs_node : str The environment in which the pipeline will run. The environment in which the pipeline will run. Use "pml" for Purple Mountain Lab cluster and "local" for others. Use "pml" for Purple Mountain Lab cluster and "local" for others. dfs_root : str The DFS root path. obs_id : int obs_id : int The exposure ID. The exposure ID. exp_start : int exp_start : int Loading Loading @@ -137,6 +139,7 @@ class CsstMsDataManager: path_aux: str = "", # bias dark flat path_aux: str = "", # bias dark flat use_dfs: bool = False, use_dfs: bool = False, dfs_node: str = "kmust", dfs_node: str = "kmust", dfs_root: str = "/share/dfs", obs_id: str = "100000100", obs_id: str = "100000100", exp_start: int = "20270810081950", exp_start: int = "20270810081950", exp_stop: int = "20270810082220", exp_stop: int = "20270810082220", Loading Loading @@ -198,6 +201,7 @@ class CsstMsDataManager: # DFS configuration # DFS configuration self.use_dfs = use_dfs self.use_dfs = use_dfs self.dfs_node = dfs_node self.dfs_node = dfs_node self.dfs_root = dfs_root # data directory # data directory self.dir_l0 = dir_l0 self.dir_l0 = dir_l0 Loading Loading @@ -615,6 +619,19 @@ class CsstMsDataManager: """ Push SLS spectra to DFS. """ """ Push SLS spectra to DFS. """ pass pass @staticmethod def from_l1id( l1_id="1000000001", datatype="sls", dir_l0="/L1Pipeline/L0", dir_l1="/L1Pipeline/L1", use_dfs=True, dfs_node="pml", clear_l1=False, dfs_root="/share/dfs" ): pass @staticmethod @staticmethod def from_dfs( def from_dfs( obs_id="100000100", obs_id="100000100", Loading @@ -624,6 +641,7 @@ class CsstMsDataManager: use_dfs=True, use_dfs=True, dfs_node="pml", dfs_node="pml", clear_l1=False, clear_l1=False, dfs_root="/share/dfs" ): ): """ Initialize CsstMsDataManager from DFS. """ """ Initialize CsstMsDataManager from DFS. """ # (clear and) make directories # (clear and) make directories Loading @@ -648,11 +666,6 @@ class CsstMsDataManager: tbl = Table([_.__dict__ for _ in records["data"]]) tbl = Table([_.__dict__ for _ in records["data"]]) tbl.sort(["detector_no", "obs_type"]) tbl.sort(["detector_no", "obs_type"]) if os.uname()[1] == "ubuntu": # use pml test node dfs_root = "/share/dfs" else: # in docker dfs_root = "/dfsroot" print("Making symbolic links ...") print("Making symbolic links ...") for i_rec in range(len(tbl)): for i_rec in range(len(tbl)): os.symlink( os.symlink( Loading