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

Home » Public Forums » archive » Re: Rebin/Reform/Histogram
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: Rebin/Reform/Histogram [message #72641 is a reply to message #72633] Tue, 21 September 2010 13:41 Go to previous messageGo to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
On 21 Sep., 15:45, Mrunmayee <gaur...@gmail.com> wrote:
> One wrong statement in the loop:
>
>
>
>> for i = 0, n1-1 do begin
>>>>    w = rebin(w1[*,i], nv, n2) ; Makes nvxn2 matrix
>>    p = w*w2                     ; Performs number 3 above.
>>    SF[i,*] = dt # p
>> endfor

Hi, maybe you have to do this in 3D. It can look something like the
following (no proof-just an idea):

sf = rebin(/sample,reform(/over,transpose(dt),1,n2,n1),nv,n1,n2) # $
(rebin(/sample,reform(w1, nv, 1, n1,/over),nv, n2, n1) * $
transpose(rebin(/sample,reform(w2, nv, 1, n2,/over),nv, n1, n2),
[0,2,1]))

However, if you have large matrices then you will run into memory
problems. Just reduce redundancy and maximise the work within the
loop. Then you won't "feel" the loop overhead. The 'over' keyword
transforms the matrices fast in place - so keep it in mind if you like
to use them later.

Regards

CR
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL 8 Questions
Next Topic: Re: Coyote and Catalyst Libraries Available on SVN Repository

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

Current Time: Fri Oct 10 14:03:29 PDT 2025

Total time taken to generate the page: 1.27803 seconds