[GRASS-dev] [GRASS GIS] #430: i.pca's output and history logged "Comments" disagree

#430: i.pca's output and history logged "Comments" disagree
---------------------------------------------+------------------------------
Reporter: nikos | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Raster | Version: unspecified
Keywords: i.pca, output messages, history | Platform: Unspecified
      Cpu: Unspecified |
---------------------------------------------+------------------------------
In a raster maps history produced with i.pca on
"Date: Tue Oct 28 03:33:27 2008"
the Comments section states:
Eigen vectors:
( -0.64 -0.65 -0.42 )
( -0.71 0.28 0.64 )
( -0.30 0.71 -0.64 )

Now, I reproduced the exact same processing (based on the history) and the
output message is:
Eigen values:
( 0.79 0.61 0.06 )
( 0.44 -0.50 -0.74 )
( 0.42 -0.61 0.67 )

However, the history log states (not in a nice formatting as well :frowning: :
Comments:
    Eigen vectors:
    ( 0.79 0.61 0.06 )
    ( 0.44 -0.50 -0.74 )
    ( 0.42 -0.61 0.67 )

It's an important issue in my opinion and someone with experience should
review it. There is also http://trac.osgeo.org/grass/ticket/341.

Thank you, Nikos

P.S. For some reason I never get a notification from trac. So I can't
follow-up quickly (re-)actions in my trac-posts. So apologies for delays.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/430&gt;
GRASS GIS <http://grass.osgeo.org>

#430: i.pca's output and history logged "Comments" disagree
--------------------------+-------------------------------------------------
  Reporter: nikos | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: unspecified
Resolution: | Keywords: i.pca, output messages, history
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by nikos):

By "not nice formatting: I mean the following (copy-pasted from the
terminal):

GRASS 6.4.svn (hgrs87):~ > r.info -h
pca.2007.242.500.b267_with250mregion_TEST.1
Data Source:

Data Description:
    generated by i.pca
Comments:
    Eigen vectors:
    ( 0.79 0.61 0.06 )
    ( 0.44 -0.50 -0.74 )
    ( 0.42 -0.61 0.67 )

    i.pca input="MOD2007_242_500_sur_refl_b02,MOD2007_242_500_sur_refl_b\
    06,MOD2007_242_500_sur_refl_b07" output="pca.2007.242.500.b267_with2\
    50mregion_TEST" rescale=0,0

Where is the "box" (=lines enclosing the history-log) ?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/430#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#430: i.pca's output and history logged "Comments" disagree
--------------------------+-------------------------------------------------
  Reporter: nikos | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: unspecified
Resolution: | Keywords: i.pca, output messages, history
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by hamish):

probably-fixed in latest devbr6 svn.

awaiting comments,

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/430#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#430: i.pca's output and history logged "Comments" disagree
--------------------------+-------------------------------------------------
  Reporter: nikos | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: unspecified
Resolution: | Keywords: i.pca, output messages, history
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by nikos):

Replying to [comment:2 hamish]:
> awaiting comments

Now that I look again at the results (meaning the tests I have sent in the
ML and in the wiki as well [1]) I think that your thought about increasing
the decimals printed in i.pca's output is not a bad idea.

Perhaps adding one more digit to make it look like (arbitrary numbers
here):

Eigen values, (vectors), and [percent importance]:[[BR]]
PC1 6307563.04 ( -0.643 -0.653 -0.423 ) [ 98.71% ][[BR]]
PC2 78023.63 ( -0.713 0.283 0.643 ) [ 1.22% ][[BR]]
PC3 4504.60 ( -0.303 0.713 -0.643 ) [ 0.07% ]

Kind regards, Nikos

[1] http://grass.osgeo.org/wiki/Principal_Component_Analysis

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/430#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#430: i.pca's output and history logged "Comments" disagree
--------------------------+-------------------------------------------------
  Reporter: nikos | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: unspecified
Resolution: | Keywords: i.pca, output messages, history
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by neteler):

Attached i_pca.diff patch produces
{{{
# NC location
i.pca
in=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70
out=lsat7_2002_pca
...
Eigen values, (vectors), and [percent importance]:
PC1 4712.17 (-0.2798,-0.3332,-0.5054,-0.0015,-0.5341,-0.5196)[84.05%]
PC2 595.40 (-0.2528,-0.1877,-0.2969, 0.7494, 0.5002, 0.0289)[10.62%]
PC3 240.56 ( 0.3864, 0.3842, 0.2670, 0.6147,-0.4058,-0.2987)[4.29%]
PC4 33.01 (-0.1768, 0.0165, 0.4083,-0.1576, 0.4396,-0.7640)[0.59%]
PC5 20.75 (-0.6063,-0.2610, 0.6087, 0.1795,-0.3255, 0.2357)[0.37%]
PC6 4.25 ( 0.5565,-0.7986, 0.2186, 0.0583, 0.0255,-0.0265)[0.08%]

r.info lsat7_2002_pca.1
+----------------------------------------------------------------------------+
  | Layer: lsat7_2002_pca.1 Date: Mon Mar 23 16:14:10 2009
|
  | Mapset: user1 Login of Creator: neteler
|
  | Location: nc_spm_07
|
  | DataBase: /home/neteler/grassdata
|
  | Title: ( lsat7_2002_pca.1 )
|
  | Timestamp: none
|
...
  | Comments:
|
  | Eigen values, (vectors), and [percent importance]:
|
  | PC1 4712.17
(-0.2798,-0.3332,-0.5054,-0.0015,-0.5341,-0.5196)[84.05%] |
  | PC2 595.40 (-0.2528,-0.1877,-0.2969, 0.7494, 0.5002,
0.0289)[10.62%] |
  | PC3 240.56 ( 0.3864, 0.3842, 0.2670,
0.6147,-0.4058,-0.2987)[4.29%] |
  | PC4 33.01 (-0.1768, 0.0165, 0.4083,-0.1576,
0.4396,-0.7640)[0.59%] |
  | PC5 20.75 (-0.6063,-0.2610, 0.6087, 0.1795,-0.3255,
0.2357)[0.37%] |
  | PC6 4.25 ( 0.5565,-0.7986, 0.2186, 0.0583,
0.0255,-0.0265)[0.08%] |
  |
|
  | i.pca
input="lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40\ |
  | ,lsat7_2002_50,lsat7_2002_70" output="lsat7_2002_pca" rescale=0,255
|
  |
|
+----------------------------------------------------------------------------+
}}}

OK for everybody?

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/430#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#430: i.pca's output and history logged "Comments" disagree
--------------------------+-------------------------------------------------
  Reporter: nikos | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: unspecified
Resolution: | Keywords: i.pca, output messages, history
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by nikos):

+1

Nikos

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/430#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#430: i.pca's output and history logged "Comments" disagree
--------------------------+-------------------------------------------------
  Reporter: nikos | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: Raster | Version: unspecified
Resolution: fixed | Keywords: i.pca, output messages, history
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by neteler):

  * status: new => closed
  * resolution: => fixed

Comment:

Fixed in 6.4.0SVN (r36525), 6.5 (r36526), 7 (r36527).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/430#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>