;+ ; NAME: ; qvu_pick ; PURPOSE: ; Selects and reads tomography data files ; CATEGORY: ; Widget qvu ; CALLING SEQUENCE: PRO qvu_pick, state, event ; INPUTS: ; state array[1]; type: structure ; qvu state structure ; OPTIONAL INPUT PARAMETERS: ; type=type scalar; type: string ; 3-char type to be used as file name extension (bmp, eps, gif) ; /pick if set then the IDL pickfile dialog is used to let user set ; keyword 'type' takes precedence over /pick ; OUTPUTS: ; (none) ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; vu_getdata, GetFileSpec, boost, destroyvar, Carrington ; PROCEDURE: ; MODIFICATION HISTORY: ; SEP-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- widget_control, state.wid_path, get_value=path ;filter = widget_info(state.wid_type, /droplist_select) ;filter = state.type_list[filter]+'*.*' filter = 'nv*.*' utt = vu_getdata(hdr, ff, count=count, path=path, filter=filter, $ bfield='wson', bhdr=bhdr, bff=bff, bcount=bcount) bcount = count GT 0 AND bcount EQ count IF bcount THEN BEGIN boost, ff, pushdim=3, plus=2 ff[*,*,*,2:3,*] = bff hdr = [ [hdr], [bhdr] ] ENDIF destroyvar, bhdr, bff state.count = count IF count NE 0 THEN BEGIN type = strlowcase( strmid( GetFileSpec(vu_get(hdr[0,0], /file), from='name'), 0,2) ) CASE bcount OF 0: BEGIN CASE type EQ 'nv' OF 0: widget_control, state.wid_index, set_value=state.bb_list 1: widget_control, state.wid_index, set_value=state.nv_list ENDCASE END 1: widget_control, state.wid_index, set_value=[state.nv_list,state.bb_list] ENDCASE tmp = vu_get(hdr[*,0], /all_radii) rmax = max(tmp) tmp = Carrington(vu_get(hdr[*,0], /uttime)) tmin = min(tmp) tmax = max(tmp) widget_control, state.wid_pick, set_uvalue=hdr, /no_copy widget_control, state.wid_path, set_uvalue=ff , /no_copy widget_control, state.wid_pole_rad, get_value=r r = [r[0],-rmax,rmax,r[3]] widget_control, state.wid_pole_rad, set_value=r, set_uvalue=r widget_control, state.wid_pole_tim, get_value=r r = [r[0], tmin,tmax, r[3]] widget_control, state.wid_pole_tim, set_value=r, set_uvalue=r ENDIF RETURN & END