X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 25 Nov 2008 12:50 PM by  anon
Automating ASTER Decorrelation Stretch
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
25 Nov 2008 12:50 PM
    Hopefully someone out there has done something similar.  I am trying to read in a Level 1B ASTER file containing VNIR, SWIR and TIR data. I want to perform a decorrelation stretch on the TIR bands 10,11 and 12 in IDL (so that the process is automated) .  I have been trying to use the ENVI Decor_doit function, but can't read the data into ENVI as I am unable to read in the Latitude and Longitude that are associated with TIR. (ENVI automatically reads in the first Lat and Long in the file, which is for VNIR).  I have managed to read in the correct data using IDL HDF_SD functions, and have outputted the data into an array, but am unsure as to how to get it into a format (presumably an ENVI file or HDF) so that I Can use the decor_doit.    Thanks for any help in advance!

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    25 Nov 2008 03:00 PM
    I am not sure what you need the lat/lon bands for in the decorrelation stretch.  An ASTER 1B product is already registered to a map projection if you are looking to reference the file.  If you simply want to run the decorrelation stretch on the TIR bands from an ASTER HDF file, you can use ENVI's ENVI_OPEN_DATA_FILE.  The FID contains all 3 FIDs for the 3 datasets in an ASTER file.  For example: file=envi_pickfile() envi_open_data_file, file, /aster, r_fid=fid print, fid envi_file_query, fid[2], nb=nb print, nb which returns: % Compiled module: TEST.           77          73          66            5 This shows I have chosen the FID for the 3rd HDF dataset which has 5 bands - the TIR bands of ASTER.  From here you can run decorr_doit on the selected FID.  If you do need to select specific HDF datasets in the file, you can do this using ENVI routines also: ENVI_OPEN_DATA_FILE, fname, r_fid=fid, /hdf_sd, hdfsd_dataset=0, hdfsd_interleave=0 where hdfsd_dataset is the specific dataset you want to open and are numbered 0 through number of datasets in the file and hdfsd_interleave is the file interleave where 0 = BSQ.  If you want to look at the number of datasets in your ASTER file, you can open the file as generic HDF in ENVI which brings up the HDF file selection dialog.

    Deleted User



    New Member


    Posts:
    New Member


    --
    26 Nov 2008 05:11 AM
    Thanks, that reading method works great. The only problem I am now finding is that Decorr_doit doesn't seem to be working at all. I have tried using the example given in the envi programmers guide , the code seems to run and reaches the end (where it asks if you want to close IDL), but doesn't actually seem to perform the d-stretch. Is there a problem with my computer set up perhaps? Thanks!

    Deleted User



    New Member


    Posts:
    New Member


    --
    26 Nov 2008 07:32 AM
    Problem solved (file wasn't read in properly).  Thanks again for the help!
    You are not authorized to post a reply.