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, SPECTRAL_SIGNATURE, 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:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


INPUT_SPECTRAL_LIBRARY (required)

Specify a spectral library from which to retrieve a particular spectrum.

REFLECTANCE_SCALE_FACTOR (required)

The scale factor to use for translating the spectrum to reflectance.

SPECTRAL SIGNATURE (required)

An ENVISpectralSignature object representing the spectral signature that matches the input spectrum name.

SPECTRUM (required)

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 (required)

A double-precision array representing the wavelength values of the spectrum.

WAVELENGTH_UNITS (required)

A string representing the wavelength units of the spectrum.

Y_RANGE (required)

The range of spectrum values.

Version History


ENVI 5.3

Introduced

ENVI 6.1 Added the SPECTRAL_SIGNATURE_PROPERTY

API Version


4.3

See Also


ENVITask, ENVISpectralLibrary, QuerySpectralLibrary Task, RasterMetadataItem Task, ResampleSpectrum Task