pro analysis @varld.cb common ANALYSIS_BLOCK,filename,ranfilename,prog common GUI_BLOCK prog=intarr(2) top=widget_base(/column,title='Data Analysis Window',xoffset=250,yoffset=250) filename=cw_field(top,title='Data File Name:',value=outfilenorm) loadb=widget_button(top,value='Load File',uvalue=1) ranfilename=cw_field(top,title='Data File Name:',value=outfilerand) loadb2=widget_button(top,value='Load Randomized Data File',uvalue=4) plot1=widget_button(top,value='Map a variable.',uvalue=3) plot3=widget_button(top,value='Examine a Region of Interest',uvalue=7) plot2=widget_button(top,$ value='Compare histograms of normal vs. random data',$ uvalue=5) moment=widget_button(top,value='Moment Analysis of Cube',uvalue=6) renorm=widget_button(top,value='Analyze Renormalized S_0 data.',$ uvalue=8) done=widget_button(top,value='Done.',uvalue=2) widget_control,/realize,top xmanager, 'analysis', top end ;--------------------------------- pro analysis_event,event @varld.cb common ANALYSIS_BLOCK common GUI_BLOCK widget_control, event.id, get_uvalue=buttonpress if (buttonpress eq 1) then begin widget_control,filename,get_value=savefile if (savefile(0) eq '') then begin oops=widget_message('Please enter a filename.') goto,skipout1 endif okay=findfile(savefile(0)) if (okay(0) eq '') then begin ohno=widget_message('File not found.') goto,skipout1 endif restore,file=savefile(0) sz=size(outdata) sx=string(sz(1)) sy=string(sz(2)) sentence=strcompress('SCF Maps are'+sx+' X '+sy+' pixels.') okay=widget_message(['Data Loaded.', sentence],/information) prog(0)=1 progress(5)=0. skipout1: endif if (buttonpress eq 4) then begin if prog(0) ne 1 then begin oops1=widget_message(['Please select the non-randomized',$ 'data cube first.']) goto,skipout2 endif outdata2=outdata fitparams2=fitparams widget_control,ranfilename,get_value=savefile1 if (savefile1(0) eq '') then begin oops=widget_message('Please enter a filename.') goto,skipout2 endif okay=findfile(savefile1(0)) if (okay(0) eq '') then begin ohno=widget_message('File not found.') goto,skipout2 endif restore,file=savefile1(0) outdata1=outdata fitparams1=fitparams outdata=outdata2 fitparams=fitparams2 okay=widget_message(['Randomized Data Loaded.'],/information) prog(1)=1 progress(5)=0. skipout2: endif if (buttonpress eq 3) then begin if prog(0) ne 1 then begin haha=widget_message($ ['You must load a','data cube.']) goto,skipout6 endif ; window,0,xsize=600,ysize=600,title='SCF Maps' ; window,1,title='Histograms',xsize=450,ysize=300 ; window,2,xsize=150,ysize=400,title='Color Bar' wset,0 screenplot skipout6: endif if (buttonpress eq 5) then begin if (prog(1) ne 1) then begin nicetry=widget_message($ ['You must load a','randomized data cube.']) goto,skipout3 endif window,0,title='Histogram Comparison' comphists skipout3: endif if (buttonpress eq 7) then begin if (prog(0) ne 1) then begin nicetry2=widget_message($ ['You must load a data cube.']) goto,skipout10 endif window,1,title='Histograms',xsize=450,ysize=300 exroi skipout10: endif if (buttonpress eq 6) then begin if (prog(0) ne 1) then begin nicetry3=widget_message($ ['You must load a data cube.']) goto,skipout4 endif momentanalysis skipout4: endif if (buttonpress eq 8) then begin if (prog(0) ne 1) then begin nicetry3=widget_message($ ['You must load a data cube.']) goto,skipout9 endif scf0process skipout9: endif if (buttonpress eq 2) then widget_control,event.top,/destroy END