File Pulldown Menu

Save Matlab
Import ASCII
Import Binary
Batch Multiple Files

Spectral Preprocessing

Calculation of Derivative Spectra
Normalization (Vector, Offset)
Cut Spectra
Interpolate Spectra
Smooth Spectra
ABS ↔ TR Conversion
Spectral Quality Tests
Baseline Correction
Water Vapor Correction
Noise Reduction
Cosmic Spike Removal
Batch Preprocessing

Spatial Preprocessing

Replace NaNs
Filter Images
Edge Preserving Denoising

Univariate Imaging

Chemical Imaging
Chemical Movie
Frequency Imaging
FWHM Imaging

Multivariate Imaging

HCA Imaging
KMC Imaging
FCM Cluster Imaging
PCA Imaging
VCA Imaging
n-findr Imaging
ANN Imaging
Synthon Imaging
Imaging with Distance Values
Create Composite Images
HCA of Chemical Images


Display Spectra
Set Display Limits
Grid On/Off
Adapt Colormaps
Capture Images
Export Image Data
Image Statistics
Display Large Images
Define ROI
Display Colorbar
Swap Data Blocks
Rotate HSI
Flip HSI

File Information

Show History
Show Instrument Parameters
Show Measurement Parameters
Show Additional Parameters
Edit Parameters
Using the Help Function

Menu Bar 'Tools'

Tools Menu

Help is available for the following functions of the 'Tools' menu bar:
display spectra
set display limits
set color (select and adapt colormaps)
grid on/off
export maps
map statistics
display large maps
define roi
display colorbar
swap data blocks


Display Spectra

This option can be used to manage the appearance of individual spectra, or groups of spectra. You can activate the 'display spectra' window by selecting the option 'display spectra' from the 'Tools' menu bar.
Please note: In order to display more than only one spectrum, check the option 'add spectra' in the Display option window. Then, you can display spectra of your choice by clicking in the IR maps generated from original or processed spectra. The 'display spectra' window will show you all active spectra with the x- and y- pixel coordinates. To select/unselect spectra in the 'display spectra' window use the mouse and hold either key 'Shift' or 'Ctrl' pressed (standard windows behavior).
display spectra window
Activate the context menu by selecting one or more spectra and a right mouse click.
set color: allows to set the color of a selected spectrum/selected spectra.
hide from display: hides spectra from the spectral panel. Spectra can be, however, reactivated afterwards.
remove from display: removes spectra permanently from the spectral panel.
cancel: check out what will happen ;-).


Set Display Limits

A function that permits to enter display limits of the spectral panel. This window can be activated by choosing option 'set display limits' from the 'Tools' menu bar.
set display limits
Please indicated the new settings for the x- (in wavenumbers) and/or y- (usually in absorbance units) axis. Wrong settings will produce an error message.


Select and Adapt Colormaps

Select and adapt colormaps of pseudo-color images.
 change colors
select colormap: allows selection of one of the following colormaps: jet, hsv, hot, cool, bone, winter, summer, autumn, copper, prism, flag, lines, colorcube, i-jet, i-hsv, i-hot, ann, blue-black, red-black, green-black, yellow-black, white-black, cyan-black, magenta-black, blue-white, red-white, green-white, yellow-white, black-white, cyan-white, magenta-white (the latter are useful when creating composite images)
target map: please select whether you want to apply changes to the surface map reassembled from original or processed data.
interpolation: when this check box is activated, hyperspectral maps are interpolated. Otherwise, the maps are textured (see illustration below).
color range compression: permits to increase/decrease the offset and the contrast of the color map. The effects of the respective sliders are illustrated in the image below.
scale manually: permits to modify manually the color map by entering the minimal and maximal z-values into the appropriate edit boxes. When this check box is checked the functions 'set standard', 'invert', and the sliders 'offset' and 'contrast' (color range compression) are deactivated.
set standard: sets the offset and the contrast of the colormaps back to default values.
invert: this immediately inverts the colormaps (this option has been inactivated with CytoSpec version 2.00.01, please use inverted colormaps like i-jet instead).
draw: applies the changes to the pseudo color images.
cancel: closes the application
Attention: there is a known bug when applying modifications of the colormaps: changes made may be ignored (CytoSpec 32-bit versions, only). This unwanted behavior is due an error of the underlying 32-bit graphics library and cannot be fixed. As a workaround you may check and uncheck the checkbox 'interpolation'. 64-bit versions of CytoSpec do not show this bug.

