Commit 6215ea38 authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

debug

parent 55c41637
......@@ -1906,25 +1906,15 @@ class MCIsimulator():
if j==0:
self.log.info('begin iteration........')
if self.debug:
self.log.info('j = %i' % (j))
starRa = 3600.0*( newRa[j] ) # ra of star, arcsecond
starDec = 3600.0*( newDec[j] ) # dec of star, arcsecond
###################################################################
###### test code #####
# starRa =self.information['ra_obj']*3600.0
# starDec =self.information['dec_obj']*3600.0
# tx, ty = world_to_pixel(starRa/3600,
# starDec/3600,
# theta.deg,
# center_ra,
# center_dec,
# self.information['xsize']/2-0.5,
# self.information['ysize']/2-0.5,
# pixelsize=0.05)
#print(x,y)
###################################################################
fsx,fsy=cal_pos(center_ra,center_dec, rotTelPos, rotSkyPos, starRa, starDec)
row= fsy/pixelscale+self.information['ysize']/2-0.5 ### row number on CCD image
......@@ -1939,7 +1929,7 @@ class MCIsimulator():
if self.debug:
if nlayccd>5:
if nlayccd>1:
break
st_ra.append( np.float64(starRa/3600.0))
......@@ -2021,14 +2011,17 @@ class MCIsimulator():
#self.log.info('Channel in =%s, PosX(in pixel)=%f, PosY(in pixel)=%f' % (channel[i], gx[ch], gy[ch]))
#self.log.info('Channel in =%s, PosX(in pixel)=%f, PosY(in pixel)=%f, Nphotons=%f' % (channel[i], gx[ch], gy[ch],intscales[ch]))
if nlayccd %100 == 0:
if self.debug:
self.log.info('Channel in =%s, PosX(in pixel)=%f, PosY(in pixel)=%f, Nphotons=%f' % (channel[i], gx[ch], gy[ch],intscales[ch]))
self.log.info('Star number on CCD is = %i' % (nlayccd))
if self.debug:
if nlayccd %100 == 0:
self.log.info('Star number on CCD is = %i' % (nlayccd))
######
st_phot_C1.append(intscales['g'])
st_phot_C2.append(intscales['r'])
......@@ -2652,7 +2645,7 @@ class MCIsimulator():
######## test code ##########
if self.debug:
if nlayccd>2:
if nlayccd>1:
#########
break
......
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