Re: Re: Clsuter analysis wiht IDL [message #24014 is a reply to message #23847] |
Thu, 01 March 2001 03:20   |
dw
Messages: 10 Registered: February 2001
|
Junior Member |
|
|
<html>
<Craig writes:<br>
<br>
<I am by no means a statistics or clusters analysis expert, but
from<br>
<looking at the documentation it seems that both CLUST_WTS and
CLUSTER<br>
<require the n-dimensional *positions* of the data points, and not
an<br>
<intensity map. It is pretty clear that the cluster functions
are<br>
<based on an unweighted set of scatter-points. If you want to
use your<br>
<intensity information as a weighting, you may be out of luck.<br>
<br>
<Perhaps you could achieve what you desire with this code, which
simply<br>
<finds the non-zero pixels:<br>
<br>
wh = where(image GT 0, ct)<br>
if ct EQ 0 then message, 'ERROR: the image is blank!'<br>
x = wh MOD 658 ; form x pixel
positions<br>
y = floor(wh / 658) ; form y pixel positions<br>
<br>
xy = transpose([[x],[y]]) ; compute the 2-d scatter positions<br>
weights = clust_wts(xy, n_clusters=3)<br>
etc.<br>
<br>
<I haven't tried this, so it may take some tweaking. Good
luck,<br>
<Craig<br>
<br>
I'm such a beginner at this I don't know what the MOD function does? (no
on-line help listing for it)<br>
When trying to transpose, IDL corrects me with <br>
<font face="MS Sans Serif, Geneva" size=1>Arrays are allowed 1 - 8
dimensions<br>
<br>
thanks for trying to help!<br>
BTW I'm not a Mr. :-)<br>
D<br>
</font></html>
|
|
|