;finds plots area vs. time from text file checkvar, ps, 0 initialize, ps ;reads ascii file and returns it as a text array c = rd_ascii('flux_output_april21_12-25_c50_changes_removed_noholes.txt') ;removes top line which was: ;box date stime etime flux area centr peak st.dev peak.val Elow Ehi detectors c = c[1:*] ;makes 1 line string two rows b = str2cols(c) b = strcompress(b,/remove_all) ;changes the dims of array (does not change number of elements) ;box is all the box numbers box = fix(reform(b[0,*])) ;area in arcsec^2 areas = float(reform(b[5,*])) q = where(box eq 0) ;q=lines where box=0 (0,25...) b0 = b[*,q] ;b0=all full lines where box=0 ;all boxs are now 0 box = (box[q]) ;areas with box number 0 areas = (areas[q]) box = fix(reform(b0[0,*])) areas = float(reform(b0[5,*])) areas = areas * 72500000.^2 ;print,b0[*,0] ;prints all columns first row ; 0 21-Apr-2002 00:40:00.000 00:40:20.000 0.20812 1216.00 1051.61 -246.67 1048.77 -259.32 9.37 18.96 ; 0.00029369 12.000 25.000 4F 5F 6F 7F 8F ;print,b0[1,*] ;prints second column and all rows in that column which are the dates ;print,b[2,*] ;start times ;print,b[3,*] ; end times ;start times = date start time ;b0[1,*] = date statimes = reform(b0[1,*] + ' ' + b0[2,*]) ;print, stimes ;dates and start time ;end times = date end time endtimes=reform(b0[1,*] + ' ' + b0[3,*]) ;print, etimes ;dates and end time ;turns stimes into seconds stime_sec = anytim(reform(statimes)) etime_sec = anytim(reform(endtimes)) ;help,stime_sec ;STIME_SEC DOUBLE = Array[1, 327] ;print,stime_sec ;7.3535280e+008..... ;print,anytim(stime_sec,/vms) ;21-Apr-2002 00:40:00.000 ;print,anytim(stime_sec,/ecs) ;2002/04/21 00:40:00.000 tarr = (stime_sec + etime_sec)/2. ; Time range to plot s = 0 & e = n_elements(tarr) - 1 ;stime = anytim(tarr(s),/vms) ;etime = anytim(tarr(e),/vms) utb = min(tarr) ;create plot utplot, tarr(s:e)-utb, areas(s:e), utb, ytitle = 'area in cm!u2!n', title=' Area vs. Time 12-25 keV ', $ position=[0.15,0.10,0.95,0.90],xstyle=1 if ps gt 0 then device,/close set_plot,'win' end