[GRASS-user] i.pca with scrips
Gaspar
gos47 at hotmail.com
Mon Jul 4 14:43:59 EDT 2011
Dear Grass users
I am trying to run the principal components analysis with "i.pca" for 12
raster.
I made a script to process three times the "i.pca" with three sets
(twelve raster by each sets) of different parameters (temperature,
chlorophyll, Insolation), but when I run the scripts this only takes 11
images by sets. I tried i.pc manually and this takes twelve raster
correctly. Thank you in advance.
EXAMPLES WHIT SCRIP:
GRASS 6.4.1 > i.pca_.sh
.
.
.
Computing means for band 11...
100%
Computing row 1 (of 11) of covariance matrix...
EXAMPLES MANUALLY FOR ONE SET:
GRASS 6.4.1 >
input=tmedia_1,tmedia_2,tmedia_3,tmedia_4,tmedia_5,tmedia_6,tmedia_7,tmedia_8,tmedia_9,tmedia_10,tmedia_11,tmedia_12 output=PCA_tmedia_
Computing means for band 12...
100%
Computing row 1 (of 12) of covariance matrix...
EXAMPLE SCRIPS
#!/bin/bash
# Analisis de componentes principales
for map in tmedia_ aston_ clor_
do
B1=1
B2=2
B3=3
B4=4
B5=5
B5=6
B7=7
B8=8
B9=9
B10=10
B11=11
B12=12
i.pca rescale=0,0 input="$map$B1,$map$B2,$map$B3,$map$B4,$map$B5,$map
$B7,$map$B8,$map$B9,$map$B10,$map$B11,$map$B12" output=PCA_$map
More information about the grass-user
mailing list