def load_date(self, LOCALorPPL): """ LOCALorPPL == "PPL"の場合: exp_ep01, exp_ep01から実験データをロードします LOCALorPPL == "LOCAL"の場合: ローカルに保存してあるデータを読み込みます :param LOCALorPPL: :return: """ if LOCALorPPL == "PPL": dm_ep01 = read_wvf.DataManager("exp_ep01", 0, self.date) dm_ep02_MP = read_wvf.DataManager("exp_ep02", "MP", self.date) dm_ep02_SX = read_wvf.DataManager("exp_ep02", "SX", self.date) data_ep01 = dm_ep01.fetch_raw_data(self.shotnum) data_ep02_MP = dm_ep02_MP.fetch_raw_data(self.shotnum) data_ep02_SX = dm_ep02_SX.fetch_raw_data(self.shotnum) #np.savez_compressed("data/data_%s_%d" % (self.date, self.shotnum), data_ep01=data_ep01, data_ep02_MP=data_ep02_MP, data_ep02_SX=data_ep02_SX) print("Load data from PPL") else: data = np.load("data/data_%s_%d.npz" % (self.date, self.shotnum)) data_ep01 = data["data_ep01"] data_ep02_MP = data["data_ep02_MP"] data_ep02_SX = data["data_ep02_SX"] print("Load data from local") return data_ep01, data_ep02_MP, data_ep02_SX
def load_SX_FAST(self, LOCALorPPL): if LOCALorPPL == "PPL": dm_ep02_SX = read_wvf.DataManager("exp_ep02", "SX", self.date) data_ep02_SX = dm_ep02_SX.fetch_raw_data(self.shotnum) print("Load SX from PPL") else: data = np.load("SX123_%s_%d.npz" % (self.date, self.shotnum)) data_ep02_MP = data["data_ep02_SX"] print("Load SX from local") return data_ep02_SX
def load_IF_FAST(self, LOCALorPPL): if LOCALorPPL == "PPL": dm_ep02_SX = read_wvf.DataManager("exp_ep02", "SX", self.date) data_ep02_SX = dm_ep02_SX.fetch_raw_data(self.shotnum) print("Load SX from PPL") else: data = np.load("IF_%s_%d.npz" % (self.date, self.shotnum)) data_ep02_SX = data["data_ep02_SX"] filename = "GP1_20171110_107_IF1IF2FAST.txt" IF_FAST = np.loadtxt(filename, delimiter=",") print("Load SX from local") return data_ep02_SX