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

Home » Public Forums » archive » IDL Array Indices Command
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
IDL Array Indices Command [message #90648] Fri, 20 March 2015 05:51 Go to next message
David B is currently offline  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 #90649 is a reply to message #90648] Fri, 20 March 2015 06:24 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
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
Re: IDL Array Indices Command [message #90650 is a reply to message #90649] Fri, 20 March 2015 06:30 Go to previous messageGo to next message
David B is currently offline  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 Go to previous message
Fabzi is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PLOT3D format input
Next Topic: assign an array to an element in another array

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

Current Time: Wed Oct 08 15:36:53 PDT 2025

Total time taken to generate the page: 0.00495 seconds