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

Home » Public Forums » archive » Gridding options
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: Gridding options [message #21558 is a reply to message #21497] Wed, 30 August 2000 00:00 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"J.D. Smith" <jdsmith@astro.cornell.edu> writes:

> Ben Tupper wrote:
>> (Sorry, JD, it does have loopity-loops. You can flick a worm into the
>> air... but that doesn't mean it knows how to fly! I'm still trying to
>> figure out what .....
>>
> ****************************************
> tt=total(a[(((dy=((di=lindgen(((n=nx<ny)),nx+ny-1)))/n))*(nx gt ny?1:nx)+ $
> (nx gt ny?1:-1)*((dx=di mod n))*(nx-1))>0<(nx*ny-1)]* $
> (dy ge dx AND (dy-dx) lt nx>ny),1)
> ****************************************
>>
>> means. Maybe I need to drink less/more coffee. )
>
> It's written in an ancient IDL runic language lost in the dark ages (1993).
> Simply run it on an array "a" after defining the dimensions "nx" and "ny" and
> all will be clear.

Another disadvantage to vectorizing with very large arrays is that IDL
has to generate the indices for the array dynamically. This can
consume a lot of memory (sometimes more than the array itself, if it's
a byte or int array!). The expression, lindgen((nx<ny), nx+ny-1),
[some deleted] is the giveaway that JD had to essentially create a
whole new array even bigger than the original. Still, it's a pretty
impressive computation.

Todd, did you compare the run time?

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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: list widget
Next Topic: Re: opening and display large file

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

Current Time: Wed Oct 08 14:12:13 PDT 2025

Total time taken to generate the page: 0.00448 seconds