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

Home » Public Forums » archive » 2D analogue of the WHERE function?
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
2D analogue of the WHERE function? [message #66359] Wed, 29 April 2009 10:52 Go to next message
stefan5465 is currently offline  stefan5465
Messages: 13
Registered: March 2009
Junior Member
Dear all,

Haven't found a thread mentioning this problem, which I can't
understand as it seems like something someone would have mentioned
before.

Anyway, to get to the point: Is there an equivalent of the WHERE
function that will scan a multidimensional array, and return a set of
indices for the elements that match the criteria?

I'm trying to pick out certain pixels of a FITS image, and the only
way round the problem I can think of is to loop the WHERE function
over one of the dimensions. Does a more elegant solution exist?

Many thanks,

Stefan
Re: 2D analogue of the WHERE function? [message #66366 is a reply to message #66359] Wed, 29 April 2009 16:03 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Apr 29, 2:17 pm, stefan5...@hotmail.com wrote:
> Dear all,
>
> Haven't found a thread mentioning this problem, which I can't
> understand as it seems like something someone would have mentioned
> before.
>
> Anyway, to get to the point: Is there an equivalent of the WHERE
> function that will scan a multidimensional array, and return a set of
> indices for the elements that match the criteria?
>
> I'm trying to pick out certain pixels of a FITS image, and the only
> way round the problem I can think of is to loop the WHERE function
> over one of the dimensions. Does a more elegant solution exist?
>
> Many thanks,
>
> Stefan

WHERE works perfectly well on multidimensional arrays.

-Jeremy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Head Tracking with FreeTrack
Next Topic: Re: How do i write an "application progress" widget ?

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

Current Time: Wed Oct 08 17:46:30 PDT 2025

Total time taken to generate the page: 0.00419 seconds