[GRASS-SVN] r64479 - grass-addons/grass7/raster/r.mess

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Feb 6 04:07:14 PST 2015


Author: pvanbosgeo
Date: 2015-02-06 04:07:14 -0800 (Fri, 06 Feb 2015)
New Revision: 64479

Modified:
   grass-addons/grass7/raster/r.mess/r.mess.html
   grass-addons/grass7/raster/r.mess/r.mess.py
Log:
replace mean(IES) with sum(IES)

Modified: grass-addons/grass7/raster/r.mess/r.mess.html
===================================================================
--- grass-addons/grass7/raster/r.mess/r.mess.html	2015-02-06 10:30:41 UTC (rev 64478)
+++ grass-addons/grass7/raster/r.mess/r.mess.html	2015-02-06 12:07:14 UTC (rev 64479)
@@ -19,7 +19,7 @@
 <ul>
     <li>the area where for at least one of the variables has a value that falls outside the range of values found in the reference set</li>
     <li>the most dissimilar variable (MoD)</li> 
-    <li>the mean of the IES layers where IES < 0</li>
+    <li>the sum of the IES layers where IES < 0</li>
     <li>the number of layers with negative values</li>
 </ul>
 
@@ -34,14 +34,14 @@
 (env_old) and a set of future environmnental variables (env_new). 
 This is for example used to identify areas with novel future climates.
 
-<p>One can also test for the similarity between two different areas. 
-For this one needs to provide a set of environmental variables 
-(env_old) and a reference layer (ref_rast) for one region and a 
-second set of environmental variables for another region (env_new). 
+<p>It is also possible to test for the similarity between two 
+different areas. In this case you need to provide a set of 
+environmental variables (env_old) for the area covered by your 
+reference layer and a second set of environmental variables for the 
+area you want to compare to (env_new). Make sure the region 
+(g.region) is set to the reference layer / env_old. 
 
-
-<h2>REFERENCES</h2>
-<p>Elith, J., Kearney, M., & Phillips, S. 
+<h2>REFERENCES</h2> <p>Elith, J., Kearney, M., & Phillips, S. 
 2010. The art of modelling range-shifting species. Methods in 
 Ecology and Evolution 1:330-342.
 

Modified: grass-addons/grass7/raster/r.mess/r.mess.py
===================================================================
--- grass-addons/grass7/raster/r.mess/r.mess.py	2015-02-06 10:30:41 UTC (rev 64478)
+++ grass-addons/grass7/raster/r.mess/r.mess.py	2015-02-06 12:07:14 UTC (rev 64479)
@@ -105,7 +105,7 @@
 
 #%flag
 #% key: k
-#% description: mean(IES), where IES < 0
+#% description: sum(IES), where IES < 0
 #% guisection: Output
 #%end
 
@@ -467,14 +467,14 @@
         grass.run_command("r.category", quiet=True, map=mod, rules=tmpcat[1], separator=":")
         os.remove(tmpcat[1])
 
-    # mean(IES), where IES < 0
+    # sum(IES), where IES < 0
     if flk:
         MinMes = grass.read_command("r.info", quiet=True, flags="r", map=opc)
         MinMes = str.splitlines(MinMes)
         MinMes = float(np.hstack([i.split('=') for i in MinMes])[1])
-        mod = opc + "MeanNeg"
+        mod = opc + "SumNeg"
         c0 = -0.01/digits2
-        grass.run_command("r.series", quiet=True, input=ipi, output=mod, method="average", range=(MinMes,c0))
+        grass.run_command("r.series", quiet=True, input=ipi, output=mod, method="sum", range=(MinMes,c0))
         grass.run_command("r.colors", quiet=True, map=mod, col="ryg")
 
     # Number of layers with negative values



More information about the grass-commit mailing list