X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 09 Jun 2009 12:56 PM by  anon
Reading an.SLI spectral library file into an IDL variable
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
09 Jun 2009 12:56 PM
    Is this possible?

    Deleted User



    New Member


    Posts:
    New Member


    --
    09 Jun 2009 01:04 PM
    And I don't want to open the library in ENVI, then 'Save As' IDL variable

    Deleted User



    New Member


    Posts:
    New Member


    --
    23 Jun 2009 01:08 PM
    Timothy, An ENVI .sli file is just a binary array with spectra saved in rows (so it's the same format as a BIP tile).  To read it, you'll need to know the number of spectra (nspec), number of pts per spectrum (npts), the datatype (dt), and whether or not there's an offset.  Assuming there's offset=0, and the path to your library file is stored in the variable sli_file, then this should work:   sli = make_array(npts, nspec, type=dt) openr, lun, sli_file, /get_lun readu, lun, sli free_lun, lun   If there's an offset, handle that with a point_lun in between openr and readu. Jeff
    You are not authorized to post a reply.