|
Re: 2D analogue of the WHERE function? [message #66354 is a reply to message #66317] |
Wed, 29 April 2009 18:04  |
ben.bighair
Messages: 221 Registered: April 2007
|
Senior Member |
|
|
On Apr 29, 1:52 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
Hi,
I think you want should look into using ARRAY_INDICES in combination
with WHERE. That will get you to the X,Y, Z coords you are looking to
find.
Cheers,
Ben
|
|
|