[GRASS-SVN] r59353 - grass/trunk/scripts/i.oif
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Mar 26 04:11:46 PDT 2014
Author: lucadelu
Date: 2014-03-26 04:11:46 -0700 (Wed, 26 Mar 2014)
New Revision: 59353
Modified:
grass/trunk/scripts/i.oif/i.oif.py
Log:
i.oif: check the number of input maps (minimum should be 4), update messages
Modified: grass/trunk/scripts/i.oif/i.oif.py
===================================================================
--- grass/trunk/scripts/i.oif/i.oif.py 2014-03-26 11:01:09 UTC (rev 59352)
+++ grass/trunk/scripts/i.oif/i.oif.py 2014-03-26 11:11:46 UTC (rev 59353)
@@ -73,9 +73,13 @@
shell = flags['g']
serial = flags['s']
bands = options['input'].split(',')
+
+ if len(bands) < 4:
+ grass.fatal(_("At least four input maps required"))
+
output = options['output']
# calculate the Stddev for TM bands
- grass.message(_("Calculating Standard deviations for all bands..."))
+ grass.message(_("Calculating standard deviations for all bands..."))
stddev = {}
if serial:
@@ -134,12 +138,12 @@
oif.sort(reverse=True)
grass.verbose(_("The Optimum Index Factor analysis result " \
- "(Best combination comes first):"))
+ "(best combination shown first):"))
if shell:
- fmt = "%s%s%s:%.4f\n"
+ fmt = "%s,%s,%s:%.4f\n"
else:
- fmt = "%s%s%s: %.4f\n"
+ fmt = "%s, %s, %s: %.4f\n"
if not output or output == '-':
for v, p in oif:
More information about the grass-commit
mailing list