[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Merging Bytarr

"Mark Chan" <chanm@cadvision.com> writes:

> I am new to bytarr operation.
> I have 3 separate color images in the following format:
> bytarr(3,40,15500)
> bytarr(3,40,15500)
> bytarr(3,40,4000)
> Each representing a portion of a large image. They were read from 3 separate
> files.
> What is the easiest way to combine these 3 files into one file and output it
> to a single file for later operation.

I am assuming you want to concatenate the three arrays into a
3x40x35000 array.  If that's the case then the following code shold
show you the way, here using three arrays BB1, BB2 and BB3 as a

IDL> bb1 = bytarr(3,40,100)
IDL> bb2 = bytarr(3,40,200)
IDL> bb3 = bytarr(3,40,400)

IDL> help, [[[bb1]],[[bb2]],[[bb3]]]
<Expression>    BYTE      = Array[3, 40, 700]

Voila.  To be honest with you, I never understand how many nested []'s
I need in order to make it work.  I just go for trial and error until
it does.


Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response