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

Home » Public Forums » archive » Error when calling ENVI_WRITE_ENVI_FILE
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: Error when calling ENVI_WRITE_ENVI_FILE [message #86335 is a reply to message #86321] Mon, 28 October 2013 08:55 Go to previous messageGo to previous message
Simon Mitchell is currently offline  Simon Mitchell
Messages: 6
Registered: October 2013
Junior Member
Thanks for responding Phil and Josh.

I guess I'm just not understanding what is going on here.
What is the difference between a structure array and a data array?

When I use the code
red_data = READ_ASCII(redfile, DATA_START = 6, DELIMITER = string(9B))
rnd_data = [red_data]
print, red_data
print, rnd_data

I get the result (using a 3x3 image as an example)
{
1 1 1
1 1 1
1 1 1
}
{
1 1 1
1 1 1
1 1 1
}

I then want to add the second band to the data (to make it BSQ format)
mir_data = READ_ASCII(mirfile, DATA_START = 6, DELIMITER = string(9B))
rnd_data = [[rnd_data], [mir_data]]
print, rnd_data

I get
{
1 1 1
1 1 1
1 1 1
}{
2 2 2
2 2 2
2 2 2
}
when what I would expect would be
{
1 1 1
1 1 1
1 1 1
2 2 2
2 2 2
2 2 2
}
and so on for the third band. Am I correct in my assumption? I assume that what I'm actually getting is a [3,3,3] array, rather than my expected [3,9] array.

But I'm also not understanding is why the ENVI_WRITE_ENVI_FILE is not accepting this data?
Would you please be able to step me through my questions?

Or if someone has a better method for loading ASCII files into an ENVI standard image, could they please pass this on to me.

Many thanks in advance

Simon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Airy function implementation?
Next Topic: New Coyote Store Up and Running

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

Current Time: Wed Oct 08 19:26:34 PDT 2025

Total time taken to generate the page: 0.00423 seconds