[Thread Prev][Thread Next][Index]

Re: Discrepancy between @ave and @sbx?



Hi Nevin,
	The difference between your @ave and @sbx results is due to
how each handles missing data.  For @ave the average is calculated
for each location using whatever non-missing values are present.
There will be no holes unless the entire series is missing at a
point.
	For @sbx on the other hand there will be holes anywhere there
is at least one missing value in the range of the boxcar average.

Example: Look at the following function

let r=((i-25)^2+(j-25)^2)^0.5  ! define radial distance from (25,25)
let v0 = r^0.5 + L             ! no missing values so far
let v1 = if(r eq 0 and L eq 3)then 9999 else v0 
set var/bad=9999 v1            ! put a hole at (25,25) in 3rd frame
region/i=1:51/j=1:51
repeat/l=1:5 fill v1           ! notice the hole

! now compare the @ave and @sbx results
set view left ; fill v1[l=1:5@ave] ! no holes - @ave use good values only
set view right ; fill/l=3 v1[l=1:5@sbx] ! a hole appears because the
                                        ! series at (25,25) is incomplete

Happy ferreting and best wishes for grad school. Mick

|--****--****-*---*---***--***--|____spillane@pmel.noaa.gov____|
|-*__---*-----*--*-*--*--*-*--*-|_SCIENCE APPLICATIONS SUPPORT_|
|--***--*-----*-*---*-***--***--|____EPIC/Ferret/PlotPlus______|
|-----*-*-----*-*****-*----*----|__Room 2070 Bldg#3 NOAA/PMEL__|
|-****---****-*-*---*-*----*----|____Phone_:_(206)526-6780_____|



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement