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

Home » Public Forums » archive » Re: Concatenating arrays across chosen dimension
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Concatenating arrays across chosen dimension [message #31247 is a reply to message #31240] Wed, 26 June 2002 13:53 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Hi Reimar,

Nice to see how similar our routines are!

If large arrays are involved, it looks like mine might be a bit quicker, since I
happened to do the concatenation as the vector of 'a' elements with the vector
of 'b' elements. There is no shuffling of data elements to be done, all of 'b'
is just put after all of 'a'. You used concatenation on the first dimension
(dimension 0) with 'c=[at,bt]', which requires IDL to do more work in composing
the result. Every row of the result takes elements from 'a' then 'b'.

The most efficient way would be to do the concatenation on the last dimension,
but the fact that we can't do this in general is the problem that got us here in
the first place!

"Reimar Bauer" <R.Bauer@fz-juelich.de> wrote...
> Dick Jackson wrote:
>>
>> "Randall Skelton" <rhskelto@atm.ox.ac.uk> wrote...
>>
>>> Ok... I have to ask. Is there actually a nice, clean way to concatenate
>>> multidimensional arrays in IDL?
>>>
>>> a = make_array(2,2,2,2)
>>> b = make_array(2,2,2,5)
>>>
>>> data1 = [ [[[a]]] , [[[b]]] ]
>>>
>>> Obviously the above fails, but what is the solution? Surely some
>>> combination of rebin/reform...
>
> Dear Dick,
>
> we have written a general routine to concatinate on each dimension you
> want.
>
>
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download
/concatenate_arrays.tar.gz
>
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download
/concatenate_arrays.sav

Cheers,
--
-Dick

Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: subtle changes in PS output with contour
Next Topic: 24 bit display problems

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

Current Time: Sat Oct 11 01:53:47 PDT 2025

Total time taken to generate the page: 0.48009 seconds