[GRASS-dev] Re: [GRASS-user] low radiance values after i.atcor
and i.topo.corr
Glynn Clements
glynn at gclements.plus.com
Mon Jun 23 17:49:30 EDT 2008
Markus Neteler wrote:
> >> > ... without an update to i.gensigset I cannot test the FP capabilities of
> >> > i.smap. It seems that it was cloned from i.gensig.
> >>
> >> In retrospect, it appears that it's only the training map which is
> >> inherently restricted to integers. E.g. i.gensigset reads the group
> >> maps as CELL then immediately promotes the values to "double".
> >>
> >> Unless there's something else I have overlooked, I should have an FP
> >> version ready shortly.
>
> Great!
>
> > Done. Again, they compiles without warning, but need testing.
>
> I have made a test (NC data set):
>
> r.mapcalc b10=lsat7_2000_10/10000.
[snip]
> Error: unreliable clustering
> try a smaller initial number of clusters
> Warning: Removed a singular subsignature; number 1; -1 remain
> [..]
>
> I fear that it still reads in CELL types somewhere and that it loses precision
> through this (leading to 0.0000 stuff and singular subsignatures).
Could it be that the definition of ZERO in subcluster.c:
#define ZERO 1e-10
is too high when the inputs are scaled down?
For an NxN matrix, scaling all of the the elements down by a factor of
K will scale the determinant by K^N.
AFAICT[1], the matrix elements are roughly proportional to the squares
of the input values, so if you're scaling the values down by 1e-5, the
matrix elements are scaled down by 1e-10, and with 7 bands the
determinant would be scaled down by 1e-70.
[1] Which isn't saying much; it's not like I actually understand the
algorithm being used here.
Can you try dividing by 10, 100, etc rather than 10000, to see if
there's a threshold at which the accuracy starts to be an issue?
And/or make ZERO much smaller.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list