Illustration of the effect of the check box 'interpolation':
 this is a textured map        this is a interpolated map

Illustration of the effects of changing the sliders 'offset' and 'contrast':
(example of the colormap 'jet')
 change colors

The colormap ann (artificial neural network): This colormap is particularly useful to generate maps on the basis of classification methods producing crisp class membership values, such as:
HCA imaging - images re-assembled on the basis of hierarchical clustering
KMC imaging - images re-assembled on the basis of k-means clustering
Synthon imaging - images re-assembling on the basis of Synthon's NeuroDeveloper(TM) neural network software
ANN imaging - images re-assembled on the basis of the Stuttgart Neural Network Simulator (SNNS)
The colormap ann can be individually modified by editing a simple text file 'color.txt'. This file is located in CytoSpec's root directory, usually in C:\program files\CytoSpec\CytoSpec (pre-2.00.05 versions of CytoSpec), or C:\Users\Public\Documents\Matlab (v. 2.00.05 and later) and is read by CytoSpec upon initialization. When editing this file, please use only color names given at chapter 4.3. Extended color keywords. Please back up the original 'color.txt' file and carefully check the spelling (text is case sensitive!)
An example of the content of the file color.txt is given here: color.txt
The settings of the colormap ann define also the following color sequences:
  1. color options of the 'set color' function available from the context menu of the display spectra function.
  2. selectable colors available from the listbox 'color of spectra' of the display options window.
  3. the color sequence is furthermore used to display cluster average spectra of the functions KMC , FCM and HCA imaging (button 'spectra' → button 'plot averages ').


Grid On/Off

This option is available from the 'Tools' menu bar and has effect on the spectral plot window, only. The grid ON/OFF function may be useful when the spectral window is exported via the Capture → Spectral Plot function.


The function capturing false color images is available from the 'capture' option of the 'Tools' menu bar. One can either save the image to a local / network drive hard drive (as bitmaps, map produced on the basis of original, or processed data, spectral window), or alternatively capture the entire CytoSpec window (gui) to the clipboard.
Saving images as bitmaps: Images reassembled on the basis of original spectral data (tools → capture → upper image ) and of processed spectra (tools → capture → lower image ) can be captured. When the corresponding option was selected, it is asked to type in a path and a file name. In order to store the spectral plot you have to select the 'capture → spectral plot' option of the 'Tools' menu bar. The option Grid ON/OFF activates or deactivates a grid of the spectral plot (tools menu) The standard resolution used to capture the bitmaps is 300 dots per inch (dpi). Files are stored in a standard windows bitmap (.bmp) data format.
Capturing program window: Along with storing images or spectra you may also want to take a screenshot of the program window. By choosing the 'capture' → 'window' option of the 'Tools' menu bar and selecting the resolution (72, 150, 200, or 300 dpi) the entire CytoSpec program window is copied to the clipboard.
Other options to export false color images: The function 'capture' is also available from so-called large maps, i.e. false color images displayed in the true aspect ratio, see functions display large maps and options 'composite image' of the FCM, VCA and n-findr imaging functions (for details see the description of the respective function in Multivariate Imaging).

 capture images


Export Maps (Export Image Plane Data)

This function exports image plane data that are used to plot the given false-color image. Image plane data are extracted from the hyperspectral data cubes. Such data form 2D matrices of the size [xdim, ydim] with xdim and ydim denoting the number of pixels in x- and y-direction, respectively. Data are stored in a standard ASCII text file format. Select the option 'export maps → upper plot (or lower plot)' from the 'Tools' menu bar to export the image data. A standard windows dialog box will appear. Indicate then the path and the file name to be stored.
Image data will be stored in the following format (example of an image consisting of M x N pixel spectra, [xdim x ydim]):


The ASCII files are now available for import by to other programs such as Microsoft Excel, Origin or Matlab. Please note that the standard extension of the ASCII image data files will be '*.dat'.

Map Statistics: Construct Histograms from Image Plane Data

