GetSpectrumFromLibrary Task
This task retrieves the details of a specified material from a spectral library.
Example
; Start the application
e = ENVI(/HEADLESS)
; Open a spectral library from the distribution
specLibFile = FILEPATH('veg_1dry.sli', ROOT_DIR=e.ROOT_DIR, $
SUBDIR=['resource', 'speclib', 'veg_lib'])
specLib = ENVISpectralLibrary(specLibFile)
; Get the task from the catalog of ENVITasks
Task = ENVITask('GetSpectrumFromLibrary')
; Define inputs
Task.INPUT_SPECTRAL_LIBRARY = specLib
Task.SPECTRUM_NAME = 'CDE054: Pinyon Pine (Sap)'
; Run the task
Task.Execute
; Plot the spectrum
y = Task.SPECTRUM
x = Task.WAVELENGTHS
specLibPlot = PLOT(x,y, 'r2', $
TITLE='CDE054: Pinyon Pine (Sap)', $
XTITLE='Wavelengths (um)', $
YTITLE='Data Value')
Syntax
Result = ENVITask('GetSpectrumFromLibrary')
Input properties (Set, Get): INPUT_SPECTRAL_LIBRARY, SPECTRUM_NAME
Output properties (Get only): REFLECTANCE_SCALE_FACTOR, SPECTRUM, WAVELENGTHS, WAVELENGTH_UNITS, Y_RANGE
Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.
Methods
This task inherits the following methods from ENVITask:
Properties
INPUT_SPECTRAL_LIBRARY (required)
Specify a spectral library from which to retrieve a particular spectrum.
REFLECTANCE_SCALE_FACTOR
The scale factor to use for translating the spectrum to reflectance.
SPECTRUM
A double-precision array representing the spectrum that matches the input spectrum name.
SPECTRUM_NAME (required)
Provide a string with the material spectrum to retreive.
WAVELENGTHS
A double-precision array representing the wavelength values of the spectrum.
WAVELENGTH_UNITS
A string representing the wavelength units of the spectrum.
Y_RANGE (required)
The range of spectrum values.
Version History
ENVI 5.3 |
Introduced |
API Version
4.2
See Also
ENVITask, ENVISpectralLibrary, QuerySpectralLibrary Task, RasterMetadataItem Task, ResampleSpectrum Task