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

Home » Public Forums » archive » Re: Simple? problem
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: Simple? problem [message #30073 is a reply to message #30072] Tue, 09 April 2002 10:52 Go to previous messageGo to previous message
Jaco van Gorkom is currently offline  Jaco van Gorkom
Messages: 97
Registered: November 2000
Member
"Ivan Valtchanov" <ivanv@discovery.saclay.cea.fr> wrote in message
news:20020409174917.78c62461.ivanv@discovery.saclay.cea.fr.. .
< skipped code of not quite so simple problem ... >
> This is obviously quite unoptimised - two cycles etc. Do you have any
ideas, references or do you know if it is already solved in IDL?
>
> I have looked for something similar in David Fanning pages and IDL
astronomical libraries but I couldn't find something to adapt, maybe I have
missed it?

Well, I would start by reading the dimensional juggling tutorial on David's
pages
a few times. Then read it again, and practice with the examples.
A nice compromise between the speed penalty for using loops and excessive
memory use for array operations is usually found by vectorizing the inner
loop
only. Thus FOR j=... until ENDFOR could be replaced by something along the
lines of:
ygi = findgen(ny)/ny
dy = rebin(y, 1000, ny, /sample) - rebin(reform(ygi, 1, ny), 1000, ny,
/sample)
dr = rebin(dx^2, 1000, ny, /sample) + dy^2
arg = dr^2 / rebin(w2, 1000, ny, /sample) > -20.0
image[i,0] = total(exp(arg), 1) ; the total over only the first dimension
(1000)
Probably I mixed up all the rebin statements here, since I have not read the
juggling tutorial in months. But thirty minutes of toying around on the
command
line with help statements usually gets the syntax right.

Jaco

P.S.: It is quite possible that I have misunderstood the meaning or purpose
of
your code. Maybe you could describe in words exactly what you want to
accomplish?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Does IDL have a #include functionality
Next Topic: basic soubt with fltarr

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

Current Time: Wed Oct 15 13:48:26 PDT 2025

Total time taken to generate the page: 0.32171 seconds