User Tools

Site Tools


microprofiling:see_spectra_howto

see_spectra

A suite of Matlab routines to view and convert spectra acquired by Spectral-m-Profiler or through a G-client-based scripting approach. It allows plotting the spectra as a function of time, depth, angle. Also, it allows plotting intensities at specific wavelengths or any spectral indices derived from them as a function of time, depth, angle.

Open Matlab, change to the directory where you unzipped the see_spectra-vXX.zip file, and type startup in the main Matlab window to set the paths correctly. From now on, you can do any of the following analyses.

Plotting spectra as a function of time

Let's say N spectra were acquired by a spectrometer in regular intervals dT and stored in a directory as filenames spectrum_i.dat, where i=1..N. Additionally let's assume that a reference spectrum reference.dat was also stored (note: everything described below will also work if no reference was stored). Our aim is to display the sequence of reflectance spectra (i.e., spectrum/reference) as a false-color image shown below. This can be achieved by following these steps.


  1. Edit param/p_convert_spectra2lam.m and define the input/output parameters (proceed according to the comments there), save it.
  2. Run convert_spectra2lam in Matlab. This will create an mpr file, where wavelengths will play a role of depths and reflectance values will play a role of concentrations. This file can be viewed and further processed with mpr-plotter, and this is exactly what one should do next.
  3. Open getdSdz.sci in Scilab and proceed as if you had a normal mpr file generated by m-Profiler. This essentially means: (i) define input parameters, (ii) load the input mpr file, (iii) display a couple of “profiles” to check whether they look as expected. Additionally, you can apply analysis allowed by getdSdz.sci, such as use calibration or ad-hoc data corrections. Eventually, (iv) export “profiles” in a L@MP-compatible format through the main menu (Save→Export for Lamp). This will generate a lam file which will be analyzed and visualized in L@MP.
  4. In Matlab, change the directory to where your L@MP program is installed, and run lamp from the main window. This will open the L@MP GUI.
  5. In the main action menu, select (i) Define specific parameters, (ii) Define input filename (select the lam file that you just generated in the previous step), (iii) Define calibrations and corrections (no need to change anything in this step), and (iv) Load raw data. Once the data is loaded, you can the the usual things that L@MP allows you to do.
  6. For our purpose here, select Action→Display Time Evolution of Profiles and then display CH1. You should see an image similar to that shown above.

Plotting spectra as a function of depth

<under construction>

Plotting spectra as a function of angle

<under construction>

Download see_spectra

Download see_spectra Matlab sources from the Download center. If you need to download mprplotter or L@MP, you can do it from there too.

microprofiling/see_spectra_howto.txt · Last modified: 2013/09/10 12:37 by lpolerec

Page Tools