List of Routines By Functionality | MISR Toolkit: Main Page
-Abstract
MTK_SMOOTH_DATA Smooths the given array with a boxcar average
-Copyright
Copyright (2013), California Institute of Technology.
U.S. Government sponsorship acknowledged.
-I/O
Given:
srcbuf source data
src_mask source mask
width_line line width of smoothing window
width_sample sample width of smoothing window
the call:
status = MTK_SMOOTH_DATA( srcbuf, src_mask, width_line, width_sample, smoothed )
returns:
status 0 on success; otherwise failure
smoothed smoothed data
-Examples
;;
;; Set up input parameters
;;
filename = '../Mtk_testdata/in/MISR_AM1_AGP_P039_F01_24.hdf'
gridname = 'Standard'
fieldname = 'AveSceneElev'
path = 39
start_block = 50
end_block = 52
width_line = 11
width_sample = 11
status = MTK_SETREGION_BY_PATH_BLOCKRANGE( path, start_block, end_block, region )
status = MTK_READDATA( filename, gridname, fieldname, region, srcbuf, mapinfo )
srcbuf = float(srcbuf)
src_mask = byte(replicate(1,528,384))
;;
;; The call
;;
status = MTK_SMOOTH_DATA( srcbuf, src_mask, width_line, width_sample, smoothed )
;;
;; Output...
;;
print, '================================================='
print, stddev(srcbuf), stddev(smoothed)
IDL outputs:
=================================================
272.017 256.288
-Particulars
None.
-Required Reading
For important details concerning this module's function, please refer to
the MTK routine MtkSmoothData.c.
-Version
-IDL-MTK Version 1.2.4