Plotting spectra

Plotting overlay spectra is one of several ways to visualize data that you measured and that are now stored in computer memory.

There are two ways to make matrix overlay: command-line style and graphical interface style. Command-line style is less intuitive but faster. Graphical User Interface is more intuitive but lakes more clicking. Read both recommendations and use whichever way you prefer – results are identical.


Graphical User Interface

 In the first step follow recommendations on advanced plotting found here. Note that data stored in the matrix can be plotted only in the “More choices” mode of New Graph or Append to Graph dialogs. Simple form of the dialog (“Fewer Choices”) will not display matrices, although CP_ and RP_ waves will be listed.

When displaying the first spectrum from the matrix though dialog, select matrix as a Y Wave (left) and RP_ wave as an X Wave, then click Add button.

A new line will appear in the window in the lower half of the dialog. Note that matrix name will have two pairs of square brackets. The first set designate the range of rows that should be displayed - for HPSpec data this is [0,910]. The second pair indicates which of the columns to display. Because rows are already designated as a range from point 0 to point 910, column can be only a single value. Set this value to 0 to display the first spectrum.

You can press Add button again and the second line will be appended to the list. Keep settings on the second line identical to the first line, except to  change the value of column from 0 to 1. This will indicate the second spectrum.

You can proceed to add other spectra incrementing column index every time until you listed every column in the matrix, or you can list only a few.  You can always add spectra to the plot through Append Traces dialog in Graph menu. 


Command line

Even faster way to append all spectra to graph is thorough command line. Bring command window forward by selecting it or by pressing Ctrl+J.

In the command line (lowest, editable line) type:
Display MyMatrix[][0] vs RP_MyMatrix
and execute command by pressing Enter. Here MyMatrix is the name that you gave to your matrix when you imported it and PR_ MyMatrix if the name of wavelength calibration wave created at the same time. If name of your matrix, and hence RP_ wave, contains special characters you will have to ‘quote’ the name for Igor to recognize it. This command will create a plot of the first spectrum in the matrix, which is the blank measurement. Note that the second set of brackets following matrix name specifies index of the column within the matrix that should be plotted (zero in this case).

Return to command window and execute the following command:
AppendToGraph MyMatrix[][1] vs RP_MyMatrix

Now the second spectrum is appended to the graph created in the next step. Note that the column index incremented to one. Copy the above command from the history menu and continue to append successive spectra to graph by incrementing column index each time.


Setting scales

You may notice that changes in the absorption of overlaid spectra are congregated on the left of the plot. To make it easier to see changes, set the bottom scale to cover region of 200 to 400 nm – this is ultraviolet region just outside visibility for human eye.  Double-click the values at the bottom scale and set new limits in Min and Max fields.

Measured spectra have different aberrations on the lower and upper limits of useable range. However, the lower limit cannot be properly examined when intensity scale is set to automatic value. To examine change at the lower end of useable range double-click values on the left axis and manually set the range to be from -0.01 to 0.05. In this range examine the spectra with lowest concentrations and notice that below certain limit absorption signal cannot be seen due to noise.

To keep the graphs of both the lower and upper ranges, it is convenient to make a copy of the graph. For that, call window control dialog from Windows→Control menu or using Ctrl+Y shortcut. Enable Create Window Macro option and give window a name so you can recognize this macro. When you select Do It button Igor will generate a macro to automatically recreate current window. You can now select just created macro from Windows→Graph Macros menu, which will create identical copy of the graph, and set different scales without affecting the first plot.  


What do spectra show?

Spectral overlay illustrates several important properties of spectra:

  • All spectral features change proportionally at moderate concentrations.
  • At higher concentrations spectra become saturated and noisy. Concentrated sample absorbs too much light and little of no light makes it through. When the amount of transmitted light is too small it falls below the level of internal noise of the detector and can no longer be recognized.
  • As spectra approach saturation they become gradually distorted.  Distortion occurs in the areas of stronger absorption first.
  • On the lower range of concentrations there is also a limit below which spectrum of the sample cannot be recognized due to the noise arising from discrete nature of light and small baseline drifts.

 

Next: Profiles overlay plot
Comments