Re: Reading large arrays of complex numbers [message #45656] |
Mon, 26 September 2005 21:32  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
David Fanning wrote:
> acquiredtaste7 writes:
>
>
>> Hi, everyone. I am fairly new to IDL, and I have a problem that I
>> can't figure out. I have some large 2D arrays of complex numbers that
>> I need to read into a program. I found some code in this group for
>> reading in complex arrays that works by reading the data into a long 1D
>> array of real numbers, then reforming the data into a 2D array of
>> complex numbers. Unfortunately, the arrays I'm dealing with are so
>> large (2048x2048), that IDL won't create a 1D array of the necessary
>> length (2*2048*2048). Can anyone tell me how I can read in my arrays?
>
>
> I guess that's a bigger than normal array, but it doesn't seem
> HUGE to me. In fact, I can easily create that size array on
> my fair to middling machine. How exactly are you trying to do this?
You (acquiredtaste7) could be running into the old
short-integer-overflow problem, eg:
IDL> x = complexarr(2*2048S^2)
Array dimensions must be greater than 0.
Execution halted at: $MAIN$
Try forcing your integers to be long:
IDL> x = complexarr(2, 2048L^2)
Or just set the DEFINT32 compiler option everywhere.
--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
|
|
|