Loading csst_mci_sim/csst_mci_sim.py +27 −19 Original line number Diff line number Diff line Loading @@ -2035,7 +2035,7 @@ class MCIsimulator(): #################### generate star image ########## if self.debug: nstar=100 nstar=1000 else: nstar=nsrcs Loading Loading @@ -2088,7 +2088,7 @@ class MCIsimulator(): if self.debug: if nlayccd>10: continue break st_ra.append( np.float64(starRa/3600.0)) st_dec.append(np.float64(starDec/3600.0)) Loading Loading @@ -2144,7 +2144,7 @@ class MCIsimulator(): # Input redshift redshift = 0 self.log.info('load star catlog 777777777') # Loading galaxy SED template t=sed.Gal_Temp(self.information['dir_path']) # Calculating the magnitude (u, g, r, i, z) of each template Loading @@ -2152,7 +2152,7 @@ class MCIsimulator(): # Calculating flux ugriz = np.array([umag, gmag, rmag, imag, zmag]) star_flux = sed.Model_Galaxy_SED(wave, ugriz, redshift, t, self.information['dir_path']) self.log.info('load star catlog 888888888888') Loading Loading @@ -2218,7 +2218,7 @@ class MCIsimulator(): st_magz.append(zmag) self.log.info('load star catlog 888888888888') ###################################################################### psf=dict() Loading Loading @@ -2251,13 +2251,16 @@ class MCIsimulator(): stamp_img = galsim.Image(conv, copy=True) stamp_img.setOrigin(0,0) stamp_img.scale=0.025 self.log.info('load star catlog 999999999') ################################################# photons=galsim.PhotonArray.makeFromImage(stamp_img, max_flux=min(1.0, stamp_img.array.max()/10000.0)) cx0,cy0=centroid(stamp_img.array) self.log.info('load star catlog 99999999999998') if self.appFatt : ### apply treering and bright fatter and diffusion; Loading Loading @@ -2294,6 +2297,9 @@ class MCIsimulator(): photons.addTo(final_image[ch]) self.log.info('load star catlog 11111111111') ############################### ###### debug code # fi= galsim.ImageF(int(self.information['xsize']), int(self.information['ysize'])) Loading @@ -2316,6 +2322,8 @@ class MCIsimulator(): ############################################################### print('total star nummber on CCD is: ',nlayccd ) self.log.info('total star nummber on CCD = %i' % (nlayccd)) tab=Table() tab['st_ra'] =np.asarray(st_ra) tab['st_dec'] =np.asarray(st_dec) Loading Loading @@ -2819,9 +2827,9 @@ class MCIsimulator(): ######## test code ########## if self.debug: if nlayccd>10: if nlayccd>4: ######### continue break ############################33 Loading Loading @@ -5430,7 +5438,7 @@ class MCIsimulator(): #################################################################### if self.source in sourcelist: if self.cosmicRays: if self.debug == False: # if self.debug == False: self.addCosmicRays() print('addCosmicRays finisth') Loading @@ -5454,7 +5462,7 @@ class MCIsimulator(): ################################################# if self.bleeding: if self.debug== False: # if self.debug== False: self.image_g=self.applyBleeding(self.image_g.copy()) self.image_r=self.applyBleeding(self.image_r.copy()) self.image_i=self.applyBleeding(self.image_i.copy()) Loading Loading @@ -5483,7 +5491,7 @@ class MCIsimulator(): ################################################################# if self.source in sourcelist: if self.radiationDamage: if self.debug == False: # if self.debug == False: self.applyRadiationDamage() print('applyRadiationDamage()') ###################################################################### Loading Loading
csst_mci_sim/csst_mci_sim.py +27 −19 Original line number Diff line number Diff line Loading @@ -2035,7 +2035,7 @@ class MCIsimulator(): #################### generate star image ########## if self.debug: nstar=100 nstar=1000 else: nstar=nsrcs Loading Loading @@ -2088,7 +2088,7 @@ class MCIsimulator(): if self.debug: if nlayccd>10: continue break st_ra.append( np.float64(starRa/3600.0)) st_dec.append(np.float64(starDec/3600.0)) Loading Loading @@ -2144,7 +2144,7 @@ class MCIsimulator(): # Input redshift redshift = 0 self.log.info('load star catlog 777777777') # Loading galaxy SED template t=sed.Gal_Temp(self.information['dir_path']) # Calculating the magnitude (u, g, r, i, z) of each template Loading @@ -2152,7 +2152,7 @@ class MCIsimulator(): # Calculating flux ugriz = np.array([umag, gmag, rmag, imag, zmag]) star_flux = sed.Model_Galaxy_SED(wave, ugriz, redshift, t, self.information['dir_path']) self.log.info('load star catlog 888888888888') Loading Loading @@ -2218,7 +2218,7 @@ class MCIsimulator(): st_magz.append(zmag) self.log.info('load star catlog 888888888888') ###################################################################### psf=dict() Loading Loading @@ -2251,13 +2251,16 @@ class MCIsimulator(): stamp_img = galsim.Image(conv, copy=True) stamp_img.setOrigin(0,0) stamp_img.scale=0.025 self.log.info('load star catlog 999999999') ################################################# photons=galsim.PhotonArray.makeFromImage(stamp_img, max_flux=min(1.0, stamp_img.array.max()/10000.0)) cx0,cy0=centroid(stamp_img.array) self.log.info('load star catlog 99999999999998') if self.appFatt : ### apply treering and bright fatter and diffusion; Loading Loading @@ -2294,6 +2297,9 @@ class MCIsimulator(): photons.addTo(final_image[ch]) self.log.info('load star catlog 11111111111') ############################### ###### debug code # fi= galsim.ImageF(int(self.information['xsize']), int(self.information['ysize'])) Loading @@ -2316,6 +2322,8 @@ class MCIsimulator(): ############################################################### print('total star nummber on CCD is: ',nlayccd ) self.log.info('total star nummber on CCD = %i' % (nlayccd)) tab=Table() tab['st_ra'] =np.asarray(st_ra) tab['st_dec'] =np.asarray(st_dec) Loading Loading @@ -2819,9 +2827,9 @@ class MCIsimulator(): ######## test code ########## if self.debug: if nlayccd>10: if nlayccd>4: ######### continue break ############################33 Loading Loading @@ -5430,7 +5438,7 @@ class MCIsimulator(): #################################################################### if self.source in sourcelist: if self.cosmicRays: if self.debug == False: # if self.debug == False: self.addCosmicRays() print('addCosmicRays finisth') Loading @@ -5454,7 +5462,7 @@ class MCIsimulator(): ################################################# if self.bleeding: if self.debug== False: # if self.debug== False: self.image_g=self.applyBleeding(self.image_g.copy()) self.image_r=self.applyBleeding(self.image_r.copy()) self.image_i=self.applyBleeding(self.image_i.copy()) Loading Loading @@ -5483,7 +5491,7 @@ class MCIsimulator(): ################################################################# if self.source in sourcelist: if self.radiationDamage: if self.debug == False: # if self.debug == False: self.applyRadiationDamage() print('applyRadiationDamage()') ###################################################################### Loading