From 9bdf63365753b3ddc7174772a691295ff832a499 Mon Sep 17 00:00:00 2001 From: yan Date: Thu, 18 Apr 2024 13:10:37 +0800 Subject: [PATCH] debug --- csst_ifs_sim/csst_ifs_sim.py | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/csst_ifs_sim/csst_ifs_sim.py b/csst_ifs_sim/csst_ifs_sim.py index d3ef00e..dd51535 100644 --- a/csst_ifs_sim/csst_ifs_sim.py +++ b/csst_ifs_sim/csst_ifs_sim.py @@ -5519,10 +5519,15 @@ class IFSsimulator(): # if self.debug: # exptimes=1 - - self.image_b_N = np.zeros((1344, 9672, exptimes)) - - self.image_r_N = np.zeros((1856, 13768, exptimes)) + if exptimes>1: + self.image_b_N = np.zeros((1344, 9672, exptimes)) + + self.image_r_N = np.zeros((1856, 13768, exptimes)) + else: + self.image_b_N = np.zeros((1344, 9672)) + + self.image_r_N = np.zeros((1856, 13768)) + for idk in range(exptimes): @@ -5590,9 +5595,16 @@ class IFSsimulator(): print('Applying cosmetics finished.......') self.discretise() + + + if exptimes>1: - self.image_b_N[:, :, idk] = self.image_b[:, :] - self.image_r_N[:, :, idk] = self.image_r[:, :] + self.image_b_N[:, :, idk] = self.image_b[:, :].copy() + self.image_r_N[:, :, idk] = self.image_r[:, :].copy() + else: + self.image_b_N[:, :] = self.image_b[:, :].copy() + self.image_r_N[:, :] = self.image_r[:, :].copy() + self.writeOutputs(simnumber) -- GitLab