pro CompareInsituSubset, dt, FileRange=FileRange, ut, $ directory = directory, $ delt = delt, $ _extra = _extra, $ from = from, $ hardcopy=hardcopy, $ zbuffer = zbuffer, $ xysize = xysize, $ noplot = noplot, $ nofuture= nofuture, $ label_t = label_t, $ ut_range= ut_range ;+ ; NAME: ; CompareInsituSubset ; PURPOSE: ; Wrapper program to control output from the href=PlotCompareInsitu= program. ; By default output goes to the screen, but can be redirected using /zbuffer and ; /hardcopy keywords. ; CATEGORY: ; WWW ; CALLING SEQUENCE: ; CompareInsituSubset, ut, [parameters] ; INPUTS: ; dt specify time interval to get the desired record ; ; OPTIONAL INPUT PARAMETERS: ; ut array[1]; type: time structure ; if ut is not specified then the time range covers the data in the input file. ; if ut is specified it is used in two ways: ; 1. the time series is centered on time ut[0] (see href=PlotCompareInsitu=) ; 2. if /nofuture is set, only times up to ut are plotted (ut[1] is not used) ; 3. if ut[1] is present only times between ut[0] and ut[1] are plotted ; FileRange array[2]; type: floating point, subset of file pick for analyzing ; FileRange[0]=Starting point of Carrington Rotation #, ; FileRange[2]=Endpoint of Carrington Rotation # ; directory scalar; type: string ; Directory (full pathname) of the files to be compared ; if no directory is given, then '/mnt/work/dat/nagoya/forecast' is the default directory ; xysize=xysize array[2]; type: integer ; size of plot window and z-buffer ; from=from scalar; type: integer ; Identifies the in-situ instrument to be compared with the tomography data ; (use output from function href=Instrument=) ; /zbuffer Write graphics output first to zbuffer, then to GIF file ; /hardcopy Sends output to the default printer ; /noplot Suppress graphics output to screen ; /zbuffer takes precedence over /hardcopy and /noplot ; /hardcopy takes precedence over /noplot ; If neither keyword is used then plot to the current graphics device ; /nofuture plot only data with times prior to ut ; (keyword is ignored if ut is not set) ; ut_range=ut_range array[2]; type: time structure ; if set only data inside ut_range are used ; label_t=label_t scalar; type: string ; label to identify tomography data ; For additional keywords see href=PlotCompareInsitu=. ; OUTPUTS: ; (screen, gif file or hardcopy) ; CALLS: ; ReadEarthFile, InSituTimeseries, Instrument, twin, set_page, PlotCompareInsitu ; OplotCompareInsitu, t3d_zbuffer, spitplot, reset_colors, TimeOp, TimeUnit ; PROCEDURE: ; MODIFICATION HISTORY: ; MAR-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; DEC-2000, Kevin ;- on_error, 2 ; On error, return to caller hardcopy = keyword_set(hardcopy) zbuffer = keyword_set(zbuffer ) nofuture = keyword_set(nofuture) noplot = keyword_set(noplot ) if ReadEarthFileSubset(dt ,tt_tomo, dd_tomo, file, FileRange, directory=directory) then begin cdata = ['vel','den','br','bt', 'bn', 'bb'] ; tt_situ will be identical to tt_tomo if tt_time consist of at least three ; elements and delt>0. If tt_time only has two elements or delt=0, then ; all in situ data between the min and max time in tt_time are extracted. if InSituTimeseries(cdata, tt_tomo, tt_situ, dd_situ, delt=delt, from=from) then begin tt_limit = -1 if nofuture then begin tt_limit = where(TimeOp(/subtract,tt_situ, ut, TimeUnit(/days)) gt 0) if tt_limit[0] ne -1 then dd_situ[tt_limit,*] = BadValue(dd_situ) endif if n_elements(ut_range) ge 2 then begin tt_diff = TimeOp(/subtract,ut_range[1], ut_range[0], TimeUnit(/days)) tt_sign = 2*(tt_diff gt 0)-1 tt_limit = tt_sign*TimeOp(/subtract,tt_situ, ut_range[0], TimeUnit(/days)) tt_diff = tt_sign*tt_diff tt_limit = where(tt_limit lt 0 or tt_limit gt tt_diff) if tt_limit[0] ne -1 then dd_situ[tt_limit,*] = BadValue(dd_situ) endif if n_elements(xysize) eq 0 then xysize = [450,250] if zbuffer then begin ch_size = [!d.x_ch_size, !d.y_ch_size] old_device = !D.name set_plot, 'Z' device, z_buffering = 0, $ ; Forces zbuffer into 2D mode set_character_size = ch_size, $ set_resolution = xysize ; Set size of z-buffer reset_colors endif else if hardcopy then $ set_page, aspect=0.89, xsize=22. $ else if not noplot then $ twin, /show, xs=xysize[0],ys=xysize[1] if not noplot and not hardcopy then loadct, 0 PlotCompareInsitu, tt_tomo, dd_tomo, tt_situ, dd_situ, ut=ut, $ sc_label=Instrument(from, /label), $ labels=label_t, noplot=noplot, _extra=_extra if not noplot and n_elements(file) gt 1 then OplotCompareInsitu, file[1:*], _extra=_extra if zbuffer then begin name = 'compareinsitusubset' if n_elements(file) gt 1 then name = name+'3' t3d_zbuffer, file, name, _extra=_extra set_plot, old_device reset_colors endif else if hardcopy then $ spitplot endif endif return & end