pro arrange,n,energy,gauss ; reads in caldat and rearranges it according to x,y on detector ; Version 1.0 6/4/96 PTB ; ; caldat was made by running fileread and calpositioner on all the ; data files, and now the information needs to be transposed so that ; the location of the points corresponds to the positioner location. ; (See the document describing positioner details) ; *************************************************************** openr,4,'caldat dat=fltarr(5,784) readf,4,dat close,4 n=dat(2,*) e=dat(3,*) g=dat(4,*) n=reform(n,28,28) e=reform(e,28,28) g=reform(g,28,28) n2=n e2=e g2=g locoff=findgen(14)*2 for i=0,27 do begin n2(i,locoff)=n(27-i,locoff) e2(i,locoff)=e(27-i,locoff) g2(i,locoff)=g(27-i,locoff) endfor n3=transpose(n2) e3=transpose(e2) g3=transpose(g2) n4=n3 e4=e3 g4=g3 for i=0,27 do begin n4(i,*)=n3(27-i,*) e4(i,*)=e3(27-i,*) g4(i,*)=g3(27-i,*) endfor n=n4 energy=e4 gauss=g4 end