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

Home » Public Forums » archive » Re: Working with indices of WHERE
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: Working with indices of WHERE [message #38340] Wed, 03 March 2004 12:25
savoie is currently offline  savoie
Messages: 68
Registered: September 1996
Member
David Fanning <david@dfanning.com> writes:

> P.S. I think there is a new IDL routine that does this,
> but I can't remember the name.

It's called ARRAY_INDICES.

IDL> y = where(x lt 20)
IDL> idx = ARRAY_INDICES(x, y)
IDL> help, idx
IDX LONG = Array[2, 20]

> David Fanning, Ph.D.
> Fanning Software Consulting
> Coyote's Guide to IDL Programming: http://www.dfanning.com/


Matt.

--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
Re: Working with indices of WHERE [message #38345 is a reply to message #38340] Wed, 03 March 2004 09:05 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nuno Oliveira writes:

> It is possible to work with indices resulting of using the function WHERE.
>
> If I have a certain region I want to move the entire region... can I do
> it with the indices? Where (oh, irony!) can I read about it?
> (I've already looked in the Reference Guide and there's nothing about it).

Oh, Nuno, you are looking entirely in the wrong direction!

http://www.dfanning.com/tips/where_to_2d.html

Convert the 1D indices to columns and rows and add your
offsets.

Cheers,

David

P.S. I think there is a new IDL routine that does this,
but I can't remember the name.

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cmset_op question (Craig)
Next Topic: BYTSCL and NAN keyword

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

Current Time: Wed Oct 08 20:01:12 PDT 2025

Total time taken to generate the page: 0.01687 seconds