OPENR, lun, 'idlproject_data.txt', /GET_LUN header = STRARR(1) READF, lun, header data=fltarr(41,5400) readf,lun,data close,/all pas0_data=fltarr(5400,3) folat=reform(data(9,*)) pas0_data[*,0]=reform(data(17,*)) ;row1: 3rd energy level pas0_data[*,1]=reform((data(16,*))-(data(17,*))) ;row2: 2nd energy level pas0_data[*,2]=reform((data(15,*))-(data(16,*))) ;row3: 1st energy level Y = ' ' read,Y,prompt='Enter number of bins (between 1 and 5400): ' nbins=Y u=fltarr((nbins+1),1) for p=0,nbins do begin $ u[p,0]=(((180./nbins)*p) - 90.) endfor c=fltarr(1,3) d=fltarr(nbins,3) for j=0, (nbins-1) do begin $ a = where((folat ge u[j,0]) and (folat lt u[j+1,0]), na) & $ ;na=number of indices satisfying conditions ;a = na by 1 vector with the index #'s if (na gt 0) then begin b=fltarr(na,3) for i=0, (na-1) do begin $ b[i,0]=pas0_data[a[i,0],0] b[i,1]=pas0_data[a[i,0],1] b[i,2]=pas0_data[a[i,0],2] endfor endif else begin b = fltarr(1,3) b[0,0]=0 b[0,1]=0 b[0,2]=0 endelse c[0,0]=total(b[*,0]) c[0,1]=total(b[*,1]) c[0,2]=total(b[*,2]) if (na gt 0) then begin d[j,2]=float(c[0,0])/na ;because plot_image makes d[j,1]=float(c[0,1])/na ;the [0,0] value in the bottom left, d[j,0]=float(c[0,2])/na ;not top left endif else begin d[j,2]=0 d[j,1]=0 d[j,0]=0 endelse endfor loadct, 2,ncolors = 255 ;!p.multi=[3,1,4] plot_image,d,position = [0.15,0.73,0.95,0.88],$ ytitle='Energy (keV)',$ xtitle='Latitude (degrees)',$ Title='0 Degree Telescope',$ charsize=3,$ yticks=6,$ ytickname=[' ','30<100',' ','100<300',' ','300<',' '],$ xticks=4,$ xtickname=['-90','-45','0','45','90'] maxcounts_0_1=max(d[*,0]) maxcount_0_1_indice=!C deg1=((180./nbins)*maxcount_0_1_indice)-90 deg2=((180./nbins)*(maxcount_0_1_indice+1))-90 maxcounts_0_2=max(d[*,1]) maxcount_0_2_indice=!C deg3=((180./nbins)*maxcount_0_2_indice)-90 deg4=((180./nbins)*(maxcount_0_2_indice+1))-90 maxcounts_0_3=max(d[*,2]) maxcount_0_3_indice=!C deg5=((180./nbins)*maxcount_0_3_indice)-90 deg6=((180./nbins)*(maxcount_0_3_indice+1))-90 print,'PAS0' print,'Energy Level (keV) Maximum average electron counts per second Latitude range (degrees)' print,' ____________________________________________________________________________________________' print,' 30<100 ',maxcounts_0_1,' ',deg1,' to',deg2 print,' 100<300 ',maxcounts_0_2,' ',deg3,' to',deg4 print,' 300< ',maxcounts_0_3,' ',deg5,' to',deg6 maxcounts_0=max(d) colorbar,ncolors=255,position = [0.1,0.95,0.95,0.98],charsize=3,$ xticks=4,tickname=[fix(0),fix(maxcounts_0/4),maxcounts_0/2,3*maxcounts_0/4,maxcounts_0] xyouts,1000,677,'Average Electron Counts per Second',charsize=1.5,/device pas90_data=fltarr(5400,3) pas90_data[*,0]=reform(data(26,*)) ;row1: 3rd energy level pas90_data[*,1]=reform((data(25,*))-(data(26,*))) ;row2: 2nd energy level pas90_data[*,2]=reform((data(24,*))-(data(25,*))) ;row3: 1st energy level h=fltarr(1,3) m=fltarr(nbins,3) for j=0, (nbins-1) do begin $ f= where((folat ge u[j,0]) and (folat lt u[j+1,0]), na) & $ if (na gt 0) then begin g=fltarr(na,3) for i=0, (na-1) do begin $ g[i,0]=pas90_data[f[i,0],0] g[i,1]=pas90_data[f[i,0],1] g[i,2]=pas90_data[f[i,0],2] endfor endif else begin g = fltarr(1,3) g[0,0]=0 g[0,1]=0 g[0,2]=0 endelse h[0,0]=total(g[*,0]) h[0,1]=total(g[*,1]) h[0,2]=total(g[*,2]) if (na gt 0) then begin m[j,2]=float(h[0,0])/na m[j,1]=float(h[0,1])/na m[j,0]=float(h[0,2])/na endif else begin m[j,0]=0 m[j,1]=0 m[j,2]=0 endelse endfor loadct,2,ncolors=255 !p.multi=[2,1,4] plot_image,m,position = [0.15,0.38,0.95,0.53],$ ytitle='Energy (keV)',$ xtitle='Latitude (degrees)',$ Title='90 Degree Telescope',$ charsize=3,$ yticks=6,$ ytickname=[' ','30<100',' ','100<300',' ','300<',' '],$ xticks=4,$ xtickname=['-90','-45','0','45','90'] maxcounts_90_1=max(m[*,0]) maxcount_90_1_indice=!C deg7=((180./nbins)*maxcount_90_1_indice)-90 deg8=((180./nbins)*(maxcount_90_1_indice+1))-90 maxcounts_90_2=max(m[*,1]) maxcount_90_2_indice=!C deg9=((180./nbins)*maxcount_90_2_indice)-90 deg10=((180./nbins)*(maxcount_90_2_indice+1))-90 maxcounts_90_3=max(m[*,2]) maxcount_90_3_indice=!C deg11=((180./nbins)*maxcount_90_3_indice)-90 deg12=((180./nbins)*(maxcount_90_3_indice+1))-90 print,'PAS90' print,'Energy Level (keV) Maximum average electron counts per second Latitude range (degrees)' print,' ____________________________________________________________________________________________' print,' 30<100 ',maxcounts_90_1,' ',deg7,' to',deg8 print,' 100<300 ',maxcounts_90_2,' ',deg9,' to',deg10 print,' 300< ',maxcounts_90_3,' ',deg11,' to',deg12 maxcounts_90=max(m) colorbar,ncolors=255,position = [0.1,0.6,0.95,0.63], charsize=3,$ xticks=4,tickname=[0,maxcounts_90/4,maxcounts_90/2,3*maxcounts_90/4,maxcounts_90] xyouts, 1000,415,'Average Electron Counts per Second',charsize=1.5,/device pas0=(data(13,*)) ;pitch angle for 0 degree telescope pas90=(data(14,*)) ;pitch angle for 90 degree telescope !p.multi=[1,1,3] plot, folat, pas0,position = [0.15,0.08,0.95,0.26],color=255,$ ytitle='Pitch Angle (degrees)',$ xtitle='Latitude (degrees)',$ Title='Latitude vs. Pitch Angle',$ charsize=3,$ yrange=[0,180],$ ystyle=1,$ xrange=[-90,90],$ xstyle=1,$ yticks=4,$ xticks=4 oplot, folat, pas90, color=80 xyouts, 215,80,'White- PAS 0',charsize=1.5,/device xyouts, 215,65,'Red- PAS 90',charsize=1.5,/device end