X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 21 Jul 2016 03:51 PM by  anon
Issues with ENVIRasterToFID and ENVI_Doit
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
21 Jul 2016 03:51 PM
    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!

    Deleted User



    Basic Member


    Posts:143
    Basic Member


    --
    21 Jul 2016 04:10 PM
    At the top of your program, after the function/procedure definition, add the line: compile_opt idl2 This will ensure that "( )" are interpreted as calls to functions and not indexes of variables. David Harris GS

    Deleted User



    New Member


    Posts:
    New Member


    --
    25 Jul 2016 07:54 AM
    That worked perfectly, thank you!
    You are not authorized to post a reply.