[GRASS-user] Re: Calculating standard error of many maps?
Glynn Clements
glynn at gclements.plus.com
Wed Feb 11 05:08:02 EST 2009
Hamish wrote:
> > I am trying it at the moment with 1002 maps and, apart from the fact
> > that it takes some time (which I am sure it would in GRASS as well),
> > it seems to be working.
> >
> > I will be looking at R.series again later, when I run the simulations
> > again. But I assume that there will be serious problems with 25000
> > maps - I might have to do it with a sample of maps.
>
> Hi,
>
> for the standard stats available from r.univar
> n
> minimum
> maximum
> range
> mean
> mean of absolute values
> standard deviation
> variance
> variation coefficient
> sum
>
> (ie not median, quartiles) you can use r.series in a loop, eg 1000 maps
> at a time, and then sum up the resulting 25 summary maps before doing a
> little math to get the overall answers. (or lots of 100 maps x250, ...)
>
> I think you would need to add a new sum_of_squares method to r.series
> to calculate variance/stdev. see r.univar/stats.c print_stats()
Or 25000 runs of
r.mapcalc "$map.sq = $map^2"
I can add sum of squares/cubes/etc to r.series easily enough if there
is a use for them.
Regarding command-line limits: is it worth extending G_parser() to
allow arguments to be read from a file? E.g. "r.series @args.txt".
It was quite common for this feature to be added to DOS ports of Unix
programs, as DOS had a much lower limit than Unix on the maximum
length of a command line.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list