[GRASS-SVN] r29904 - grass/trunk/raster/r.univar2
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 30 17:49:20 EST 2008
Author: hamish
Date: 2008-01-30 17:49:20 -0500 (Wed, 30 Jan 2008)
New Revision: 29904
Modified:
grass/trunk/raster/r.univar2/r.univar_main.c
grass/trunk/raster/r.univar2/r3.univar_main.c
grass/trunk/raster/r.univar2/stats.c
Log:
don't skip 1st quartile, median, 3rd quartile if the user requested them explicitly
Modified: grass/trunk/raster/r.univar2/r.univar_main.c
===================================================================
--- grass/trunk/raster/r.univar2/r.univar_main.c 2008-01-30 22:36:14 UTC (rev 29903)
+++ grass/trunk/raster/r.univar2/r.univar_main.c 2008-01-30 22:49:20 UTC (rev 29904)
@@ -77,8 +77,7 @@
module = G_define_module();
module->keywords = _("raster, statistics");
module->description =
- _
- ("Calculates univariate statistics from the non-null cells of a raster map.");
+ _("Calculates univariate statistics from the non-null cells of a raster map.");
/* Define the different options */
set_params();
Modified: grass/trunk/raster/r.univar2/r3.univar_main.c
===================================================================
--- grass/trunk/raster/r.univar2/r3.univar_main.c 2008-01-30 22:36:14 UTC (rev 29903)
+++ grass/trunk/raster/r.univar2/r3.univar_main.c 2008-01-30 22:49:20 UTC (rev 29904)
@@ -77,8 +77,7 @@
module = G_define_module();
module->keywords = _("raster3d, statistics");
module->description =
- _
- ("Calculates univariate statistics from the non-null 3d cells of a raster3d map.");
+ _("Calculates univariate statistics from the non-null 3d cells of a raster3d map.");
/* Define the different options */
set_params();
Modified: grass/trunk/raster/r.univar2/stats.c
===================================================================
--- grass/trunk/raster/r.univar2/stats.c 2008-01-30 22:36:14 UTC (rev 29903)
+++ grass/trunk/raster/r.univar2/stats.c 2008-01-30 22:49:20 UTC (rev 29904)
@@ -200,12 +200,6 @@
fprintf(stdout, "median=%g\n", median);
fprintf(stdout, "third_quartile=%g\n", quartile_75);
for (i = 0; i < stats->n_perc; i++) {
- if (stats->perc[i] == 25 ||
- stats->perc[i] == 50 ||
- stats->perc[i] == 75) {
- /* skip 1st quartile, median, 3rd quartile */
- continue;
- }
fprintf(stdout, "percentile_%d=%g\n", stats->perc[i], quartile_perc[i]);
}
}
@@ -219,12 +213,6 @@
for (i = 0; i < stats->n_perc; i++) {
- if (stats->perc[i] == 25 ||
- stats->perc[i] == 50 ||
- stats->perc[i] == 75) {
- /* skip 1st quartile, median, 3rd quartile */
- continue;
- }
if (stats->perc[i] % 10 == 1 && stats->perc[i] != 11)
fprintf(stdout, "%dst percentile: %g\n", stats->perc[i],
quartile_perc[i]);
More information about the grass-commit
mailing list