[GRASSLIST:4518] Re: filter out extrem values

Gordon Keith gordon.keith at csiro.au
Tue Sep 17 02:24:35 EDT 2002


On Tue, 17 Sep 2002 10:04, Gordon Keith wrote:
> On Mon, 16 Sep 2002 21:45, Malte Martin wrote:
> > Hi!
> >
> > I got 35000 points where I measured the depths of a lake. Now I
> > have to filter out the extrem values (maybe by moving average?).

> I'd love to have a median option in s.to.rast but haven't got around
> to anything like that yet (a lot more work that the above methods). A
> combination of s.windavg and s.univar would be nice. I haven't looked
> at the code for either yet, I doubt they are easy to combine.

I was wrong, it isn't too hard to combine them. 

I now have a version of s.univar that has an option to generate a site 
file with one site for each cell in the current region (as per 
s.windavg) each site having 13 attributes (from univar): mean, count, 
standard deviation, coefficient of variation, skewness, kurtosis, mean 
of squares, mean of absolute values, minimum, first quartile, median, 
third quartile and maximum.

> s.univar --help

Description:
 Univariate statistics for a GRASS sites list.

Usage:
 s.univar [-asgqz] sites=name [field=value] [output=name]

Flags:
  -a   Use all sites (do not limit to current region)
  -s   Generate stats for each cell in region
  -g   Print the stats in shell script style
  -q   Quiet
  -z   Suppress windows with zero averages (forces -s)

Parameters:
   sites   name of a sites file to be input
   field   which decimal attribute (if multiple)
           default: 1
  output   sites list to store results (forces -s)

It's extremely slow. 

If anyone's interested I can send them a copy.

Regards
Gordon

-- 

Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au

"But what... is it good for?"
- Engineer at Advanced Computing Systems Division of IBM, 1968,
commenting on the role of the microchip.



More information about the grass-user mailing list