pro rsl_plotsweep_from_radar, radar, elevation=elevation, field=field, $ sweep_index=sweepindex, volume_index=volume_index, $ _EXTRA=keywords ; Extracts a sweep from radar and calls rsl_plotsweep to plot radar image. ; If elevation or sweep is not specified, the base scan is used by default. ; ; Syntax: ; rsl_plotsweep_from_radar, radar [, ELEVATION=elevation] [, FIELD=field] ; [, SWEEP_INDEX=sweepindex] [, VOLUME_INDEX=volume_index] ; [, rsl_plotsweep keywords] ; ; Inputs: ; radar: a radar structure. ; ; Keyword parameters: ; ELEVATION: Elevation angle of the sweep to be plotted. If omitted, ; SWEEP_INDEX is used if given, otherwise base scan is used. ; FIELD: A string identifying the radar field to select, for example, ; 'DZ'. If omitted, and VOLUME_INDEX does not have a value, the ; first field in the volume structure is used. If FIELD and ; VOLUME_INDEX both have values, the value of FIELD is used. ; SWEEP_INDEX: Index of sweep to be plotted, where zero is the base scan ; (default). If both ELEVATION and SWEEP_INDEX are given, ; ELEVATION is used. ; VOLUME_INDEX: The index number of volume (0 to nvols-1) to select. Default ; is index 0. If FIELD has a value, that value is used and ; VOLUME_INDEX is ignored. ; rsl_plotsweep keywords: ; Keywords to be passed to rsl_plotsweep procedure. ; See rsl_plotsweep.pro for descriptions. ; ; Written by: Bart Kelley, GMU, May 2002 ;*********************************************************************** on_error, 2 ; On error, return to caller. volume_id = 0 volume = -1 sweep = -1 if keyword_set(volume_index) then volume_id = volume_index if keyword_set(field) then volume_id = field if radar.h.scan_mode ne 'RHI' then begin volume = rsl_get_volume(radar, volume_id) if size(volume,/n_dimensions) gt 0 then $ sweep = rsl_get_sweep(volume, elevation, sweep_index=sweepindex) if size(sweep,/n_dimensions) gt 0 then $ rsl_plotsweep, sweep, radar.h, _EXTRA=keywords endif else rsl_plotrhi, radar, field, _EXTRA=keywords end