Re: acii convert to ENVI spectral libary file [message #54576] |
Mon, 25 June 2007 07:04 |
Jeff N.
Messages: 120 Registered: April 2005
|
Senior Member |
|
|
On Jun 24, 6:20 am, "jochem.vere...@gmail.com"
<jochem.vere...@gmail.com> wrote:
> Hi IDL gurus,
>
> Before I start reinventing the wheel again, perhaps someone here has
> the solution already.
>
> I am searching for a script that converts columnar ascii files of
> [wavelenght, reflectance] into ENVI spectral libary files.
>
> Thanks a lot,
>
> Joe
I think there's a script like you're talking about in the ITTVIS
codebank (http://www.ittvis.com/codebank/index.asp?
list=bycategory&product=ENVI). I probably have several of my own, but
I can't get to my files right now (disk problems over the weekend :
( ) But this is actually a pretty easy script to write yourself. A
spectral library file is basically just a two dimensional array where
each row in the array is a spectrum and each column is a wavelength.
All you need to do is read your ASCII file into an array, write it out
to disk in binary form, and call envi_setup_head, and you're pretty
much done!
Jeff
|
|
|