Hi!
I've written a simple program to deal with some hyperspectral data. However, I'm having a problem with the ENVIRastertoFID function. When I run my program, it stops at the function (highlighted in yellow below), saying that Variable is undefined: ENVIRASTERTOFID. However, when I enter the function into the command line, it works just fine and the rest of the program runs. I can't figure out why it works by command line but not when I run the program all at once.
Also, my data consists of two sets of bands from two different detector arrays. There is some overlap in the bands that the detector arrays cover. In the example below, Bands 1-3 are all from the first detector array while bands 4-6 are from the second detector array.
Band 1: 500 nm
Band 2: 550 nm
Band 3: 600 nm
Band 4: 575 nm
Band 5: 625 nm
Band 6: 675 nm
However, after running Destripe_Doit, all the bands come out ordered by wavelength, as such:
Band 1: 500 nm
Band 2: 550 nm
Band 3: 575 nm
Band 4: 600 nm
Band 5: 625 nm
Band 6: 675 nm
Is there anyway to prevent this, and keep the bands in their original relative positions instead of all being jumbled together?
---
e = ENVI()
dir = 'D:\Folder'
CD, dir
file = 'EO1H0.L1R'
raster = e.OpenRaster(file, EXTERNAL_TYPE ='eo1_hdf')
fid = ENVIRasterToFID(raster)
Output = 'EO1H0_h'
ENVI_File_Query, fid, DIMS=dims, NB=nb
ENVI_Doit, 'Destripe_Doit', $
FID = fid, $
DIMS = dims, $
POS = Lindgen(nb), $
NUM_DET = 256, $
ROT_TYPE = 1, $
OUT_NAME = Output, $
R_FID = fid1
----
Thank you, I'd appreciate any help/suggestions!
|