g-PRIME
Physiology Recording & Identification of Multiple Events

Gus K. Lott III, Ph.D.

Software Oscilloscope & Data Logging
Spike Detection & Analysis
Real time & Offline


[ Home | Download | Documentation | Future Goals | Source | About the Author ]
[ Applications of g-PRIME (screenshots & data) ]

Real-Time Analysis



Offline Analysis

4.1 Loading a File

The user may also load a previously stored data file for offline analysis. In all cases, only a single file may be loaded at a time. If multiple channels of data are present, the interface will prompt for a channel selection. Supported formats are:

  1. (*.daq) Raw Matlab data acquisition file format with data stored in interface native format. In addition to channel selection, you may also select individual triggered recording intervals if the session included multiple software voltage level or manual trigger events.
  2. (*.mat) a Matlab MAT file containing the variables ‘data’ and ‘time’. The variable ‘time’ should be a monotonically increasing sequence with a fixed sample rate and ‘data’ should be real numbers.
  3. (*.txt) Raw text files may be loaded consisting of delimited values detected by the matlab “load” function automatically. Values should be arranged in columns. The first column will be treated as the time vector and subsequent columns will be treated as individual channels of data.
  4. (*.wav) A Wave audio file may be loaded into the interface for analysis
  5. (*.nbb) A file from “StimScope” written by Dr. Bruce Land (Cornell University) is also supported for offline analysis.
  6. (*.abf) Axon Instruments version 1.8 files
4.2 How Data is Displayed

When a data file is loaded into the display window in the analysis mode, the entire data file is broken up into 1000 bins and the max and min point are calculated for each bin. Only these 2000 points are displayed in the graphics window. Whenever a zoom is performed, the bins are recalculated for that subset of the data that is in the zoomed window. This allows for faster processing (less graphics load). All analysis is done on the unmodified data which is stored in memory (not in the graphics display).

4.3 Differences from Real-Time Analysis Features

Offline analysis features are nearly identical to Real-Time analysis features with a few notable exceptions. When modifications are made to the band-pass filters and threshold levels, the user must click the “Calculate” button in the bottom right of the “Data” panel.

The user may actively extract subsets of values from clustered threshold results in the analysis window (as described in the next section), and event correlation (event triggered averaging) is applied by loading a subset of analysis events (text file) into an actively loaded target channel for correlation.

Report Generation features have more available graphics options in Offline Analysis Mode.

4.4 Extracting Result Subsets When a file is loaded into the analysis window and a set of analysis values are generated, the user may select a sub-region of values in the space for display. Buttons appear under the analysis axis which will activate group selection and instructions appear above the axis.

Either a rectangular region may be defined (2 points) or a polygon may be drawn to enclose oddly shaped distributions. When the region is defined, events corresponding to the points in the space are extracted from the dataset and overlaid in a separate report window. Activating the “Max” checkbox will center event traces in the extracted window on the peak of the signal in the window instead of on the threshold crossing. This may be useful if signals have varying amplitudes (causing different threshold cross locations) but identical temporal pulse shapes.

Extracting clusters of spikes from a data set. A subset of analysis values, rates, and raw traces may be extracted, visualized and, saved using an arbitrary shaped polygon in a parameter space.

The resulting window has several customization parameters in the “Options” menus.

Display Data (For Report Generation)

  • Display source w/ extracted signals. The raw data trace is displayed with only the subset of events highlighted (red).
  • Display cluster with subset illustrated. This is a copy of the analysis subset graph in the main analysis window with selected values colored red and unselected values colored black.
  • Raw Traces are overlaid
  • Both the event rate and interval may be visualized for the subset of values to see behavior of an individual unit.

4.5 Visualizing & Grooming Extracted Analysis Subsets

When event subsets are extracted for analysis using polygon zones, further clarification of the group components may be carried out. For example, outliers and overlapped signals may be manually selected by clicking on the trace or the event in the cluster. When the trace is selected, the event is highlighted blue. If the user wishes to remove a selected event from a particular subset of events, the trace may be removed from the analysis values by pressing the delete key on the keyboard.

 
An Extracted data set (2 clusters from an analysis display) which represent two spike classes. Outliers may be selected and groomed from a data set (right).

4.6 Saving a Subset (Analysis & Raw Traces)

A selected and groomed subset of events may be saved to a file. Full 7-column analysis values corresponding with the selected subset may be saved to a text file as before and the raw traces may be saved to a text file formatted with a time vector as first column and subsequent columns representing amplitude values for each trace.

This subset of events may be reloaded later for offline correlation analogous to the real-time correlation function described earlier. Both data saving options are available from the “Options” menu in the “Analysis Subset” window.

Raw windows of amplitude points may be used outside of g-PRIME in dimensional scaling and overlap decomposition programs outside the current scope of the project.

4.6 Offline Event Correlation

Once a subset of events have been extracted and groomed from a data set based on a polygon threshold in an arbitrary event metric space, these events may be loaded back and correlated with corresponding time values in another data set.

In order to correlate an offline data set with extracted time points, load the file/channel containing the correlation target to the main analysis window. Select “Correlate with Extracted” from the “Analysis” menu in the analysis window. The user will be prompted to select a text file, a correlation window width, whether to center the window on the event or to only correlate after the time points in the file, and whether to include the raw traces in the background of the display for visualization of a correlation. The user is also prompted to select if the traces are correlated according to the time of the threshold cross or according to the peak amplitude value.

The result is displayed with all raw traces extracted and overlaid in the background (if selected) of a new figure. The mean value of all traces is displayed in blue and the median value is displayed in green. Alignment of the mean and median traces indicates high confidence in correlated values.

Autocorrelation in a given trace. The first spike in a bursting neuron was extracted and saved. The subset was reloaded and correlated with itself to get a picture of subsequent timing in the neuron after the first spike.


Real-Time Analysis


(c) Gus Lott 2007