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

Home » Public Forums » archive » Re: Cannot allocate memory!
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: Cannot allocate memory! [message #47045 is a reply to message #47044] Mon, 16 January 2006 12:26 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Sheldon" <shejo284@gmail.com> writes:
> Hi everyone,
>
> I am working with very large arrays of varying quantities, i.e.,
> sometimes I have 89 arrays and other times I have 200 arrays. Now I
> would like to average these arrays and reduce them to one array.
> I use the MAKE_ARRAY() function but IDL screams that it cannot allocate
> the memory.
> Now these arrays are quite large (1215,1215) and I only need to hold
> them within a function and then they are averaged using MEAN().
> Is there away to do this so that IDL can allocate the memory?
> IDl complains about this:
> tmp = make_array([119,1215,1215], /float). I was thinking about
> changing to /integer but I think is not such a good fix.

If all you are doing is straight averaging, then you can average each
1215x1215 slice individually using a FOR loop, and then average those
averages. That allows you to keep only one image in memory at a time.

Good luck,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.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
Previous Topic: Terra MODIS Orthorectified Imagery
Next Topic: Update IDL Widget from C++

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

Current Time: Thu Oct 09 22:24:40 PDT 2025

Total time taken to generate the page: 0.48566 seconds