예제 #1
0
#saving.close()

#The other choice is to make a plot ...

#Making 1st Test...

#I have to choose an angle, it'll be the angular position of the proplyd ths = np.arctan2(ys,xs)
#The test proplyd is LV1 (168-326)

THETA = np.arctan2(catalogy[Prop],catalogx[Prop]) + cmdargs.theta*np.pi/180

#thsLV1 = np.arctan2(catalogy['168-326'],catalogx['168-326'])
#print thsLV1*180/np.pi

#The time of truth...
Ps,Br = lib.slit(data,X,Y,catalogx[Prop],catalogy[Prop],ths=THETA,delta = dx )

#centering to create an histogram

Pscen = 0.5*(Ps[1:]+Ps[:-1])

lib.plotter(Ps,Br,xlow=-20,ylow=-20,xlab='xslit(arcseconds)',ylab='yslit(arcseconds)')

#plt.plot(PcenLV1,SLV1)
#plt.axis([-20,20,0,300]) #Adjusting axes
#plt.xlabel('xslit(arcseconds)')
#plt.ylabel('yslit(arcseconds)')
#plt.title('Histograma LV1')
#plt.savefig('LV1_b.png')
#plt.clf()
#repeat everything with a perpendicular slit
예제 #2
0
#saving.close()

#The other choice is to make a plot ...

#Making 1st Test...

#I have to choose an angle, it'll be the angular position of the proplyd ths = np.arctan2(ys,xs)
#The test proplyd is LV1 (168-326)

THETA = np.arctan2(catalogy[Prop],catalogx[Prop]) + cmdargs.theta*np.pi/180

#thsLV1 = np.arctan2(catalogy['168-326'],catalogx['168-326'])
#print thsLV1*180/np.pi

#The time of truth...
Ps,Br = lib.slit(data,X,Y,catalogx[Prop],catalogy[Prop],ths=THETA,w=cmdargs.width,delta = dx )

#centering to create an histogram

Pscen = 0.5*(Ps[1:]+Ps[:-1])

#lib.plotter(Ps,Br,xlow=-20,ylow=-20,xlab='xslit(arcseconds)',ylab='yslit(arcseconds)')

#plt.plot(Pscen,Br)
#plt.axis([-20,30,-1e-3,0.02]) #Adjusting axes
#plt.xlabel('xslit(arcseconds)')
#plt.ylabel('yslit(arcseconds)')
#plt.title('Histograma LV1(HD)') #Maybe I can in the future send data to file and then plot with another program
#plt.savefig('Grafica.png')
#plt.clf()
#RA grows in the same direction than X and Dec in the same direction as Y

#xpr0,ypr0 = (ra - header['CRVAL1'])*3600.,(dec-header['CRVAL2'])*3600.



Xpr0_beta,Ypr0_beta = (cmdargs.propx - header['CRVAL1'])*3600.,(cmdargs.propy- header['CRVAL2'])*3600.

THETA = np.arctan2(Ypr0_beta,Xpr0_beta) + cmdargs.theta*np.pi/180


#The time of truth...

#Emergency modification:For OIII image, we'll center the slits in any point instead of the coords from O'Dell & Wong due to the systematic displacement
#of proplyds in the OIII image
Ps,Br = lib.slit(data,X,Y,Xpr0_beta,Ypr0_beta,ths=THETA,w=cmdargs.width,delta = dx )

#centering to create an histogram

Pscen = 0.5*(Ps[1:]+Ps[:-1])

xm = cmdargs.xmin
XM = cmdargs.xmax
ym = cmdargs.ymin
YM = cmdargs.ymax

plt.plot(Pscen,Br)
plt.axis([xm,XM,ym,YM]) #Adjusting axes
plt.xlabel('xslit(arcseconds)')
plt.ylabel('Brightness')
plt.title('Histograma')