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

Home » Public Forums » archive » Re: Non-linear data selection
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Non-linear data selection [message #70996] Sun, 16 May 2010 06:16 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gianguido Cianci writes:

>
> On May 15, 7:27 pm, David Fanning <n...@dfanning.com> wrote:
>> aboveIndices = Where((y GE yfit) EQ 1, count)
>
> David, why didn't you use one of the following?
>
> aboveIndices2 = Where(y GE yfit, count)
> aboveIndices3 = Where(y[*] GE yfit[*], count)
>
> I have this vague memory/nightmare that I "need" to do the [*] part in
> order not to get crazy results sometimes (though I can't come up with
> a crazy example right now) so I always use aboveIndices3...
>
> So *are* there differences among these three lines? Cos they all seem
> to work for the example of the original poster. :-|

The second line (aboveIndices2) is what I originally
wrote in my code, but I changed it to give more clues
to the user about what I was doing. (I was too busy working
on my rock garden yesterday to explain myself.)

The third line is totally unnecessary and, at least with
large arrays, will cost you a big memory penalty:

http://www.dfanning.com/misc_tips/submemory.html

But, yes, they should all be equivalent in this case.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Vertical Data in Google Earth KML
Next Topic: Viewing Shapefiles in IDL

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

Current Time: Wed Oct 08 13:34:31 PDT 2025

Total time taken to generate the page: 0.00459 seconds