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 parameters (Set, Get): INPUT_SPECTRAL_LIBRARY, SPECTRUM_NAME

Output parameters (Get only): REFLECTANCE_SCALE_FACTOR, SPECTRAL_SIGNATURE, SPECTRUM, WAVELENGTHS, WAVELENGTH_UNITS, Y_RANGE

Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.

Input Parameters


INPUT_SPECTRAL_LIBRARY (required)

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

SPECTRUM_NAME (required)

Provide a string with the material spectrum to retreive.

Output Parameters


REFLECTANCE_SCALE_FACTOR

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

SPECTRAL SIGNATURE

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

SPECTRUM

A double-precision array representing the spectrum that matches the input spectrum name.

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

The range of spectrum values.

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 5.3

Introduced

ENVI 6.1

Added the SPECTRAL_SIGNATURE_PROPERTY

See Also


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