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

Home » Public Forums » archive » Re: Help with something that should be simple:
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: Help with something that should be simple: [message #71009] Fri, 14 May 2010 22:01
jeffnettles4870 is currently offline  jeffnettles4870
Messages: 111
Registered: October 2006
Senior Member
On May 14, 7:27 pm, ska1 <schleewei...@gmail.com> wrote:
> Hi,
>
> Basically i have a script that makes a stack of 12 input files (22
> layers).  The script transforms them to all be the same interleave and
> datatype(2=integer).  The problem is that two of the multiband files
> are byte.
>
> When i try to use 'math_doit'  for exp=fix(b1) i can not get it to
> output a multiband file.
>
> After opening the file and checking the datatype i have this chunck of
> code:
>
>  IF (dt eq 1) THEN BEGIN
>
> pos = lindgen(nb)
>
>       IF (nb GT 1) Then Begin
>                        fidMath = strarr(nb)
>                        for z =0, nb-1 Do fidMath[z]=fid
>                        fid = fidMath
>       ENDIF
>  envi_doit,'math_doit', fid=fid, dims=dims, exp=exp, out_name =
> out_name, pos=pos, r_fid = r_fid_int
>
> But i am only getting a one band output!
>
> fid= [25,25] pos=[0,1], dims = -1           0        7067
> 0        7198 and out_name has an appropriate value.
>
> Please help me see what is going wrong!
>
> thanks,
> Karen

Well your most pressing problem looks like its that the array of fid's
you're building is actually an array of strings (created by
strarr() ), when they should be integers or longs.

But you can really get simplify that entire IF (nb GT 1) block to one
statement:

fidMath=lonarr(nb)+fid

Jeff
[Message index]
 
Read Message
Previous Topic: Vertical Data in Google Earth KML
Next Topic: reading header and manipulating according to the header information

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

Current Time: Thu Oct 09 22:46:27 PDT 2025

Total time taken to generate the page: 0.00310 seconds