This function constructs histograms with the frequency distribution of the actual image plane data that compose the given univariate (i.e. chemical) or multivariate false-color image. Examples of univariate image parameters are intensity values, ratios, or band positions. In cases where the function 'map statistics' was applied to multivariate images, the histogram will illustrate the frequency distribution of cluster membership values, ANN activations, spectral distances, etc. The option 'map statistics' is available from the 'Tools' menu bar. The frequency distribution of hyperspectral image data can be obtained either from original hyperspectral data (upper right image), or any type of processed data (lower right image).
statistics of image plane data
# of pixels: displays the total number of pixels (i.e. the number of pixel spectra) of the hyperspectral data cube.
# of bad pixels: displays the number of pixel spectra with a negative Quality Test.
mean: displays the arithmetic mean value of the image plane data used.
median: shows the median of the image plane data.
std: denotes the standard deviation of the image plane data.


Two-Dimensional Correlation Spectroscopy (2D-COS)

Two-dimensional correlation spectroscopy (2D-COS), or two-dimensional correlation analysis is known as a set of mathematical techniques useful to study changes in dynamic spectra. Dynamic spectra are often represented by spectra series obtained from a sample that was subjected to an external perturbation.
The 2D-COS analysis technique has been initially developed by Isao Noda in the 1980s.
Related web links:
Two-dimensional correlation analysis (Wikipedia)
Main concepts of 2D correlation spectroscopy: Basic principles of generalized 2D correlation spectroscopy are outlined in the following
publication series:
I. Noda. Two-Dimensional Infrared (2D IR) Spectroscopy: Theory and Applications,
1990 Appl. Spectrosc. 44(4): 550-561
I. Noda. Generalized Two- Dimensional Correlation Method Applicable to Infrared, Raman, and other Types of Spectroscopy,
1993 Appl. Spectrosc. 47(9): 1329-1336
I. Noda. Determination of Two-Dimensional Correlation Spectra Using the Hilbert Transform,
2000 Appl. Spectrosc. 54(7): 994-999
To start a 2D-COS analysis select '2D-COS' from the 'Tools' menu bar. This will open two different windows:
  1. A window entitled '2D correlation analysis ... ' which shows the 2D correlation spectrum and mean spectra obtained from the x- and y-spectra data
  2. The '2D control' window, see description and screenshots below

Two-Dimensional Correlation Spectroscopy (2D-COS) - the 2D correlation spectrum window

2D-COS window showing the 2D correlation spectrum


Loading / Getting Data for 2D-COS
Option 1.)
This options obtains x, or y-data directly from the CytoSpec workspace. Select 'Get Data' → 'Get x-data' → 'from original/ preprocessed /derivative / deconvolution data' to get the x-data. To obtain the respective y-data select 'Get Data' → 'y-data' → 'etc.'. The 'Get Data' option is available from the menu bar of the window entitled '2D correlation analysis ... ' (see window above).
Note that option 1 does not allow performing heterospectral 2D correlation analysis.
Option 2.)
Load data in the Matlab imaging format: Select 'Load Data' → 'Matlab imaging format' → 'x-data' from the menu bar of the 2D-COS window to load x-data in the Matlab imaging data format. Select 'Load Data' → 'Matlab imaging format' → 'y-data' to load the respective y-data in the Matlab imaging data format. Matlab imaging data files may contain up to four different types of hyperspectral imaging data cubes: original (unprocessed data), pre-processed, derivative and so-called deconvolution data cubes (the latter 3 types of data must be derived from the original spectral data). For a detailed description of the Matlab imaging data format see
Option 3.)
Load data in the Matlab trace format: Select 'Load Data' → 'Matlab trace format' → 'x-data' to load x-data in the Matlab trace data format. Select 'Load Data' → 'Matlab trace format' → 'y-data' to load the respective y-data in the Matlab trace data format.
For a description of the Matlab trace format see the section below.


Format of the example file 'linescandata.mat' (Matlab trace format)
Matlab trace format files contain spectra series in a 2D data format where the first dimension is the spectral dimension and the second dimension represents the perturbing variable, i.e. time, pressure, temperature, spatial dimension, etc.
Matlab trace files contain a structure array with the following fields:
  1. spc - this field contains the spectral data, a 2D array of double precision floating point values (float32). Columns indicate individual spectra of absorbance, intensity, transmittance, etc. values. The column length indicates the number of data points per spectrum. The number of columns is equal to the number of spectra of the spectra series.
  2. wav - A vector of float32 values, the 'wavenumber' vector, or more general the vector of y-values (frequencies, wavenumbers, Raman shifts or alternative variables). The length of 'wav' must equal the number of data points per spectrum, i.e. size(wav,1) == size(spec,1). Equidistancy of the 'wav' vector is not a requirement.
  3. tos - A character vector of variable length which indicates the type of spectra. Examples: 'Transmission', 'Fluorescence', 'Raman', etc.
  4. war - A vector of float32 values, which denote the perturbing variable of the experiment: temperature, time, voltage. The length of 'war' must be equal to size(spc,2)
  5. vst - A character vector of variable length indicating the type of the perturbing variable. Examples of vst: 'Temperature', 'Time', 'Voltage', or 'Spatial variable'


