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

Home » Public Forums » archive » Re: plot_3dbox : array has too many elements
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
Re: plot_3dbox : array has too many elements [message #42568] Wed, 16 February 2005 09:12
Ralf Schaa is currently offline  Ralf Schaa
Messages: 37
Registered: June 2001
Member
Paolo Grigis wrote:

>
>
> Ralf Schaa wrote:
>
>> Dear All,
>>
>> I like to use the plot_3dbox procedure to plot a satellite orbit. The
>> cartesian positionvectors consists each of 27292 elements. I tried
>> 27292L and 27292LL when initializing, but I keep getting the same
>> error message : 'array has too many elements'.
>>
>
> Well, it looks like the program is trying to build an array (assuming
> of float type) of 27292 by 27292 elements, which you just can't do in
> idl on 32 bit systems:
>
> IDL> a=fltarr(27292L,27292L)
> % Array has too many elements.


That's it.
Plot_3dbox calls: Surface, FltArr(Xcnt,Xcnt) with Xcnt are my 27292
elements.

Thanks.

-Ralf



> To estimate the maximum size of an IDL array one can use the formula:
>
> maxsize = (2L^31-1) / typesize
>
> where typesize is the size of your datatype in byte (4 bytes
> for float, 2 bytes for integers, 8 bytes for doubles etc.).
> This means that the maximum size in bytes of a single array should
> not be larger than 2GB.
>
>
> Cheers,
> Paolo
>
>
>> What to do?
>>
>> Thanks already
>>
>> -Ralf
Re: plot_3dbox : array has too many elements [message #42570 is a reply to message #42568] Wed, 16 February 2005 07:47 Go to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
Ralf Schaa wrote:
> Dear All,
>
> I like to use the plot_3dbox procedure to plot a satellite orbit. The
> cartesian positionvectors consists each of 27292 elements. I tried
> 27292L and 27292LL when initializing, but I keep getting the same error
> message : 'array has too many elements'.
>

Well, it looks like the program is trying to build an array (assuming
of float type) of 27292 by 27292 elements, which you just can't do in
idl on 32 bit systems:

IDL> a=fltarr(27292L,27292L)
% Array has too many elements.

To estimate the maximum size of an IDL array one can use the formula:

maxsize = (2L^31-1) / typesize

where typesize is the size of your datatype in byte (4 bytes
for float, 2 bytes for integers, 8 bytes for doubles etc.).
This means that the maximum size in bytes of a single array should
not be larger than 2GB.


Cheers,
Paolo


> What to do?
>
> Thanks already
>
> -Ralf
Re: plot_3dbox : array has too many elements [message #42571 is a reply to message #42570] Wed, 16 February 2005 06:29 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ralf Schaa writes:

> I like to use the plot_3dbox procedure to plot a satellite orbit. The
> cartesian positionvectors consists each of 27292 elements. I tried
> 27292L and 27292LL when initializing, but I keep getting the same error
> message : 'array has too many elements'.
>
> What to do?

I think I would rip those lazy SURFACE commands out
of PLOT_3DBOX and replace them with something a lot
more sensible, like SCALE3. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: plot_3dbox : array has too many elements
Next Topic: widget_base aligntment question

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

Current Time: Fri Oct 10 11:17:16 PDT 2025

Total time taken to generate the page: 0.95966 seconds