PRINT,'enter the camera and filter numbers' READ,cam,filt i= fltarr(256,256) file=STRING(cam,filt,FORM='("/jasper/cnsr3_data1/flat/fn06",2I1)') rdnflat,file+"+00.057",i0 rdnflat,file+"-20.237",i2n rdnflat,file+"-40.237",i4n rdnflat,file+"-60.237",i6n rdnflat,file+"+20.057",i2p rdnflat,file+"+40.057",i4p rdnflat,file+"+60.057",i6p w=where(i6p) i(w)=i6p(w) w=where(i4p) i(w)=i4p(w) w=where(i6n) i(w)=i6n(w) w=where(i4n) i(w)=i4n(w) w=where(i2n) i(w)=i2n(w) w=where(i2p) i(w)=i2p(w) w=where(i0) i(w)=i0(w) stop IF !D.WINDOW EQ -1 THEN WINDOW,0,XSIZE=975,YSIZE=850 WINDOW,2,XSIZE=300,YSIZE=300 loadct,13 tvscl,i dc0=profile(i,xx,yy) IF xx(0) GT xx(50) THEN xx=ROTATE(xx,2) IF yy(0) GT yy(50) THEN yy=ROTATE(yy,2) two2one,xx,yy,i0,w PRINT,'Would you like to create a PS file ? (y/[n]) ans='' READ,ans IF ans EQ 'y' THEN BEGIN PRINT,'Name the PS file' psname='' READ,psname psfile="/jasper/cnsr3_data1/flat/"+STRTRIM(psname,2) psopen,psfile ENDIF IF ans NE 'y' THEN BEGIN psname=STRING(cam,filt,FORM='("c",I1,"/f",I1)') WSET,0 IF !p.multi(1) NE 2 THEN !P.MULTI=[0,2,2,0,0] ENDIF dc0=i0(w) dc0=dc0(where(dc0)) m=fltarr(256,256) m(xx,yy)=i0(xx,yy) w0=where(m) one2two,w0,i0,x0,y0 ymax=max(i0) ymin=0 plot,x0,dc0,xran=[min(xx),max(xx)],yran=[ymin,ymax],TITLE=psname dc2n=i2n(w) dc2n=dc2n(where(dc2n)) m=fltarr(256,256) m(xx,yy)=i2n(xx,yy) w2n=where(m) one2two,w2n,i2n,x2n,y2n oplot,x2n,dc2n,linestyle=2 dc4n=i4n(w) dc4n=dc4n(where(dc4n)) m=fltarr(256,256) m(xx,yy)=i4n(xx,yy) w4n=where(m) one2two,w4n,i4n,x4n,y4n oplot,x4n,dc4n dc6n=i6n(w) dc6n=dc6n(where(dc6n)) m=fltarr(256,256) m(xx,yy)=i6n(xx,yy) w6n=where(m) one2two,w6n,i6n,x6n,y6n oplot,x6n,dc6n,linestyle=3 dc2p=i2p(w) dc2p=dc2p(where(dc2p)) m=fltarr(256,256) m(xx,yy)=i2p(xx,yy) w2p=where(m) one2two,w2p,i2p,x2p,y2p oplot,x2p,dc2p,linestyle=2 dc4p=i4p(w) dc4p=dc4p(where(dc4p)) m=fltarr(256,256) m(xx,yy)=i4p(xx,yy) w4p=where(m) one2two,w4p,i4p,x4p,y4p oplot,x4p,dc4p dc6p=i6p(w) dc6p=dc6p(where(dc6p)) m=fltarr(256,256) m(xx,yy)=i6p(xx,yy) w6p=where(m) one2two,w6p,i6p,x6p,y6p oplot,x6p,dc6p,linestyle=3 IF ans EQ 'y' THEN psclose WDELETE,2 END