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

Home » Public Forums » archive » Re: JBIU utilities - release 1.0
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: JBIU utilities - release 1.0 [message #60808 is a reply to message #60803] Fri, 13 June 2008 09:44 Go to previous messageGo to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
Jeremy,

thanks for putting this on the web. I always like "borrowing" code
instead of rewriting it and there is some good stuff there.

Oddly I opened up sign() and in the spirit of Coyote's IDL way I have
previously written sign() without the nasty for loop. This rewrite
gained a x12.6 improvement in speed for my test case.

function sign, in
pos = make_array(n_elements(in), /byte, value = 1)
zero = in EQ 0
neg = in LT 0
pos = pos - zero
pos = pos - 2 * neg
return, pos
END



Cheers,

Brian


------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Warping with intensity conservation or drizzle algorithm
Next Topic: JBIU utilities - release 1.0

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

Current Time: Fri Oct 10 09:42:21 PDT 2025

Total time taken to generate the page: 1.60113 seconds