Loading csst_mci_sim/CTI/CTI.py +34 −34 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ class CDM03bidir(): :param log: instance to Python logging :type log: logging instance """ def __init__(self, settings, data, log=None): """ Class constructor. Loading @@ -39,7 +40,8 @@ class CDM03bidir(): :type log: logging instance """ self.data = data self.values = dict(quads=(0,1,2,3), xsize=2048, ysize=2066, dob=0.0, rdose=8.0e9) self.values = dict(quads=(0, 1, 2, 3), xsize=2048, ysize=2066, dob=0.0, rdose=8.0e9) self.values.update(settings) self.log = log self._setupLogger() Loading @@ -51,7 +53,8 @@ class CDM03bidir(): self.params.update(self.values) # read in trap information trapdata = np.loadtxt(self.values['dir_path']+self.values['paralleltrapfile']) trapdata = np.loadtxt( self.values['dir_path']+self.values['paralleltrapfile']) if trapdata.ndim > 1: self.nt_p = trapdata[:, 0] self.sigma_p = trapdata[:, 1] Loading @@ -62,7 +65,8 @@ class CDM03bidir(): self.sigma_p = [trapdata[1],] self.taur_p = [trapdata[2],] trapdata = np.loadtxt(self.values['dir_path']+self.values['serialtrapfile']) trapdata = np.loadtxt( self.values['dir_path']+self.values['serialtrapfile']) if trapdata.ndim > 1: self.nt_s = trapdata[:, 0] self.sigma_s = trapdata[:, 1] Loading @@ -81,7 +85,6 @@ class CDM03bidir(): self.nt_s *= 0.576 # thibaut's values traps / pixel #should be division? self.sigma_s *= 1.e4 # thibaut's values in m**2 def _setupLogger(self): """ Set up the logger. Loading @@ -90,7 +93,6 @@ class CDM03bidir(): # if self.log is None: # self.logger = False def applyRadiationDamage(self, data, iquadrant=0): """ Apply radian damage based on FORTRAN CDM03 model. The method assumes that Loading Loading @@ -127,8 +129,8 @@ class CDM03bidir(): array will be laid out in memory in C-style (row-major order). :return: image that has been run through the CDM03 model :rtype: ndarray """"" :rtype: ndarray """"" # return data iflip = iquadrant / 2 Loading @@ -154,7 +156,7 @@ class CDM03bidir(): self.log.info('jflip=%i' % jflip) ################################################################################# ###modify # modify # sys.path.append('../so') # from ifs_so.cdm03.cpython-38-x86_64-linux-gnu import cdm03bidir Loading @@ -169,9 +171,7 @@ class CDM03bidir(): params, [data.shape[0], data.shape[1], len(self.nt_p), len(self.nt_s), len(self.params)]) return np.asanyarray(CTIed) ################################################################################################################# ################################################################################################################# csst_mci_sim/csst_mci_sim.py +4099 −3264 File changed.Preview size limit exceeded, changes collapsed. Show changes csst_mci_sim/earthshine.py +3 −3 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ class StrayLight(object): ############################################################################### ### test # test # path='/home/yan/MCI/' # time_jd = 2460417.59979167 # x_sat = -4722.543136 Loading csst_mci_sim/mci_so/__pycache__/__init__.cpython-311.pyc 0 → 100644 +187 B File added.No diff preview for this file type. View file csst_mci_sim/straylight.py +1 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ class StrayLight(object): ############################################################################### ## test # test # path='/home/yan/MCI/' # time_jd = 2460417.59979167 # x_sat = -4722.543136 Loading Loading
csst_mci_sim/CTI/CTI.py +34 −34 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ class CDM03bidir(): :param log: instance to Python logging :type log: logging instance """ def __init__(self, settings, data, log=None): """ Class constructor. Loading @@ -39,7 +40,8 @@ class CDM03bidir(): :type log: logging instance """ self.data = data self.values = dict(quads=(0,1,2,3), xsize=2048, ysize=2066, dob=0.0, rdose=8.0e9) self.values = dict(quads=(0, 1, 2, 3), xsize=2048, ysize=2066, dob=0.0, rdose=8.0e9) self.values.update(settings) self.log = log self._setupLogger() Loading @@ -51,7 +53,8 @@ class CDM03bidir(): self.params.update(self.values) # read in trap information trapdata = np.loadtxt(self.values['dir_path']+self.values['paralleltrapfile']) trapdata = np.loadtxt( self.values['dir_path']+self.values['paralleltrapfile']) if trapdata.ndim > 1: self.nt_p = trapdata[:, 0] self.sigma_p = trapdata[:, 1] Loading @@ -62,7 +65,8 @@ class CDM03bidir(): self.sigma_p = [trapdata[1],] self.taur_p = [trapdata[2],] trapdata = np.loadtxt(self.values['dir_path']+self.values['serialtrapfile']) trapdata = np.loadtxt( self.values['dir_path']+self.values['serialtrapfile']) if trapdata.ndim > 1: self.nt_s = trapdata[:, 0] self.sigma_s = trapdata[:, 1] Loading @@ -81,7 +85,6 @@ class CDM03bidir(): self.nt_s *= 0.576 # thibaut's values traps / pixel #should be division? self.sigma_s *= 1.e4 # thibaut's values in m**2 def _setupLogger(self): """ Set up the logger. Loading @@ -90,7 +93,6 @@ class CDM03bidir(): # if self.log is None: # self.logger = False def applyRadiationDamage(self, data, iquadrant=0): """ Apply radian damage based on FORTRAN CDM03 model. The method assumes that Loading Loading @@ -127,8 +129,8 @@ class CDM03bidir(): array will be laid out in memory in C-style (row-major order). :return: image that has been run through the CDM03 model :rtype: ndarray """"" :rtype: ndarray """"" # return data iflip = iquadrant / 2 Loading @@ -154,7 +156,7 @@ class CDM03bidir(): self.log.info('jflip=%i' % jflip) ################################################################################# ###modify # modify # sys.path.append('../so') # from ifs_so.cdm03.cpython-38-x86_64-linux-gnu import cdm03bidir Loading @@ -169,9 +171,7 @@ class CDM03bidir(): params, [data.shape[0], data.shape[1], len(self.nt_p), len(self.nt_s), len(self.params)]) return np.asanyarray(CTIed) ################################################################################################################# #################################################################################################################
csst_mci_sim/csst_mci_sim.py +4099 −3264 File changed.Preview size limit exceeded, changes collapsed. Show changes
csst_mci_sim/earthshine.py +3 −3 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ class StrayLight(object): ############################################################################### ### test # test # path='/home/yan/MCI/' # time_jd = 2460417.59979167 # x_sat = -4722.543136 Loading
csst_mci_sim/mci_so/__pycache__/__init__.cpython-311.pyc 0 → 100644 +187 B File added.No diff preview for this file type. View file
csst_mci_sim/straylight.py +1 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ class StrayLight(object): ############################################################################### ## test # test # path='/home/yan/MCI/' # time_jd = 2460417.59979167 # x_sat = -4722.543136 Loading