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

Home » Public Forums » archive » rebin vs congrid
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
rebin vs congrid [message #89069] Tue, 22 July 2014 07:12 Go to next message
greg.addr is currently offline  greg.addr
Messages: 160
Registered: May 2007
Senior Member
The documentation says rebin is somewhat faster than congrid, but it doesn't seem to be true (at least, not for upsizing)...

pro tmp_rebin_vs_congrid
sz=[5000L,5000L]
f=8
a=findgen(sz)
t=tic("rebin")
b=rebin(a,sz[0]*f,sz[1]*f,/sample)
toc,t
t=tic("congrid")
c=congrid(a,sz[0]*f,sz[1]*f)
toc,t
end

IDL> tmp_rebin_vs_congrid
% Time elapsed rebin: 4.6150000 seconds.
% Time elapsed congrid: 1.9849999 seconds.
IDL>

cheers,
Greg
rebin vs congrid [message #89102 is a reply to message #89069] Thu, 24 July 2014 09:58 Go to previous message
Chip Helms is currently offline  Chip Helms
Messages: 24
Registered: November 2012
Junior Member
My guess is that the variables are being stored to memory during the rebin call and so are already available in memory during the congrid call. If you run the test again without resetting after the first run I would guess the times will likely end up closer. That said, I'm perfectly prepared to be wrong. Heh

Cheers,
Chip
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: uber-installation IDL 8.3
Next Topic: Generate Same Sequence of Random Numbers in IDL and C

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

Current Time: Wed Oct 08 15:26:42 PDT 2025

Total time taken to generate the page: 0.00629 seconds