[GRASS-user] i.spectral and gnuplot

Stuart Edwards sedwards2 at cinci.rr.com
Wed Jul 12 10:03:45 EDT 2006


ok -- here's the verbose version (looks like data.dum gets removed  
shortly before it is called for 'paste'):

GRASS 6.1.cvs (locationA):~ > i.spectral raster=AST6,AST7,AST8,AST9 -i
+ test /Applications/GRASS/grass61cvs.app/Contents/Resources/ 
grass-6.1.cvs = ''
+ PARAM_NUM=2
+ '[' raster=AST6,AST7,AST8,AST9 '!=' @ARGS_PARSED@ ']'
+ exec g.parser /Applications/GRASS/grass61cvs.app/Contents/Resources/ 
grass-6.1.cvs/scripts/i.spectral raster=AST6,AST7,AST8,AST9 -i
+ test /Applications/GRASS/grass61cvs.app/Contents/Resources/ 
grass-6.1.cvs = ''
+ PARAM_NUM=1
+ '[' @ARGS_PARSED@ '!=' @ARGS_PARSED@ ']'
++ which /sw/bin/gnuplot -persist
csh: if: Malformed file inquiry.
+ '[' '!' -x /sw/bin/gnuplot ']'
++ which awk
+ '[' '!' -x /usr/bin/awk ']'
+ unset LC_ALL
+ export LC_NUMERIC=C
+ LC_NUMERIC=C
++ g.tempfile pid=1938
+ TMP1=/Users/stu/grassdata/locationA/stu/.tmp/SEsG4iBook.local/1938.0
++ g.tempfile pid=1938
+ TMP2=/Users/stu/grassdata/locationA/stu/.tmp/SEsG4iBook.local/1938.1
+ xlabels=
+ '[' '!' '' ']'
+ '[' 1 -eq 0 ']'
+ '[' 1 -eq 0 ']'
+ RASTERMAPS=
++ echo
++ sed 's+,+ +g'
+ news=
+ as=0
+ NUMBANDS=0
+ rm -f /Users/stu/grassdata/locationA/stu/.tmp/SEsG4iBook.local/1938.1
+ '[' 0 -eq 0 ']'
++ d.mon -L
++ grep -v 'not running'
++ wc -l
++ awk '{print $1}'
+ '[' 3 -eq 2 ']'
+ d.where -1
+ r.what input=

Click mouse button on desired location

              EAST:             NORTH:
  748435.03125      4969971.90625 1
+ cc=0
++ cat /Users/stu/grassdata/locationA/stu/.tmp/SEsG4iBook.local/1938.0
++ sed 's+\*+0+g'
++ sed 's+|+ +g'
+ TT=748435.03125 4969971.90625 1
++ cat /Users/stu/grassdata/locationA/stu/.tmp/SEsG4iBook.local/1938.0
++ wc -l
+ NUMCLICKS=       1
+ START=0
++ cat /Users/stu/grassdata/locationA/stu/.tmp/SEsG4iBook.local/1938.0
++ expr 0 + 1
+ START=1
++ echo '748435.03125|4969971.90625|1'
++ cut '-d|' -f1,2
++ tr '|' ' '
+ COORD[$START]=748435.03125 4969971.90625
++ echo '748435.03125|4969971.90625|1'
++ sed 's+\*+0+g'
++ sed 's+|+ +g'
+ TOT=748435.03125 4969971.90625 1
+ cc=0
++ expr 0 + 1
+ cc=1
+ '[' 1 -gt 3 ']'
++ expr 1 + 1
+ cc=2
+ '[' 2 -gt 3 ']'
++ expr 2 + 1
+ cc=3
+ '[' 3 -gt 3 ']'
+ rm -f /Users/stu/grassdata/locationA/stu/.tmp/SEsG4iBook.local/1938.0
+ NUM=0
++ expr 0 / 1
+ NUM2=0
++ expr 0 + 1
+ NUM2=1
+ rm -f data.dum
+ i=0
+ '[' 0 '!=' 0 ']'
+ r=0
+ '[' 0 '!=' 1 ']'
++ expr 0 + 1
+ r=1
+ paste '-d ' data.dum /Users/stu/grassdata/locationA/stu/.tmp/ 
SEsG4iBook.local/1938.1_1
paste: data.dum: No such file or directory
+ rm -f /Users/stu/grassdata/locationA/stu/.tmp/SEsG4iBook.local/ 
1938.1_1
+ '[' 1 '!=' 1 ']'
++ expr 0 + 1
+ xrange=1
+ echo 'set xtics ()'
+ echo 'set grid'
+ echo 'set title '\''Spectral signatures'\'''
+ echo 'set xrange [0:1]'
+ echo 'set noclabel'
+ echo 'set xlabel '\''Bands'\'''
+ echo 'set ylabel '\''DN Value'\'''
+ echo 'set data style lines'
+ rm -f data.dum
+ i=0
+ str=
+ '[' 0 '!=' 1 ']'
++ expr 0 + 1
+ i=1
+ '[' 1 -eq 1 ']'
+ '[' 0 -eq 0 ']'
+ str=plot 'data_1' title '1'
+ '[' 1 '!=' 1 ']'
+ str=plot 'data_1' title '1' with linespoints pt 779
+ echo plot ''\''data_1'\''' title ''\''1'\''' with linespoints pt 779
+ /sw/bin/gnuplot -persist spectrum.gnuplot

gnuplot> set xtics ()
                     ^
          "spectrum.gnuplot", line 1: invalid expression

+ i=0
+ '[' 0 '!=' 1 ']'
++ expr 0 + 1
+ i=1
+ rm -f data_1
+ '[' 1 '!=' 1 ']'
+ rm -f spectrum.gnuplot

Stuart
_________________



On Jul 12, 2006, at 12:09 AM, Glynn Clements wrote:

>
> Stuart Edwards wrote:
>
>> Back on this.  Thanks for the tips.  All were spot on.  Now just a
>> little (?) glitch in the execution.  Script executes as it should if
>> a 'group' is used.  However if a list of rasters is used instead, the
>> following errors occur:
>>
>> GRASS 6.1.cvs (locationA):~ > i.spectral raster=AST6,AST7,AST8 -i
>> csh: if: Malformed file inquiry.
>
> Can you try changing the "#!/bin/sh" at the start to "#!/bin/sh -x"?
> That should provide more information on exactly where it's failing.
>
> -- 
> Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list