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

Home » Public Forums » archive » Re: Fitting an ROI to a distribution of points
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Fitting an ROI to a distribution of points [message #47278] Wed, 01 February 2006 09:24 Go to next message
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
David Fanning <davidf@dfanning.com> wrote:
> Olivia writes:

>> I have a set of (x,y) coordinates which represent point-like galaxies
>> in a galaxy cluster. Ultimately I want to describe the shape of the
>> cluster as an ellipse, but I was planning on making some kind of blob
>> first. I thought of gaussian smoothing, but I cannot work out how to
>> get a filled in shape described by pixels to start working with. Does
>> anyone have any ideas?

> Here are a couple of articles describing techniques that you
> might be able to use. The first describes how to create
> a convex hull around a set of points. You could fill
> in the polygon (convex hull) to create a blob of some
> sort. The second describes how to calculate an ellipse
> for a set of random points using a weighed average
> approach.

> http://www.dfanning.com/tips/convex_hull.html
> http://www.dfanning.com/ip_tips/fit_ellipse.html

After posting, I'd definitely take that fit_ellipse approach!

--
Edd
Re: Fitting an ROI to a distribution of points [message #47279 is a reply to message #47278] Wed, 01 February 2006 09:21 Go to previous messageGo to next message
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
Olivia <olivia.roberts@merton.ox.ac.uk> wrote:
> I have a set of (x,y) coordinates which represent point-like galaxies
> in a galaxy cluster. Ultimately I want to describe the shape of the
> cluster as an ellipse, but I was planning on making some kind of blob
> first. I thought of gaussian smoothing, but I cannot work out how to
> get a filled in shape described by pixels to start working with. Does
> anyone have any ideas?

Plenty of ways, the majority of which I wouldn't dare include in an
astrophysical analysis. Better to bite the bullet now and have a
slightly complex way of handling it than be trying to figure out
exactly what effects your choice has on your analysis later.

For now, if you just want to get a filled in shape it might be best to
find the minimum enclosing circle or ellipse. Your cluster shouldn't
have so many members that it would be impractical to calculate the
angular distance between all members and find the most distant
pair. Having that code in place later will probably not be entirely
wasted when you change method slightly too.

If you're working in astrophysics at Oxford say hello from me - I left
last month :-)

--
Edd
Re: Fitting an ROI to a distribution of points [message #47280 is a reply to message #47279] Wed, 01 February 2006 09:14 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Olivia writes:

> I have a set of (x,y) coordinates which represent point-like galaxies
> in a galaxy cluster. Ultimately I want to describe the shape of the
> cluster as an ellipse, but I was planning on making some kind of blob
> first. I thought of gaussian smoothing, but I cannot work out how to
> get a filled in shape described by pixels to start working with. Does
> anyone have any ideas?

Here are a couple of articles describing techniques that you
might be able to use. The first describes how to create
a convex hull around a set of points. You could fill
in the polygon (convex hull) to create a blob of some
sort. The second describes how to calculate an ellipse
for a set of random points using a weighed average
approach.

http://www.dfanning.com/tips/convex_hull.html
http://www.dfanning.com/ip_tips/fit_ellipse.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Fitting an ROI to a distribution of points [message #47479 is a reply to message #47278] Fri, 10 February 2006 07:42 Go to previous message
Olivia is currently offline  Olivia
Messages: 16
Registered: February 2006
Junior Member
Thanks, that was really helpful!

Olivia
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Scite for IDL.
Next Topic: more text widget help...

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

Current Time: Wed Oct 08 13:47:26 PDT 2025

Total time taken to generate the page: 0.00524 seconds