Options of the 2D-COS control window
2D-COS control window
type of 2D spectrum: defines the type of the 2D-COS analysis, for details see below
spectral regions for 2D-COS analyses: allows to define the [x,y] spectral ranges for 2D-COS
type of reference spectrum: defines the type of reference spectrum to obtain the dynamic spectrum. Valid options are 'no reference' (spectrum), 'average spectrum', (default) 'first spectrum' and 'last spectrum'.
plot contour map: plots a contour map (instead of an interpolated surface map where the color is proportional to the 2D-COS functional values).
fill contour: creates a filled contour map
number of isolines: defines the number of isolines in contour / filled contour maps
select colormap: the type of color maps used to plot surface maps, or to plot the isolines in contour maps
scaling: permits to modify manually the color map by entering the minimal and maximal z-values into the appropriate edit boxes.
apply scaling: scaling values are immediately applied to the colormap when this button was pressed
[x,y] slice coordinates: settings required to plot 1D correlation slices, or to create [x,y] feature plots


Options of the popupmenu 'type of 2D spectrum'
  1. Pearson scaling: the synchronous 2D spectrum with Pearson, or unit variance scaling. Pearson scaling is also used in statistical total correlation spectroscopy [STOCSY] and statistical heterospectroscopy [SHY])
  2. Pareto scale 0.75: the synchronous 2D spectrum with Pareto scaling. The parameter α equals 0.75
  3. Pareto scale 0.50: the synchronous 2D spectrum with Pareto scaling. The parameter α equals 0.50 (Pareto scaling in the strict sense)
  4. Pareto scale 0.25: the synchronous 2D spectrum with Pareto scaling. The parameter α equals 0.25
  5. stat synchronous: the classical (statistical) synchronous 2D (covariance) spectrum
  6. stat asynchronous: the classical (statistical) asynchronous 2D spectrum
  7. disrelation: allows to calculate the absolute of the 2D disrelation spectrum
  8. fft synchronous: alternative implementation to obtain the synchronous 2D correlation spectrum by means of the fast Fourier-transformation approach
  9. fft asynchronous: alternative implementation to obtain the asynchronous 2D correlation spectrum by means of the fast Fourier-transformation approach


to be continued

Display Large Maps

The function 'display large maps' is available from the 'Tools' menu bar but also from the context menus of hyperspectral maps (click by the right mouse button). When this option is chosen, a new window will appear showing the maps in the true spatial aspect ratio.
The following information can be obtained from the 'images in the true aspect ratio':
1. the pixel position of the cursor,
2. (x,y) spatial position of the cursor (obtained from the parameters SZX and SZY)
3. the z-value (absorbance, transmittance, Raman intensity etc.) found at the current cursor location is given.
Further options:
1. the map can be stored as a bitmap by selecting 'capture to bitmap' ('Tools' menu bar).
2. a colormap is available by selecting 'display colorbar' ('Tools' menu bar).
3. the window can be deleted (chose 'exit' from the 'File' menu bar).
4. one can define Regions of Interest (ROI)
5. individual pixel spectra can be replaced by an average of their neighbor spectra, see 'replace spectra' of the 'Tools' menu bar

 window display large maps


Define Region of Interest (ROI)

The function define region of interest (ROI) is available from the 'Tools' menu bar or from the context menus of false color images of the main window (right mouse button click). When this option is chosen, a new window Large Map will appear that shows enlarged images in the true spatial aspect ratio. Furthermore, an additional window 'define ROI' pops up which permits definition of up to three different ROIs in an hyperspectral image.
window 'define region of interest'
listbox ROI #: Up to three different regions of interest can be defined. Switching between active ROIs can be achieved by selecting the appropriate option from this listbox
edit fields 1-15: Please enter the [x,y] coordinates of ROI boundary points (in pixel coordinates) in the respective fields. Alternatively, one can use the mouse - mouse pointer coordinates will be transferred automatically
calculate average spectrum: a tool that permits to calculate/display and store average spectra from all active regions of interest. Works in exactly the same way as the option 'spectra' described in the HCA imaging and KMC imaging functions.
Mann-Whitney test: not implemented yet
t-test: not implemented yet
checkbox outside modus: this option permits switching between in- and outside modi of the ROI definition procedure
checkbox add ROI point: fields that permit definition of additional ROI boundary points
checkbox delete ROI point: ROI points are deleted
checkbox delete ROI: all ROI point definitions made so far are deleted
display ROI draws a region of interest
cancel the routine is aborted

