[GRASS-SVN] r65064 - grass-addons/grass7/raster/r.meb
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 15 13:35:03 PDT 2015
Author: pvanbosgeo
Date: 2015-04-15 13:35:03 -0700 (Wed, 15 Apr 2015)
New Revision: 65064
Modified:
grass-addons/grass7/raster/r.meb/r.meb.html
grass-addons/grass7/raster/r.meb/r.meb.py
Log:
add example to manual page and corrected bug in computation MES
Modified: grass-addons/grass7/raster/r.meb/r.meb.html
===================================================================
--- grass-addons/grass7/raster/r.meb/r.meb.html 2015-04-15 16:11:50 UTC (rev 65063)
+++ grass-addons/grass7/raster/r.meb/r.meb.html 2015-04-15 20:35:03 UTC (rev 65064)
@@ -60,22 +60,23 @@
gives the distribution of forest (1) and other land cover types (0).
As environmental variables, the bio1, bio3 and bio9 are used.
-<div class="code"><pre>r.meb -m -n -o env=bio_1,bio_3,bio_9
-ref=forestmap output=test file=test.csv
-Median test_MES_mean (all region) = 51.257
-Median test_MES_mean (ref. area) = 30.919
-MAD test_MES_mean (all region) = 24.272
-EB = 0.838
-Median test_MES_median (all region) = 51.257
-Median test_MES_median (ref. area) = 30.919
-MAD test_MES_median (all region) = 24.272
-EB = 0.838
-Median test_MES_minimum (all region) = 43.651
-Median test_MES_minimum (ref. area) = 24.735
-MAD test_MES_minimum (all region) = 22.685
-EB = 0.834
+<div class="code"><pre>r.meb -m -n -o env=bio_1,bio_3,bio_9 ref=forestmap output=Test file=Test
+Median Test_MES_mean (all region) = 47.338
+Median Test_MES_mean (ref. area) = 69.798
+MAD Test_MES_mean (all region) = 14.594
+EB = 1.539
-The results are written to test.csv
+Median Test_MES_median (all region) = 45.712
+Median Test_MES_median (ref. area) = 69.897
+MAD Test_MES_median (all region) = 18.786
+EB = 1.287
+
+Median Test_MES_minimum (all region) = 20.364
+Median Test_MES_minimum (ref. area) = 55.807
+MAD Test_MES_minimum (all region) = 15.096
+EB = 2.348
+
+The results are written to Test.csv
</pre></div>
Modified: grass-addons/grass7/raster/r.meb/r.meb.py
===================================================================
--- grass-addons/grass7/raster/r.meb/r.meb.py 2015-04-15 16:11:50 UTC (rev 65063)
+++ grass-addons/grass7/raster/r.meb/r.meb.py 2015-04-15 20:35:03 UTC (rev 65064)
@@ -114,7 +114,7 @@
#----------------------------------------------------------------------------
#Test
#----------------------------------------------------------------------------
-#options = {"env":"bio1,bio2,bio3,bio4,bio5,bio6,bio7,bio8,bio9,bio10,bio11,bio12,bio13,bio14,bio15,bio16,bio17,bio18,bio19", "file":"biome_test.txt", "ref":"WDPAselect", "output":"biome_test", "digits":"5"}
+#options = {"env":"bio_1 at climate,bio_2 at climate,bio_3 at climate", "file":"test.txt", "ref":"PAs2", "output":"AAA_test", "digits":"5"}
#flags = {"m":True, "n":True, "o":True, "i":True}
#----------------------------------------------------------------------------
@@ -307,7 +307,7 @@
# Create recode rules
e1 = np.min(np.array(sstval), axis=0)[0] - 99999
- e2 = np.max(np.array(sstval), axis=0)[0] - 99999
+ e2 = np.max(np.array(sstval), axis=0)[0] + 99999
a1 = np.hstack([(e1), np.array(sstval.T[0])[0, :]])
a2 = np.hstack([np.array(sstval.T[0])[0,:] -1, (e2)])
b1 = np.hstack([(0), c])
@@ -382,9 +382,6 @@
writer.writerow({'variable':'MES_mean', 'median_region':ebm[0],
'median_reference':ebm[1],'mad':ebm[2],'eb':ebm[3]})
if flag_n:
- writer.writerow({'variable':'MES_mean','median_region':ebm[0],
- 'median_reference':ebm[1], 'mad':ebm[2],'eb':ebm[3]})
- if flag_n:
writer.writerow({'variable':'MES_median', 'median_region':ebn[0],
'median_reference':ebn[1], 'mad':ebn[2],'eb':ebn[3]})
if flag_o:
More information about the grass-commit
mailing list