|
Re: Concatenate arrays [message #41457 is a reply to message #41455] |
Fri, 29 October 2004 04:42  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
David Fanning wrote:
> Lee writes:
>
>
>> Can someone please explain why I can't break up the third index array.
>> I only want to grab certain frames and recombine to get new image. I
>> would have expected to be new_arry=(10,10,5)
>>
>>
>>
>> data=findgen(10,10,10)
>>
>> array1=data(*,*,0:1)
>> array2=data(*,*,3:5)
>>
>> new_array=array1+array2
>> help,new_ARRAY FLOAT = Array[10, 10, 2]
>
>
> It looks like it has been awhile since you have read
> the Array Concatenation Tutorial:
>
> http://www.dfanning.com/tips/array_concatenation.html
>
> IDL> new = [ [ [array1] ], [ [array2] ] ]
> IDL> help, new
> NEW FLOAT = Array[10, 10, 5]
>
> Cheers,
>
> David
We have a routine in our library which could add data on every dimension
you want.
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/concatenate_arrays_dbase.pro.html
cheers
Reimar
|
|
|
Re: Concatenate arrays [message #41458 is a reply to message #41457] |
Thu, 28 October 2004 23:42  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Lee writes:
> Can someone please explain why I can't break up the third index array.
> I only want to grab certain frames and recombine to get new image. I
> would have expected to be new_arry=(10,10,5)
>
>
>
> data=findgen(10,10,10)
>
> array1=data(*,*,0:1)
> array2=data(*,*,3:5)
>
> new_array=array1+array2
> help,new_ARRAY FLOAT = Array[10, 10, 2]
It looks like it has been awhile since you have read
the Array Concatenation Tutorial:
http://www.dfanning.com/tips/array_concatenation.html
IDL> new = [ [ [array1] ], [ [array2] ] ]
IDL> help, new
NEW FLOAT = Array[10, 10, 5]
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
|
|
|