Getting Started with Data Exploration (PEAXACT Viewer Tutorial)

Welcome to your first PEAXACT tutorial where we will walk you through the steps of visually analyzing spectra. This tutorial is for complete beginners, but who knows, maybe even long-time users will learn something new. Note that this tutorial can even be completed with the free PEAXACT Viewer... no license needed.

In this tutorial you learn how to:

  1. Load spectrum files and timestamps.
  2. Add feature values to spectra by hand.
  3. Add feature values using the Join Table Tool.
  4. Visualize spectra and feature values.

If you have PEAXACT installed on your computer you may try this tutorial right away. If you don't have PEAXACT yet, get the free PEAXACT Viewer now.

Preparations

Before we embark on our journey of data exploration, let's ensure you're all set:

  • Make sure you have PEAXACT version 5.9 or later installed. If not, upgrade now.
  • No need for a license; this tutorial can be completed with the PEAXACT Viewer, which is completely free of charge.
  • The data for this tutorial resides in %ProgramFiles%\S-PACT\PEAXACT 5\Data\Raman – Reaction. Throughout the tutorial, we'll refer to this directory as DATA.

Get Started and Load Spectra

We're setting the stage for our visual exploration.

  • Launch the PEAXACT Desktop App from your Windows Start Menu.
  • If you don't have a license, simply choose PEAXACT Viewer.
  • Begin a new session by selecting File > New Session > Raman.
  • Now, load some spectra. In this case, choose File > Load Samples, browse to DATA\Analysis, and select all files in this directory.

We loaded our first Raman spectra into the software. You will analyze this time series from a first-order reaction (substrate → intermediate → product) sampled at non-equidistant points in time. So let's dive into the core of the tutorial, exploring Raman spectra visually.

Open the Data Inspector

While the PEAXACT main window is mostly for creating models and performing model-based analyses, the Data Inspector lets you view spectra and associated features. The Data Inspector has two tabs: the Data Table Editor and the Data Plotter.

In the next steps, we demonstrate how to use the Data Table Editor to add additional feature values to samples, e.g., timestamps, text, and numbers. Subsequently, we switch to the Data Plotter. Here we can generate graphs which make use of feature values, e.g., by arranging line plots along the axes or for color-coding. This is an excellent way to highlight trends and correlations in the data, and along the way generates neat pictures for documentation or publication purposes.

If you want to skip the data preparation steps, load the prefabricated data table: DATA > Load Table > Data\Raman – Reaction\DataTableReaction.xlsx and continue with step Data Plotter – Samples (2D).

Let's start by opening the Data Inspector.

  • Select all samples in the Samples Panel (CTRL+A).
  • Select Data > Data Inspector from the main menu to open the Data Inspector.

Load Timestamps

The Data Table Editor can be used to add, remove, and modify sample features. Each feature is represented by a table column. The first two columns are read-only; they contain the sample's directory and file name. Timestamp is a special feature name to specify the acquisition date and time of the sample spectrum.

  • Select all samples in the Data Inspector (CTRL+A).
  • Select Load Timestamp to automatically load the timestamp from selected files.

Adding Features

Feature names can be anything. When put in curly braces (e.g., {Group}), features are treated as categorical, otherwise as numerical. Values of numerical features must be numeric. Values of categorical features can be text or numbers, though numbers are treated as text.

  • In the bottom-right panel, enter {Batch ID} into the new name field and hit Enter or click [+] to add the new categorical feature. We want to use {Batch ID} to distinguish spectra by batch.
  • Enter batch jc into the yellow filter field of column Sample to find files from batch JC.
  • Enter JC into the first table cell in column {Batch ID}.
  • Copy the first cell (CTRL+C), select all cells in column {Batch ID}, and insert the copied value into the selection (CTRL+V).
  • Clear all column filters to show the full table again.
  • Enter QT for the remaining cells (as before: use CTRL+C, select empty cells, CTRL+V).

