Loading csst_mci_sim/csst_mci_sim.py +24 −24 Original line number Diff line number Diff line Loading @@ -1398,7 +1398,7 @@ class MCIsimulator(): df2 = pandas.read_csv( self.information['dir_path']+'MCI_inputData/star_input/'+starcat) ### # try: df2['ra_gaia'][10] except NameError: Loading @@ -1406,7 +1406,7 @@ class MCIsimulator(): 'Error,no ra data in the star_cat catlog file ') raise ValueError( 'Error,no ra data in the star_cat catlog file ') # try: df2['dec_gaia'][10] except NameError: Loading @@ -1414,13 +1414,13 @@ class MCIsimulator(): 'Error,no dec data in the star_cat catlog file ') raise ValueError( 'Error,no dec data in the star_cat catlog file ') # if df2['ra_gaia'].max() > 360 or df2['ra_gaia'].min() < 0 or df2['dec_gaia'].max() > 90 or df2['dec_gaia'].min() < -90: self.log.error( 'ra or dec data beyond definition,please check!') raise ValueError( 'ra or dec data beyond definition,please check!') # df3 = df2[(abs(df2['ra_gaia']-df2['ra_gaia'].mean()) < 400/3600.0) & (abs(df2['dec_gaia']-df2['dec_gaia'].mean()) < 400/3600.0)] Loading Loading @@ -1454,7 +1454,7 @@ class MCIsimulator(): 'Error,no ra data in the star_cat catlog file ') raise ValueError( 'Error,no ra data in the star_cat catlog file ') # try: self.star['dec'][10] except NameError: Loading Loading @@ -2351,16 +2351,16 @@ class MCIsimulator(): if not os.path.exists(filename): print('finish load all the input galaxy image fits files') # self.log.error( 'Error, when load input galaxy image fits files') raise ValueError( 'Error, when load input galaxy image fits files') # break srcs_cat = fits.open(filename) # # ### load galaxy SED fitsfile ### if self.lensing: Loading @@ -2383,7 +2383,7 @@ class MCIsimulator(): dec_list = [] for kkk in range(1, len(srcs_cat)): # # test input data try: srcs_cat[kkk].header['new_ra'] Loading @@ -2392,7 +2392,7 @@ class MCIsimulator(): 'Error,no ra data in the input galaxy data file ') raise ValueError( 'Error,no ra data in the input galaxy data file ') # try: srcs_cat[kkk].header['new_dec'] except NameError: Loading Loading @@ -2456,19 +2456,19 @@ class MCIsimulator(): # # SED of j-th galaxy ,# unit of 10-17 erg/s/A/cm2 # here is k1+1, not k1, k1 begins with 0 gal_flux = srcs_sed[k1+1].data # if gal_flux.min() < 0 or len(gal_flux) < 100: self.log.error( 'Galaxy SED data error, please check!') raise ValueError( 'Galaxy SED data error, please check!') # if srcs_cat[k1+1].data.min() < 0 or srcs_cat[k1+1].data.max == 0 or srcs_cat[k1+1].data.ndim != 2: self.log.error( 'Galaxy image data error, please check!') raise ValueError( 'Galaxy image data error, please check!') # ################################ # ## rotate the lensed_images_g ### if abs(theta.deg) > 0: Loading Loading
csst_mci_sim/csst_mci_sim.py +24 −24 Original line number Diff line number Diff line Loading @@ -1398,7 +1398,7 @@ class MCIsimulator(): df2 = pandas.read_csv( self.information['dir_path']+'MCI_inputData/star_input/'+starcat) ### # try: df2['ra_gaia'][10] except NameError: Loading @@ -1406,7 +1406,7 @@ class MCIsimulator(): 'Error,no ra data in the star_cat catlog file ') raise ValueError( 'Error,no ra data in the star_cat catlog file ') # try: df2['dec_gaia'][10] except NameError: Loading @@ -1414,13 +1414,13 @@ class MCIsimulator(): 'Error,no dec data in the star_cat catlog file ') raise ValueError( 'Error,no dec data in the star_cat catlog file ') # if df2['ra_gaia'].max() > 360 or df2['ra_gaia'].min() < 0 or df2['dec_gaia'].max() > 90 or df2['dec_gaia'].min() < -90: self.log.error( 'ra or dec data beyond definition,please check!') raise ValueError( 'ra or dec data beyond definition,please check!') # df3 = df2[(abs(df2['ra_gaia']-df2['ra_gaia'].mean()) < 400/3600.0) & (abs(df2['dec_gaia']-df2['dec_gaia'].mean()) < 400/3600.0)] Loading Loading @@ -1454,7 +1454,7 @@ class MCIsimulator(): 'Error,no ra data in the star_cat catlog file ') raise ValueError( 'Error,no ra data in the star_cat catlog file ') # try: self.star['dec'][10] except NameError: Loading Loading @@ -2351,16 +2351,16 @@ class MCIsimulator(): if not os.path.exists(filename): print('finish load all the input galaxy image fits files') # self.log.error( 'Error, when load input galaxy image fits files') raise ValueError( 'Error, when load input galaxy image fits files') # break srcs_cat = fits.open(filename) # # ### load galaxy SED fitsfile ### if self.lensing: Loading @@ -2383,7 +2383,7 @@ class MCIsimulator(): dec_list = [] for kkk in range(1, len(srcs_cat)): # # test input data try: srcs_cat[kkk].header['new_ra'] Loading @@ -2392,7 +2392,7 @@ class MCIsimulator(): 'Error,no ra data in the input galaxy data file ') raise ValueError( 'Error,no ra data in the input galaxy data file ') # try: srcs_cat[kkk].header['new_dec'] except NameError: Loading Loading @@ -2456,19 +2456,19 @@ class MCIsimulator(): # # SED of j-th galaxy ,# unit of 10-17 erg/s/A/cm2 # here is k1+1, not k1, k1 begins with 0 gal_flux = srcs_sed[k1+1].data # if gal_flux.min() < 0 or len(gal_flux) < 100: self.log.error( 'Galaxy SED data error, please check!') raise ValueError( 'Galaxy SED data error, please check!') # if srcs_cat[k1+1].data.min() < 0 or srcs_cat[k1+1].data.max == 0 or srcs_cat[k1+1].data.ndim != 2: self.log.error( 'Galaxy image data error, please check!') raise ValueError( 'Galaxy image data error, please check!') # ################################ # ## rotate the lensed_images_g ### if abs(theta.deg) > 0: Loading