Loading observation_sim/config/header/ImageHeader.py +10 −6 Original line number Diff line number Diff line Loading @@ -632,7 +632,11 @@ def generateExtensionHeader( # h_ext['CCDLABEL'] = filters[k-1] + '-' + filterID[k-1] # h_ext['FILTER'] = filters[k-1] h_ext["DETECTOR"] = str(chip.chipID).rjust(2, "0") h_ext["DETLABEL"] = chip.chip_name if chip.filter_type == "V": h_ext["DETLABEL"] = "v" h_ext["FILTER"] = "v" else: h_ext["DETLABEL"] = chip.filter_type+ '-' + str(chip.filter_id) h_ext["FILTER"] = chip.filter_type h_ext["NAXIS1"] = xlen h_ext["NAXIS2"] = ylen Loading @@ -653,10 +657,10 @@ def generateExtensionHeader( h_ext["GAIN14"] = chip.gain_channel[13] h_ext["GAIN15"] = chip.gain_channel[14] h_ext["GAIN16"] = chip.gain_channel[15] h_ext["PSCAN1"] = chip.prescan_x h_ext["PSCAN2"] = chip.prescan_y h_ext["OSCAN1"] = chip.overscan_x h_ext["OSCAN2"] = chip.overscan_y # h_ext["PSCAN1"] = chip.prescan_x # h_ext["PSCAN2"] = chip.prescan_y # h_ext["OSCAN1"] = chip.overscan_x # h_ext["OSCAN2"] = chip.overscan_y h_ext["RON01"] = readout h_ext["RON02"] = readout h_ext["RON03"] = readout Loading observation_sim/config/header/csst_msc_l0_ms.fits +2.81 KiB (179 MiB) File changed.No diff preview for this file type. View original file View changed file observation_sim/instruments/chip/Chip.py +2 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,8 @@ class Chip(FocalPlane): self.rowID, self.colID = self.getChipRowCol(self.chipID) def getChipRowCol(self, chipID): if chipID == 0: return 0, 6 rowID = ((chipID - 1) % 5) + 1 colID = 6 - ((chipID - 1) // 5) return rowID, colID Loading observation_sim/instruments/chip/effects.py +2 −2 Original line number Diff line number Diff line Loading @@ -977,8 +977,8 @@ def ShutterEffectArr(GSImage, t_exp=150, t_shutter=1.3, dist_bearing=735, dt=1e- ymax = GSImage.bounds.getYMax() if xmin < np.min(x) or xmax > np.max(x): raise LookupError("Out of focal-plane bounds in X-direction.") if ymin < -25331 or ymax > 25331: raise LookupError("Out of focal-plane bounds in Y-direction.") # if ymin < -25331 or ymax > 25331: # raise LookupError("Out of focal-plane bounds in Y-direction.") sizex = xmax - xmin + 1 sizey = ymax - ymin + 1 xnewgrid = np.mgrid[xmin : (xmin + sizex)] Loading observation_sim/mock_objects/FlatLED.py +37 −26 Original line number Diff line number Diff line Loading @@ -230,13 +230,24 @@ class FlatLED(MockObject): ) xlen = flat[0].header["NAXIS1"] ylen = 601 ms_start_y = 100 ## (9232/(9232+9216*5)) ms_y_len = ylen-ms_start_y i = self.chip.rowID - 1 j = self.chip.colID - 1 if self.chip.rowID == 0: x = np.linspace(0, self.chip.npix_x, int(xlen / 6.0)) y = np.linspace(0, self.chip.npix_y, int(ylen / 5.0)) y = np.linspace(0, self.chip.npix_y, ms_start_y) xx, yy = np.meshgrid(x, y) a1 = flat[0].data[ int(ylen * i / 5.0) : int(ylen * i / 5.0) + int(ylen / 5.0), 0 : 100, int(xlen * (j-0.5) / 6.0) : int(xlen * (j-0.5) / 6.0) + int(xlen / 6.0), ##v波段在外面,有半个探测器的错位 ] else: x = np.linspace(0, self.chip.npix_x, int(xlen / 6.0)) y = np.linspace(0, self.chip.npix_y, int(ms_y_len / 5.0)) xx, yy = np.meshgrid(x, y) a1 = flat[0].data[ int(ms_start_y + ms_y_len * i / 5.0) : int(ms_start_y + ms_y_len * i / 5.0) + int(ms_y_len / 5.0), int(xlen * j / 6.0) : int(xlen * j / 6.0) + int(xlen / 6.0), ] # z = np.sin((xx+yy+xx**2+yy**2)) Loading Loading
observation_sim/config/header/ImageHeader.py +10 −6 Original line number Diff line number Diff line Loading @@ -632,7 +632,11 @@ def generateExtensionHeader( # h_ext['CCDLABEL'] = filters[k-1] + '-' + filterID[k-1] # h_ext['FILTER'] = filters[k-1] h_ext["DETECTOR"] = str(chip.chipID).rjust(2, "0") h_ext["DETLABEL"] = chip.chip_name if chip.filter_type == "V": h_ext["DETLABEL"] = "v" h_ext["FILTER"] = "v" else: h_ext["DETLABEL"] = chip.filter_type+ '-' + str(chip.filter_id) h_ext["FILTER"] = chip.filter_type h_ext["NAXIS1"] = xlen h_ext["NAXIS2"] = ylen Loading @@ -653,10 +657,10 @@ def generateExtensionHeader( h_ext["GAIN14"] = chip.gain_channel[13] h_ext["GAIN15"] = chip.gain_channel[14] h_ext["GAIN16"] = chip.gain_channel[15] h_ext["PSCAN1"] = chip.prescan_x h_ext["PSCAN2"] = chip.prescan_y h_ext["OSCAN1"] = chip.overscan_x h_ext["OSCAN2"] = chip.overscan_y # h_ext["PSCAN1"] = chip.prescan_x # h_ext["PSCAN2"] = chip.prescan_y # h_ext["OSCAN1"] = chip.overscan_x # h_ext["OSCAN2"] = chip.overscan_y h_ext["RON01"] = readout h_ext["RON02"] = readout h_ext["RON03"] = readout Loading
observation_sim/config/header/csst_msc_l0_ms.fits +2.81 KiB (179 MiB) File changed.No diff preview for this file type. View original file View changed file
observation_sim/instruments/chip/Chip.py +2 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,8 @@ class Chip(FocalPlane): self.rowID, self.colID = self.getChipRowCol(self.chipID) def getChipRowCol(self, chipID): if chipID == 0: return 0, 6 rowID = ((chipID - 1) % 5) + 1 colID = 6 - ((chipID - 1) // 5) return rowID, colID Loading
observation_sim/instruments/chip/effects.py +2 −2 Original line number Diff line number Diff line Loading @@ -977,8 +977,8 @@ def ShutterEffectArr(GSImage, t_exp=150, t_shutter=1.3, dist_bearing=735, dt=1e- ymax = GSImage.bounds.getYMax() if xmin < np.min(x) or xmax > np.max(x): raise LookupError("Out of focal-plane bounds in X-direction.") if ymin < -25331 or ymax > 25331: raise LookupError("Out of focal-plane bounds in Y-direction.") # if ymin < -25331 or ymax > 25331: # raise LookupError("Out of focal-plane bounds in Y-direction.") sizex = xmax - xmin + 1 sizey = ymax - ymin + 1 xnewgrid = np.mgrid[xmin : (xmin + sizex)] Loading
observation_sim/mock_objects/FlatLED.py +37 −26 Original line number Diff line number Diff line Loading @@ -230,13 +230,24 @@ class FlatLED(MockObject): ) xlen = flat[0].header["NAXIS1"] ylen = 601 ms_start_y = 100 ## (9232/(9232+9216*5)) ms_y_len = ylen-ms_start_y i = self.chip.rowID - 1 j = self.chip.colID - 1 if self.chip.rowID == 0: x = np.linspace(0, self.chip.npix_x, int(xlen / 6.0)) y = np.linspace(0, self.chip.npix_y, int(ylen / 5.0)) y = np.linspace(0, self.chip.npix_y, ms_start_y) xx, yy = np.meshgrid(x, y) a1 = flat[0].data[ int(ylen * i / 5.0) : int(ylen * i / 5.0) + int(ylen / 5.0), 0 : 100, int(xlen * (j-0.5) / 6.0) : int(xlen * (j-0.5) / 6.0) + int(xlen / 6.0), ##v波段在外面,有半个探测器的错位 ] else: x = np.linspace(0, self.chip.npix_x, int(xlen / 6.0)) y = np.linspace(0, self.chip.npix_y, int(ms_y_len / 5.0)) xx, yy = np.meshgrid(x, y) a1 = flat[0].data[ int(ms_start_y + ms_y_len * i / 5.0) : int(ms_start_y + ms_y_len * i / 5.0) + int(ms_y_len / 5.0), int(xlen * j / 6.0) : int(xlen * j / 6.0) + int(xlen / 6.0), ] # z = np.sin((xx+yy+xx**2+yy**2)) Loading