Event Panel

An updated event panel provides real-time information about TTL events and allows you to provide a name, which is then used to create a matching field in the file metadata.

First, this allows for the user to detect if all required events are coming in as expected during the experiment (as opposed to finding out something went wrong when processing the data). Second, it allows processing to refer to events by their name by editing the corresponding field in the table. Third, events to be collected can be enabled/disabled by the state of a checkbox.

When the data are saved, the info structure will contain a structure info.evt with fields corresponding to each named event:

Each named event is, in turn, a structure with the (frame,line) timestamp, along with the absolute time from the start of imaging. This allows users to refer to events by the name in their processing software. So, info.evt.sync.frame will provide the frames at which a sync event arrived. This will be independent of the actual TTL line used for the sync, so long as users name the events correctly.

The default names can be set in a configuration variable. In the case shown above, for example, it would be sbconfig.evt_names = { ‘sync’, ” ,’stim_on’, ‘stim_off’, ‘lick’ ,” ,’reward’, ” }.