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

Home » Public Forums » archive » Re: Index of a sector
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: Index of a sector [message #24559] Wed, 04 April 2001 17:29
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
How about this?

IDL> junk=dist(200)
IDL> w = where(junk le 50.)
IDL> w = w[where(w mod 200 le 100 and w/200 le 100)]
IDL> junk2 = bytarr(200,200)
IDL> junk2[w] = 1
IDL> bytscl,junk2

"Pavel A. Romashkin" wrote:

> Hi,
>
> I tried to solve this yesterday, but it gave me a headache. I tried
> again today, but the headache is back and I did not get any closer to
> the solution. It is very simple. Well after all, what can you ask from a
> Mac user.
>
> If you have a (square) 2D array, let's say, DIST(200, 200), how to
> obtain the index of points enclosed by a sector of a given radius, drawn
> from the corner of the array (point [0, 0])? Foe instance, radius 50?
> So, I will have
>
> 0,1,2,...50
> 101,102,...,149 (or so)
> 201,202,...
> ...
> 501,...?
>
> I thought to try to cut all corners and use IDLanROI, but for some
> reason, I think that JD or Craig have the answer ready. Besides, David
> tried anROI... how can I dream of succeeding where the Titan (read:
> Coyote) failed?
> Thanks,
> Pavel
Re: Index of a sector [message #24563 is a reply to message #24559] Wed, 04 April 2001 16:32 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Pavel A. Romashkin (pavel.romashkin@noaa.gov) writes:

> I thought to try to cut all corners and use IDLanROI, but for some
> reason, I think that JD or Craig have the answer ready. Besides, David
> tried anROI... how can I dream of succeeding where the Titan (read:
> Coyote) failed?

Pavel,

I'll tell you everything I know about ROIs at dinner
tonight. (Should take about 5 seconds or so.)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Google Stiffling Free Flow of Jokes
Next Topic: Google Stiffling Free Flow of Jokes

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

Current Time: Wed Oct 08 11:36:14 PDT 2025

Total time taken to generate the page: 0.00588 seconds