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

Home » Public Forums » archive » Re: Spectral Library Resampling Help!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Spectral Library Resampling Help! [message #18182] Tue, 14 December 1999 00:00
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
"Kent Krumvieda" <kentkr@datafusion.com> wrote:
> I am trying to use ENVI's Spectral Library Resampling ability. I
> want to resample the usgs spectral libraries to AVIRIS. Has anyone
> ever done this?
> Can someone help me on this.

Hi Kent,

First you need the AVIRIS bandpass centre wavelengths and gaussian
FWHMs. These are included in the third file of a standard AVIRIS
distribution tape. (This is a binary file with 5 columns for each of
the 224 channels. You need the first 2 columns here. It's floating
point data, big-endian, and there's a 1000-byte header.)
You need to write a 2-column ASCII file with these data.
Here's a bit of code that should do it.

Junk=bytarr(1000)
Stuff=fltarr(5,224)
Openr,u,'third_file',/get_lun,/swap_if_little_endian
Readu,u,junk,stuff
Free_lun,u
stuff=stuff[0:1,*]*0.001 ;go nm->um
openw,u,'aviris92.txt',/get_lun
printf,u,stuff
free_lun,u

Then, in ENVI, go Spectral Tools -> Spectral Libraries - > Spectral
Library Resampling. Select the USGS speclib. (Note, BTW, that its
wavelength units are micrometers.) In the next dialog tell it to
resample wavelengths to "input ASCII file". After you click OK here,
you'll get a pickfile dialog to select the ASCII file (the AVIRIS
wavelength file you made earlier), and then you'll get a little dialog
asking which column has what. Tell it wavelengths in column 1, FWHM
in column 2. That's about it.

The only tricky bit is matching wavelength units. ENVI doesn't record
wavelength units anywhere so it's entirely up to you to keep track.
The simplest solution is to standardise if possible.

Good luck,
cheers
Peter Mason


Sent via Deja.com http://www.deja.com/
Before you buy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Working with Preexisting Data Set
Next Topic: Spectral Library Resampling Help!

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

Current Time: Wed Oct 08 15:14:08 PDT 2025

Total time taken to generate the page: 0.00522 seconds