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. Access the PID of a process spawned by IDL (UNIX / Linux / Mac OS X) before SPAWN returns Why doesn't my ASTER scene line up properly with vector files from other software packages?