Commit dee31bea authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

update

parent 0659fdd5
Pipeline #7892 failed with stage
in 0 seconds
...@@ -1579,32 +1579,32 @@ class MCIsimulator(): ...@@ -1579,32 +1579,32 @@ class MCIsimulator():
self.information['dec_obj'] = self.star['dec_gaia'].mean() self.information['dec_obj'] = self.star['dec_gaia'].mean()
nsrcs = len(self.star['ra_gaia']) nsrcs = len(self.star['ra_gaia'])
if get_file_extension(starcat) == '.fits': # if get_file_extension(starcat) == '.fits':
self.log.info('Stat catlog file name is %s' % (starcat)) # self.log.info('Stat catlog file name is %s' % (starcat))
df0 = fits.open( # df0 = fits.open(
self.information['dir_path']+'/MCI_inputData/star_input/'+starcat) # self.information['dir_path']+'/MCI_inputData/star_input/'+starcat)
self.star = df0[1].data # self.star = df0[1].data
### # ###
if 'ra' not in self.star.names or 'dec' not in self.star.names: # if 'ra' not in self.star.names or 'dec' not in self.star.names:
print('no ra') # print('no ra')
self.log.error( # self.log.error(
'Error,no ra or dec data in the star_cat catlog file ') # 'Error,no ra or dec data in the star_cat catlog file ')
raise ValueError( # raise ValueError(
'Error,no ra or dec data in the star_cat catlog file ') # 'Error,no ra or dec data in the star_cat catlog file ')
if self.star['ra'].max() > 360 or self.star['ra'].min() < 0 or self.star['dec'].max() > 90 or self.star['dec'].min() < -90: # if self.star['ra'].max() > 360 or self.star['ra'].min() < 0 or self.star['dec'].max() > 90 or self.star['dec'].min() < -90:
self.log.error( # self.log.error(
'ra or dec data beyond definition,please check!') # 'ra or dec data beyond definition,please check!')
raise ValueError( # raise ValueError(
'ra or dec data beyond definition,please check!') # 'ra or dec data beyond definition,please check!')
self.information['ra_obj'] = self.star['ra'].mean() # self.information['ra_obj'] = self.star['ra'].mean()
self.information['dec_obj'] = self.star['dec'].mean() # self.information['dec_obj'] = self.star['dec'].mean()
nsrcs = len(self.star['ra']) # nsrcs = len(self.star['ra'])
################################## ##################################
...@@ -2501,7 +2501,7 @@ class MCIsimulator(): ...@@ -2501,7 +2501,7 @@ class MCIsimulator():
if self.lensing: if self.lensing:
filename = self.information['dir_path'] + \ filename = self.information['dir_path'] + \
'MCI_inputData/galaxy_Input/Lens_SED_IMG_0.025_241227/Lens_img_cut_SED_' + \ 'MCI_inputData/galaxy_Input/Lens_SED_IMG_0.025_230606/Lens_img_cut_SED_' + \
str(k2+1)+'.fits' str(k2+1)+'.fits'
if not os.path.exists(filename): if not os.path.exists(filename):
continue continue
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment