function get_scan_type,raw_file,scan_type ; ; *** Program to open an RS-supported radar file and create a ; *** UF file with specified fields. ; COMMON misc,TRUE,FALSE !QUIET=1 TRUE=1 & FALSE=0 ; ; *** Load file into rsl_in_idl ; radar = rsl_anyformat_to_radar(raw_file,error=error,/keep,/catch,/quiet) if(error) then begin flag = 'Error reading file: ' + raw_file return,flag endif ; ; *** Check to see if a structure was returned. ; a = size(radar,/type) if(a ne 8) then begin flag = 'No structure returned: ' + raw_file return,flag endif ; ; *** Get the scan type. ; scan_type = radar.h.scan_mode return,'OK' stop end