;+ ; NAME: ; qLine_Read ; PURPOSE: ; Reads a binary file and loads stored curves back into qLine ; CATEGORY: ; Widget qLine ; CALLING SEQUENCE: PRO qLine_Read, state ; INPUTS: ; state array[1]; type: structure ; qLine state structure ; OUTPUTS: ; (sends event to display curves) ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; bin_read, qLine_Structure ; PROCEDURE: ; The binary file was presumably written using the 'Write' button in the qLine widget. ; The file is read using ; x = bin_read(file, /header) ; x[0,* ] becomes the x-axis ; x[1:*,*] become the seperate curves ; Once the file is read a QPLOT_STRUCTURE event is set up and send on its way to ; create the qLine display. ; MODIFICATION HISTORY: ; FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- file = dialog_pickfile(/read, file='qplot.pph', path=getenv('TUB')) IF file NE '' THEN BEGIN status = bin_read(file, yy) state.n = (size(yy))[1] < state.nmax *state.y = yy ymin = fltarr(state.n) & FOR i=0,state.n-1 DO ymin[i] = min(yy[i,*], /nan) ymax = fltarr(state.n) & FOR i=0,state.n-1 DO ymax[i] = max(yy[i,*], /nan) CASE widget_info(state.wid_xbase, /valid) OF 0B: widget_control, state.wid_top , send_event=qLine_Structure(state,isx=0,ymin=ymin,ymax=ymax) 1B: widget_control, state.wid_xbase, send_event=qLine_Structure(state,isx=0,ymin=ymin,ymax=ymax) ENDCASE ENDIF RETURN & END