A crucial step in putting together your data set is adding reference values which are often stored in external spreadsheets. Instead of manually copying over values one by one to the related spectra, the PEAXACT Data Inspector provides a convenient way for automatically joining tables. If your current table in PEAXACT and your reference table have (at least) one feature in common, it can be used for matching up rows of both tables. For example, you can join tables by matching timestamps.

  • From the toolbar, select the Join Table Tool to add more features from a second table.
  • In the Join Table Dialog Window, select Load.
  • Browse to %ProgramFiles%\S-PACT\PEAXACT 5\Data\Raman – Reaction and load TemperatureLogfile.xlsx.
  • Select the following Merge Options:
    • Key = Timestamp
    • Match = closest
    • Tolerance = Inf seconds
    • For other columns with identical names = keep A only
  • Select OK to join tables and close the dialog window.
  • Back in the Data Inspector Window, select Apply.

We are well prepared now. It is time to create some nice pictures and explore the data visually.

Samples (2D) Plot

The Data Plotter can be used to generate various 2D and 3D charts of spectra, using the associated feature values for filtering, arranging, and color-coding the plots.

The Samples (2D) Plot is useful for finding relevant spectral regions, spotting bad spectra, and revealing trends & correlations between spectra and features. Often it is possible to emphasize trends and correlations by means of data pretreatments.

  • Switch to the Data Plotter Tab.
  • From the top-right dropdown list, select Samples (2D).
  • From the toolbar, select the Zoom Tool to zoom in on peaks. Double-click to reset the zoom.
  • You may observe fluorescence effects in the spectrum that require correction. In the Data Pretreatment Panel, set Baseline Correction = Rubber band subtraction to remove the baseline.
  • You may notice redundant peaks that can be ignored. In the Data Pretreatment Panel, set Global Range = 0   950 (enter the two numbers separated by a space) to focus on peaks in that region.

The Data Pretreatment Panel provides options for manipulating the sample signal (without altering the original spectrum file). Typical data pretreatments for spectroscopy are resampling, range selection, baseline correction, smoothing, derivatives, and standardization.

  • Select Samples (2D).
  • Select C = Timestamp to color spectra by time.
  • From the toolbar, select the Profile Cursor Tool .
  • Click anywhere in the plot to add a profile cursor. Click again at 910 cm-1 to reposition the cursor at the Substrate peak.
  • Hold the ALT key and click again to add another profile cursor. Add cursors at 760 cm-1 and 664 cm-1 for Product and Intermediate.

The Profile Cursor Tool is available for the Samples (2D) plot. Use it to display spectral profiles, i.e., intensities at a clicked position over all spectra. The profile preview (the little yellow graph) shows intensities plotted against the C-variable. If C = Timestamp, the profile shows a trend over time. If the C-variable is a numerical feature, e.g., a component concentration, the profile shows the intensity correlation with that feature.

Intensity Surface (3D) Plot

The Intensity Surface (3D) Plot is useful for exploratory data analysis and visualization of continuous processes.

  • Switch to the Data Table Editor and filter column {Batch ID} by choosing JC from the filter’s dropdown list. Filtering the table also affects which samples are displayed in the Data Plotter.
  • Switch back to the Data Plotter and select Intensity Surface (3D).
  • From the toolbar, use the Rotate Tool to rotate the chart. Double-click to reset the view.

Samples (3D) Plot

The Samples (3D) Plot is useful for visualizing the effect of two features at the same time (e.g., Timestamp and Temperature).

  • Select Samples (3D) in the Plot Panel.
  • Select X2 = Timestamp
  • Select C = Temperature
  • Select Colormap = Inferno

Conclusion

Congratulations! You've successfully completed the data exploration tutorial with PEAXACT. Ready for more? Check out our other tutorials at the PEAXACT Quick Start page!

Feel free to reach out if you have any questions, and happy exploring with PEAXACT!

 

SPACT GmbH

Burtscheider Str. 1
52064 Aachen
Tel.: +49 241 - 9569 9812
Fax: +49 241 - 4354 4308
E-Mail:
Internet: www.s-pact.de