[GRASS-SVN] r57906 - grass-addons/grass7/raster/r.fidimo
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 1 08:01:03 PDT 2013
Author: jradinger
Date: 2013-10-01 08:01:03 -0700 (Tue, 01 Oct 2013)
New Revision: 57906
Modified:
grass-addons/grass7/raster/r.fidimo/r.fidimo.py
Log:
Set options/parameter (l, ar, t) to lower case (in contrast to r.fidimo in GRASS6x)
Modified: grass-addons/grass7/raster/r.fidimo/r.fidimo.py
===================================================================
--- grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2013-10-01 14:10:08 UTC (rev 57905)
+++ grass-addons/grass7/raster/r.fidimo/r.fidimo.py 2013-10-01 15:01:03 UTC (rev 57906)
@@ -75,7 +75,7 @@
#% guisection: Dispersal parameters
#%End
#%Option
-#% key: L
+#% key: l
#% type: integer
#% required: no
#% multiple: no
@@ -84,7 +84,7 @@
#% options: 39-810
#%End
#%Option
-#% key: AR
+#% key: ar
#% type: double
#% required: no
#% multiple: no
@@ -92,7 +92,7 @@
#% guisection: Dispersal parameters
#%End
#%Option
-#% key: T
+#% key: t
#% type: integer
#% required: no
#% multiple: no
@@ -301,16 +301,16 @@
fm = importr('fishmove')
#Dispersal parameter input
- if str(options['species']!="Custom species") and (options['L'] or options['AR']):
- grass.message(_("Species settings will be overwritten with L and AR"))
+ if str(options['species']!="Custom species") and (options['l'] or options['ar']):
+ grass.message(_("Species settings will be overwritten with l and ar"))
species = str(options['species'])
- if options['L']:
- L = float(options['L'])
- if options['AR']:
- AR = float(options['AR'])
- T = float(options['T'])
+ if options['l']:
+ l = float(options['l'])
+ if options['ar']:
+ ar = float(options['ar'])
+ t = float(options['t'])
# Setting Stream order to a vector of 1:9 and calculate fishmove for all streamorders at once
- SO = robjects.IntVector((1,2,3,4,5,6,7,8,9))
+ so = robjects.IntVector((1,2,3,4,5,6,7,8,9))
m = 0 # m-parameter in dispersal function
if (float(options['p']) >= 0 and float(options['p']) < 1):
p =float(options['p'])
@@ -326,9 +326,9 @@
seed = ""
if species == "Custom species":
- fishmove = eval("fm.fishmove(L=L,AR=AR,SO=SO,T=T,interval=interval,rep=200%s)"%(seed))
+ fishmove = eval("fm.fishmove(L=l,AR=ar,SO=so,T=t,interval=interval,rep=200%s)"%(seed))
else:
- fishmove = eval("fm.fishmove(L=L,AR=AR,SO=SO,T=T,interval=interval,rep=200%s)"%(seed))
+ fishmove = eval("fm.fishmove(L=l,AR=ar,SO=so,T=t,interval=interval,rep=200%s)"%(seed))
# using only part of fishmove results (only regression coeffients)
More information about the grass-commit
mailing list