Spectra Editor Function

What it does

The function specedit is a Graphical User Inferface based function for editing spectra. As an example of the functions's use, the the data file nir_data was loaded into the MATLAB workspace as shown in the upper figure. The file contains 30 NIR spectra of pseudo-gasoline samples measured on two spectrometers (spec1 and spec2) along with concentration information of several analytes (conc) and a wavelength axis (lamda). The specedit function is called with one of the sets of spectra and the wavelength axis as arguments. This produces a figure window with push buttons for activating the cursor so that one may select and deselect regions of the spectra (note that only the mean spectra is displayed). Selected regions are indicated by the small red dots. The edited spectra and wavelength axis indices can be saved to the workspace using dialog boxes (generated by the svdlgpls function) that are activated by the push buttons. The zoompls pushbuttons in the lower right of the figure can be used to zoom in on portions of the plot for better accuracy when selecting spectral features.


Example of Command Window when using SPECEDIT.


Example of Figure Produced by SPECEDIT.

 

Requirements for running SPECEDIT

  • MATLAB 5.0
  • zoompls.m and svdlgpls.m functions
  • No other toolboxes required
  • Must be a registered PLS_Toolbox user.

Developed by:

Neal B. Gallagher
Eigenvector Research, Inc.
nealg@eigenvector.com

Download specedit.m

To get it, simply click on specedit.m for Mac, or specedit.m for PC. Enter your username and password. You will also need svdlgpls.m for Mac or svdlgpls.m for PC. Move the files to a folder on your MATLAB path along with zoompls.m and you're done. PLS_Toolbox users can get a username and password by contacting bmw@eigenvector.com.

Return to MATLAB User Area.