IDL Array Indices Command [message #90648] |
Fri, 20 March 2015 05:51  |
David B
Messages: 18 Registered: January 2015
|
Junior Member |
|
|
Hello all,
I currently have an array:
IDL> help, cl_xy
CL_XY LONG = Array[2, 118090]
This array seems to be causing issues with the array indices command:
IDL> col_eight = FIX(DISTANCE_MEASURE(cl_xy, /MATRIX,MEASURE = 2), type = 3)
% Illegal subscript range: INDEX1.
% Execution halted at: CLOUDWALKER 979 /home/dbresnahan/idl/cloudroutines/cloudwalke
r/cloudwalker.pro
% $MAIN$
I am clearly missing something very obvious here. My array is correctly set up as a Long, so I am unsure as to what this issue is.
For the record my array is just a box of pixels where I am using the array_indices to implement a shortest path algorithm. Before someone shouts at me, I am exporting to Julia as it handles FOR loops much better than IDL and working my shortest path in there.
David
|
|
|
|
Re: IDL Array Indices Command [message #90650 is a reply to message #90649] |
Fri, 20 March 2015 06:30   |
David B
Messages: 18 Registered: January 2015
|
Junior Member |
|
|
On Friday, March 20, 2015 at 1:24:19 PM UTC, Fabien wrote:
> On 20.03.2015 13:51, David B wrote:
>> IDL> help, cl_xy
>> CL_XY LONG = Array[2, 118090]
>>
>> This array seems to be causing issues with the array indices command:
>>
>> IDL> col_eight = FIX(DISTANCE_MEASURE(cl_xy, /MATRIX,MEASURE = 2), type = 3)
>>
>> % Illegal subscript range: INDEX1.
>> % Execution halted at: CLOUDWALKER 979 /home/dbresnahan/idl/cloudroutines/cloudwalke
>> r/cloudwalker.pro
>> % $MAIN$
>
>
> I tried your example with a smaller input and it worked fine. According
> to the documentation, with the /MATRIX keyword you are going to build a
> matrix of 118090 x 118090 elements, which could be the reason for crashing.
>
> Fabien
That is unfortunate.
Thanks a lot for your help. I know it is a massive array, but I thought IDL could handle it. Mistaken I am.
David
|
|
|
Re: IDL Array Indices Command [message #90652 is a reply to message #90650] |
Fri, 20 March 2015 06:48  |
Fabzi
Messages: 305 Registered: July 2010
|
Senior Member |
|
|
On 20.03.2015 14:30, David B wrote:
> That is unfortunate.
>
> Thanks a lot for your help. I know it is a massive array, but I thought IDL could handle it. Mistaken I am.
>
> David
If I calculated well, this matrix would take ~55Gb of memory:
IDL> (4LL*118090LL*118090LL) / 1000. / 1000. / 1000.
55.780991
Cheers,
Fabien
|
|
|