X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



3293 Rate this article:
No rating

How to subset an MNF transformed spectral library

MNF transformed spectral libraries are useful in spectral processing routines such as Mixture Tuned Match Filtering (MTMF) and for visualization in the n-D Visualizer. However, it is required that the number of wavelengths in the MNF transformed library match the number of input MNF bands in the image used in processing. If you choose to output fewer MNF bands than input bands from the image file, the MNF statistics file used to transform the spectral library will contain statistics from all of the input bands. Therefore, when the spectral library is MNF transformed using the MNF statistics file from the image, the transformed spectra will contain the same number of bands as the input image file and not the output MNF bands. The MTMF and n-D visualizer will not accept a spectral library as input unless the number of wavelengths in the library match the input MNF file and because the MNF transformed spectra no longer have wavelength information, the library cannot be resampled on the fly.

This Help Article discusses how to subset an MNF tranformed spectral library so that it will match the number of MNF bands for MTMF and the n-D visualizer.

There are two ways to subset an MNF transformed spectral library so that it will match the number of input bands of the forward MNF result. This example uses a spectral library of three endmembers and 50 transformed MNF bands.

1) If you have access to ENVI + IDL, from the plot window, select "File"-> "Save Plot As"->"IDL variable..." and select all the plots and just the Y Data to a variable named "data". Then on the command line, type:

ENVI> help, data
Data DOUBLE = Array[50,3] ;50 is the number of bands and 3 is the number of plots.

ENVI> data = data[0:14,*] ; take only the first 15 bands
ENVI> envi_plot_data, lindgen(15)+1, data

The downside to this method is that the names of the plotted spectra will be lost unless you specifically set the NAME keyword to a string array (strarr) in the ENVI_PLOT_DATA call. However, this option provides more flexibility manipulating the data with use of the IDL/ENVI command line.

2) Save the spectra in the plot window to a spectral library, which is stored just like an image file in ENVI. Then select "Basic Tools->Resize Data (spatial/spectral)". Spatially subset the input "image" to have samples 1 to 15 and all lines, then save the result. The spectral library attributes (such as the names of the spectra) will be maintained and now this spectral library can be input as endmembers to the MTMF or n-D visualizer dialog.


Review on 12/31/2013 MM

Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »