; ;========================================================================== ; ; FILE: ufdata.pro ; ; USAGE: UFdata, ufbuf, field, data, ngates, ERROR=error ; ARGUMENTS ufbuf Buffer of UF words for a dwell of radar data ; field Logical number of the data field ; data Vector of scaled data in physical units ; ngates Number of range gates in data-vectory ; ERROR Optional return status ; 0 = Success, Nonzero = Error ; ; ABSTRACT: Extract and return scaled data in physical units from the UF ; dwell buffer for the Nth data field ; ; AUTHOR: I. Jeff Caylor ; Science Systems and Applications, Inc. ; 5900 Princess Garden Parkway, Suite 300 ; Lanham, MD 20706 ; ; at: NASA Goddard Space Flight Center ; Code 912 ; Greenbelt, MD 20771 ; Voice: (301) 286-3767 ; Fax: (301) 286-1762 ; Email: jeff.caylor@gsfc.nasa.gov ; ; CREATED: 7 April 1995 ; ; MODIFIED: 12 April 1995 - IJC ; Changed scale from multiply to divide ; 4 April 1996 - IJC ; Added test for number of gates exceeding dwell size ; ;========================================================================== ; ; ; Extract scaled data from the specified field ; ERROR = 0 if successful, nozero otherwise ; PRO UFdata, dwell, field, data, ngates, ERROR=error error = -1 dindex = UFdataseg(dwell, field) IF (dindex NE -1) THEN BEGIN ngates = UFgates(dwell, field) data = FLTARR(ngates) IF dindex + ngates LE N_ELEMENTS(dwell) THEN BEGIN data = dwell(dindex : dindex + ngates - 1) / UFdatascale(dwell, field) error = 0 ENDIF ENDIF RETURN END