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 #72633] Wed, 22 September 2010 02:21 Go to previous message
Mrunmayee is currently offline  Mrunmayee
Messages: 24
Registered: May 2009
Junior Member
On Sep 22, 1:41 am, chris <rog...@googlemail.com> wrote:
> On 21 Sep., 15:45, Mrunmayee <gaur...@gmail.com> wrote:
>

> 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.

Thanks, Chris, I tried this. And I did run into memory problem. I see
what you did above and I was looking for just something like it. I
just needed to tweak nv, n1, n2 in rebin commands to match dimensions
(it doesn't match as you have written). So for nv = 231, n1 = 1547 and
n2 = 1537, I cannot rebin w1 (nv x n1 size) without running into "%
Array has too many elements."

I just read the tip from David about "Memory used to subscript
arrays". I am thinking of keeping the loop, but instead of using "*"
for the subscript, I can just use a pre-created index array. Just to
save some memory. But I probably won't be able to rebin to the desired
dimensions anyway.

If there is a way around, do let me know.
[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 11:30:40 PDT 2025

Total time taken to generate the page: 2.37342 seconds