comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Clustering x,y coordinates with IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Clustering x,y coordinates with IDL? [message #70220] Mon, 29 March 2010 02:44 Go to previous message
Maxwell Peck is currently offline  Maxwell Peck
Messages: 61
Registered: February 2010
Member
Hi All, This is not strictly an IDL question but I'm hoping it's
something simple to do and I'm not missing something painfully
obvious!

I have a set of x,y values e.g.

x = [34.5,36.7,35.6,80.5,81.2,79.3]
y = [50.6,51.2,53.2,48.5,50.3,51.2]

The values will be sparsely clustered overall but tightly within an
approximate 10x10 box. What I'd like to do is replace each clusters
values with the average x,y value. This doesn't have to be 'perfect',
the edges aren't that important.

My initial thought was to use hist_2d or hist_nd to try and calculate
the 2d histogram with a binsize of 10 and use this to average the
values but I can't get it to work. My other thought was using griddata
or something similar, or at worst generating an approximate binary
image and running a window over it.

Any advice or suggestions would be appreciated.

Regards

Max
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Conversion of 2D to 1D
Next Topic: "Help file not found: idl"

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:19:56 PDT 2025

Total time taken to generate the page: 0.00230 seconds