PeakLab v1 Documentation Contents AIST Software Home AIST Software Support
Generate GLM Data Matrix
The Build GLM Data Matrix from Spectral PFD Files... item in the Model menu is used to construct a spectral data matrix using the program's PFD data files. Each PFD file can contain up to 25 different spectra, and up to four different Y variables can be added to a spectra-bearing PFD file. These are normally used for the Explore option in the peak-fitting review, but are also available for the GLM (general linear model) data matrix export.
Build GLM Data Matrix from Spectral PFD Files...
When this Model menu item is invoked, select as many PFD files as you like. You can hold the Shift key down to select all files between two bounds in the file list, or you can hold the Ctrl key down to select the files one at a time. All of the spectra from all of the files will be assembled into a single data matrix. Only the top data level of the PFD file is exported.
If you have multiple data levels in a PFD file and you want to export a non-uppermost level, it is recommended that you first save the file using a different name, and then use the Revert button in the main window to make the desired data level the uppermost in the file. Typically, for spectroscopic modeling, you will want the raw data, which is labeled 'Imported Data' by default. If you want to modify the data used for the modeling, it is generally easier to use one of the Modify GLM Data Matrix items in the Model menu to alter all of the data in a single step.
This option will always write four Y-variable columns in the exported data matrix. These will be empty if the Map Experimental Process Variables for All Data Sets... option was not used in the specific PFD file.
The above extract of the generated CSV data matrix contains the four Y-variables in columns B-E, and the spectra begin in column F.
Identical Format
All spectra to be exported must have an identical count of X wavelengths or frequencies, and these must match across the different data sets. If this is not the case, you will have to manually create the data matrix.
Map Experimental Process Variables for All Data Sets
While you can export the spectra in any number of PFD data files, and subsequently add one or more Y columns in Excel where the values are manually placed in the data matrix, there are advantages in using the Map Experimental Process Variables for All Data Sets... right click menu item in the main program window. These are not only automatically inserted into the data matrices created with this Generate GLM Data Matrix option but may be useful for the Explore option's 2D and 3D plots of peak fit variables, as well as to appear in the legend of the View and Compare Data option.