Navigation: Tosca User Guide > Interfacing Tosca with Synapse > Retrieving data from Synapse >

Analyzing data during the run

 

 

 

The data retrieved by Tosca from Synapse can be read by a user-specified MATLAB analysis function. That function is specified in the lower-left of the Tosca main window. The function is called by Tosca once at the end of every trial.


 


 

The only restriction on the user-supplied function is that it must take a single input parameter. Tosca will use this parameter to pass the user function a string containing the path to the main Tosca data file for the current run. The paths to the stored Synapse data can be constructed by replacing the ".txt" extension with ".syn" (for spike time data) and/or ".waves.syn" (for analog data).


General comments

Writing a function to perform meaningful on-the-fly analysis of physiological data is not trivial, for reasons that include

1. Tosca periodically retrieves whatever new data are available in the tank and immediately stores them to disk; the stored data are not segmented in any meaningful way with respect to the Tosca trial structure.

2. MATLAB is slow, and while the analysis function can be designed to simply re-analyze all previously-acquired data each time the function is called, over a large number of trials, the time (and potentially memory) required to complete that re-analysis can become a burden on the system.


 

Thus, the challenges involved in creating an efficient analysis function include the bookkeeping required to "un-segment" the stored data and extract the responses to the desired portion of each trial (i.e. the response to a particular stimulus or behavior), and the ability to perform the analysis incrementally (that is, only on the newest data, adding the result to the already analyzed data).


 

Probably the best way to begin is to examine the simple examples linked below, in particular to see how to use the linked utility functions to handle the messiest details of reading and organizing the data.

Example MATLAB analysis functions

Example MATLAB functions that demonstrate the analysis of data retrieved from Synapse are found at \\Apollo\research\ent\shared\hancock\Tosca\MATLAB\Synapse\Examples

Utility MATLAB functions

MATLAB functions that facilitate accessing and parsing the data retrieved from Synapse are found at \\Apollo\research\ent\shared\hancock\Tosca\MATLAB\Synapse

 

 

 

 

Copyright © 2023 Eaton-Peabody Laboratories