![]() |
Physiology Recording & Identification of Multiple Events
Gus K. Lott III, Ph.D.
Software Oscilloscope & Data Logging |
![]() |
| Stimulus Generation | Offline Analysis | |||||||||||
|
3.1 Connecting to an Active Signal and Visualizing The analysis window is accessed through the yellow "Data Analysis Mode" Button in the right portion of the g-PRIME scope window. The user may link the analysis window to a real time source by selecting the “Scope Channel” option from the Source menu in the g-PRIME Analysis window. Once the “Scope Channel” mode is selected, the user may select which of the active traces to connect to from the “Source Chan” pop-up menu under the data display trace. The user may frame the real time data through the Zoom/Pan function in the main Data panel. Zoom to specify a vertical range on an active data trace. When the next sweep occurs, the data trace horizontal limits will be reset to the sweep width. Depending on the time base of the main scope display, the real time analysis window will have 50ms, 100ms, or 200ms of data per sweep. Any scope sweep width higher than 200ms will report 200ms sweep widths to the analysis interface for calculations. 3.2 Signal Conditioning
The user may also apply arbitrary FIR filter coefficients in an ASCII Text file. The coefficients should be of a form suitable for the matlab "filter" function. The first column of the text file should be the "b" coefficients and the second column should be the "a" coefficients. If there is only one column, "a" is assumed to just be 1 and the column of values is assumed to be "b" otherwise, the two columns must have the same length (pad with zeroes if necessary). When the user has selected and/or loaded all of the filters that they wish to apply to the signal, the entire filter spectrum (amplitude and phase) may be visualized from the option in the analysis drop down menu. The user may also “Rectify” the signal for easy threshold based detection (i.e. negative sweeping values will be captured by a positive threshold level). When “Rectify (for detection only)” is selected from the “Analysis” menu, the absolute value of signal amplitudes is displayed and will be used to detect events. Analysis metrics are calculated from un-rectified data. 3.3 Amplitude Threshold Event Detection (Single & Double)
Two thresholds are available for event detection. Threshold crosses are detected in a direction relative to the mean value of the signal. If the threshold is placed below the mean of the signal, falling edge events are detected which cross the negative threshold relative to the mean. If the threshold is placed above the mean of the signal, rising edge events are detected. The active threshold closest to the mean value of the signal will trigger all event detection above that level. Analysis is carried out on all of these events. If a second threshold level is set, detected events with peak amplitudes between the two thresholds are kept while values that peak outside of the threshold range are discarded. g-PRIME will detect events that cross the threshold and center the analysis window based on the selection from the “Window Center on Threshold” menu under the “Analysis” menu. The default is 50% of the window before the threshold cross. If you wish to have the system display a full red trace overlay of the exact data points of a detected event, this option is available from the analysis menu. If this option is not selected, events are indicated by a vertical red line centered at the time of the threshold crossing and extending from the min to max amplitude of the window. 3.4 Analysis Metrics (the g-PRIME transform) When an event is detected, several analysis values are calculated and may be displayed in the analysis graph at the bottom of the screen. When data is saved to a file, interval and rate data is not stored. It is assumed that the user can calculate these values given the event time offline. Also included in the offline analysis results file are the time of the max and time of the minimum events.
3.5 Visualizing Analysis Parameters The analysis display is manipulated by controls in the bottom right of the analysis window.
Histogram Y
Y-Axis Metric
X-Axis Metric 3.6 Real-Time Analysis Parameter Thresholding
While amplitude thresholds in the raw data trace offer some limited event discrimination, further event discrimination may be activated in terms of threshold ranges in the “Energy Density” and “Peak Frequency” space. Select either parameter as the Y-Axis Metric value and independent checkboxes will appear which allow for threshold activation. When an analysis based threshold is activated, you may drag the two lines in the analysis plane to specify the acceptance region for events. When an analysis parameter region is selected, you may then switch to another display mode such as Rate, Interval, or amplitude and monitor only the behavior of the subset of events. For example, frequency thresholds may be used to select a single type of discharge (in the above figure, an electric fish discharge) and the rate behavior of a single element (rasping or decaying) may be visualized in real time. 3.7 Real-Time Event Correlation (Autocorrelation or Cross Correlation) While the user will not have access to the raw trace information as displayed with offline analysis, the user may actively accomplish a cross-correlation or an autocorrelation of signals. Signals are actively acquired into a running event triggered average. The pair of thresholds may be used to limit the amplitude range of event for the real time correlation. Peak Frequency and Energy Density thresholds (as described in the last section) may also be activated to discriminate correlated events. To activate the correlation interface, select “Real Time Correlation” from the “Analysis” menu. A trace window will appear and controls will activate that will allow you to select a window width for signal averaging, a source for the time triggered average, and whether or not to center the average window on the threshold cross or to use the threshold cross as the beginning of the average window. The user may also use the “Reset Avg” button to clear the contents of the correlation window. The threshold cross time amplitude value of the target region is set to zero in all extracted traces.
3.8 Saving Analysis During Real-Time Analysis, only the 1000 latest events are stored unless the “Retain all Real-Time Analysis” option is checked in the “Analysis” menu (to prevent processor loading from graphics updates of many thousands of points). At any time, all stored analysis values may be saved to a text file (one event per row of columns) via the “Save All Analysis” option in the “Results” menu. Saved .txt files with analysis parameters consist of 7 columns of data points and a number of rows of data equal to the number of detected events. Rate and Interval are not stored as these are easily obtained from the event time value. In addition to the above mentioned values, the time codes for the maximum and minimum amplitudes are stored. The columns in saved analysis text files are as follows:
Column 1: Time of Threshold Crossing This table is available in the help menu in the analysis window for reference. 3.9 Histogram Generation Event histograms may be generated for any of the parameters in the interface. Selecting a specific variable from the “Generate Histograms” option in the “Results” menu launches a figure containing the histogram for saving as a graphic.
| ||||||||||||
| Stimulus Generation | Offline Analysis | |||||||||||