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

Home » Public Forums » archive » Re: Using where() on slices of data cubes
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: Using where() on slices of data cubes [message #68330 is a reply to message #68327] Tue, 20 October 2009 09:18 Go to previous messageGo to previous message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
> Is'nt this more efficient ?
>   cube[1,*,*] = 1e24*(cube[1,*,*] lt 0) + cube[1,*,*]*(cube[1,*,*] ge
> 0)

I reckon you're copying out the slice twice, processing through it 5
times, and copying it back. That's compared to one scan through the
slice and one indexed substitution (possibly many fewer items than one
slice). The 'reform' with /overwrite costs nothing.

regards,
Greg
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rrun itools at breakpoint
Next Topic: Designating values to different ROIs in a single ROI file

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

Current Time: Fri Oct 10 07:52:35 PDT 2025

Total time taken to generate the page: 1.20317 seconds