Plotter v2.7.0 help

Valter Kiisk

Last revised: November 15, 2010

Table of contents

Overview

The application is meant for quick browsing, searching, comparison, presentation, analysis or conversion of spectra (by a "spectrum" I mean a tabulated dependence of a quantity Y on another quantity X, possibly acquired experimentally). The spectra must be available as a set of single- or double-column (X-Y) ASCII files stored in a folder. Initially the program was designed just for browsing of a database of transmission curves of optical filters, but it has grown to handle various other tasks as well. For example, it can perform simple mathematical operations with the spectra (e.g. multiplication of transmission curves to characterize filter combinations etc), rescale data, label peaks of a spectrum (e.g. Raman spectrum), etc. In spite of these few additional features it must be realized that the program doesn't pretend to be a substitute of a mature graphing software (like Origin), it can just handle some specialized tasks much more efficiently.

The program implements a muliple-document interface consisting of one or more graph windows representing different views of the loaded set of spectra. Each graph can contain several spectra which can be either browsed one at a time or displayed together (handled by commands in the Spectra menu). Only one of the spectra is active at any time (activated by a mouse click) and is subject to the commands in the Selection menu.

The menu commands and various controls in the dialog boxes are described by tooltips (also visible in the statusbar) and are not described here.

Data file format

The X- and Y-columns of an ASCII file must be separated by either a tab, spaces or a comma. Decimal symbol can be either a period or a comma. The file may include header or trailer lines to be skipped (specified when loading the file). The file name becomes the name of the spectrum and the header text constitutes a comment attached to the spectrum (this data can be accessed through the menu command Selection > Name and comment). Each line may optionally end with a comment starting with the number sign #. The comment is displayed in the graph as a label of the data point. Such labels can be added to the graph by perfoming Ctrl+Click on the data point of interest or selecting the command Create mark from context menu (might be useful for identifying spectral lines etc). When saving a spectrum the labels are also written into the file.

Loading spectra

There are several ways to load spectra into the program. If the spectra are contained within a folder (and/or its subfolders) and the filenames are characterized by specific extension(s), the File > Load folder command is appropriate. In that case the folder must contain a "plotter.ini" file that specifies the list of extensions and the format of the files. The command is automatically issued at startup to load files from the program directory.

For loading of individual files use File > Load files command. Same command is issued if files have been dragged from file manager onto the program window. A dialog box asks for formatting information.

Configuration file

"plotter.ini" file employs standard Windows INI file format. An example:

[Files]
FileExt=tra|dat|asc
IncludeSubfolders=1

Headlines=3
Endlines=1
ColSep=tab
DecSep=.

MultX=1
MultY=0.01
MinY=0.0001
MaxY=1
SkipCnt=10
MaxErrorCount=5

This specifies that files with extensions "tra", "dat" or "asc" should be loaded and all subfolders should be scanned. 3 header lines and 1 trailing line should be skipped. Column separator is a TAB character, decimal separator is a period. The Y-values are multiplied by 0.01 and subsequently constrained within the range 0.0001…1 (this might be convenient if experimental data with significant noise is to be plotted in semilog scale). Only every 10th line of the file is read (might speed up the display of very large spectra). If more than 5 errors are encountered when loading a file, the process is cancelled.

As blanks might not be recognized in INI files you should use the words "tab" or "space" instead. Special value "none" indicates single-column data (X-values are taken as a sequence of integers starting from 0).

Default values of the parameters are as follows:

Parameter Value
FileExt dat|asc|txt
IncludeSubfolders 0
Headlines 0
Endlines 0
ColSep tab
DecSep .
MultX 1
MultY 1
MinY -1.7E308
MaxY 1.7E308
SkipCnt 1
MaxErrorCount 0

Combining spectra

Arithmetical operations (Spectra > Create > Combine) between spectra of different origin follow these rules:

  • The X-range of the resulting spectrum is the common X-range of the two operands
  • The X-step is the lesser one of the two operands
  • Y-values are linearly interpolated as necessary