When a region of interest has been marked within the hyperspectral map, the option 'apply ROI → preproc data → ROI #X' from the menu bar of the true aspect ration figure becomes active (see figure below). This function is useful to create a new set of preprocessed spectra from the data block of original spectra by sending spectra from the pre-defined ROI to the block of preprocessed data (existing preprocessed data may be overwritten without warning). Spectral data from outside areas are not transferred; pixels from such regions are filled by NaN values (NaN: Not a Number). Consequently, the function 'apply ROI → preproc data → ROI #X' works in a similar way like a manual Quality Test which means that spectra originating from non-ROI areas can be excluded from all further image processing steps by using preprocessed spectra as inputs. Of note the checkbox 'outside modus' is useful to invert ROIs. Note also that false-color images generated on the basis of preprocessed data contain empty pixels whereas the display mode (black, or colored) of these pixels depends on the settings 'plot NaNs ', for details see function customize).
 define region of interest
Example with two regions of interest defined by means of the ROI definition tool

Options of the 'Tools' figure menu bar:
Capture to bitmap': allows storing the false color images in a *.bmp image format (including ROIs if present)
Replace spectra: this function is useful to replace individual spectra by average spectra of their neighbors. Requires a predefined datablock of preprocessed spectra. Note that original data are not modified. To replace spectra chose 'replace spectra → on' and click onto the corresponding spectral pixel coordinates. Select 'replace spectra → off' when finished.
Display colorbar: displays a colorbar of the active false-color image

Display Colorbar

This function is available from the 'Tools' menu bar and displays a colorbar of the active map. It use the active colormap which is available from the Set Color function of the 'tools' menu bar. Colorbars can be obtained for all types of maps, including Large Maps) and maps produced on the basis of crisp class membership values such as
HCA maps - images re-assembled on the basis of hierarchical clustering
KMC maps - images re-assembled on the basis of k-means clustering
Synthon maps - images re-assembling on the basis of Synthon's NeuroDeveloper (TM) neural network software
ANN maps - images re-assembled on the basis of the Stuttgart Neural Network Simulator (SNNS)

Example of a colorbar for a KMC map. Note that in the example below the active colormap is of type ann. Although only five clusters are displayed, the colorbar will always show the complete colormap which consists here of 27 different colors. Note furthermore, that the sequence of colors is defined by the numbering of colors in the text file 'color.txt' (this file can be found in the root directory of CytoSpec, usually C:\Users\Public\Documents\Matlab). For details, see ann Colormap Four examples of the colorbars of the types jet (top left), hsv, colorcube and hot (clockwise direction).

colorbar for the colormap 'ann' four different colorbars
Colorbars can be captured in the bitmap format. A context menu (right mouse click) offers capturing with, and without labels, respectively.

Swap Data Blocks

Overwrites the original data block by preprocessed data. This function is rarely required; however, the test for thickness of the Quality Test (which can be performed exclusively on original data) may require offset corrected spectra. As original data are lost it is highly recommended to store the data before performing the 'swap data block' function. If the block of preprocessed data is empty CytoSpec returns an error message. To avoid overwriting of the original data as a result of typing error, CytoSpec asks for confirmation (see window below).
 warning message (swap data blocks)


Rotate & Flip

rotate hyperspectral data sets by an arbitrary angle
Data blocks AND images are manipulated such that the spatial dimensions are changed (i.e. swapping the x- and y-dimensions) while the spectral dimension remains unaffected.
Rotate function can be used to rotate the data arrays by 90 degrees clockwise/counterclockwise, or by 180 degrees, respectively.
The Flip function permits the flip the spectral hypercube along the x-axis ('flip horizontally'), or alternatively along the y-axis ('flip vertically')



Copyright (c) 2000-2021 CytoSpec. All rights reserved.