Events Manager

Events Manager

Events Manager is dedicated to visualizing and detecting events stored in analog inputs from LabeoTech imaging systems. It can detect events generated by the imaging system itself or received from external hardware, such as TTL signals and photodiodes. The final goal is to create a validated events.mat in the Save Folder. See the advanced user resource Events for the file structure and programmatic use.

Open from DataViewer

Open continuous .dat data and choose Utilities > Events Manager. DataViewer supplies the Save Folder and its Raw Folder when available. The GUI currently reads LabeoTech ai_*.bin analog-input files; advanced users can process another signal with the EventsManager class in MATLAB.

Events Manager with a detected trigger channel
The interface combines detection settings, trigger-channel selection, signal preview, condition information, and the detection summary.

Controls

GroupControls and meaning
Analog InputsLoad Analog Inputs reads analog sources; the status lists sampling rate, channels, and duration.
Detection ParametersThreshold (or auto), Trigger type, Polarity, Min interstim, and optional Low-pass Hz.
Trial SplittingBaseline s, Auto, and Set establish the pre-event period.
Trigger channelsSelects one or more analog channels used for detection.
Condition Filenone, CSV, or supported external parser; CSV columns can be selected before Update Conditions.
PreviewPlots signal, threshold, detected intervals, and all selected channels.
Condition namesEdit/Apply changes names in memory; Restore returns to the original list or cancels editing.
DetectApplies parameters and rebuilds detected events.
Save events.matWrites validated current event state, asking before replacement.

Ignoring conditions and repetitions

Events from a faulty trigger detection, for example a spurious pulse, can be left out without detecting again. Select a row of the condition table and right-click it:

  • Ignore condition drops the whole condition from the analysis output; its timing still bounds the trial length of its neighbours.
  • Purge condition also removes its timing, for events that are not real stimuli (for example a device-required baseline placeholder). It is refused while the Save Folder holds event-split data.
  • Ignore / restore repetitions... lists the repetitions of the condition with their onset times and a checkbox Ignore for each. Tick the repetitions to ignore, untick to include them again, and press Apply. Only the repetitions whose checkbox changed are affected, and both the start and the end of a repetition. A condition that was ignored as a whole can be restored one repetition at a time here.

Condition table of the Events Manager with its context menu: Ignore Condition, Purge Condition and Ignore / restore repetitions
Right-click a condition row to ignore or purge the condition, or to ignore and restore single repetitions.

Ignore repetitions dialog listing the ten repetitions of the Visual condition with their onset times; repetition 3 is ticked
The repetitions of one condition with their onset times: tick a repetition to ignore it, untick it to include it again, then press Apply.

The condition table shows NRepeats, the repetitions still included, and NIgnored, the ignored ones; both update after every change. Reset ignored/purged conditions returns every ignored or purged event to included in one step. At least one condition and one repetition always stay included: the last condition with included events cannot be ignored or purged, and the repetitions of the only remaining condition cannot all be ignored. Nothing is written until you press Save events.mat; the status line reminds you after each change. Ignored events stay in events.mat and in saved event-split data, flagged, and are excluded from display and from the average of a condition. To decide about a trial after looking at the data, use Delete repetition in DataViewer and save with the Save button of its Events panel.

Events Manager after ignoring repetition 3 of Visual: NRepeats 9, NIgnored 1, and the status line asking to save events.mat
After ignoring repetition 3 of the Visual condition: NRepeats shows the 9 repetitions still included, NIgnored the 1 ignored, and the status line reminds you to save.

Detection parameters

ParameterUse
ThresholdThe voltage crossing used to detect an edge. Auto starts at 80% of the signal span above its minimum; set a number when noise or an unusual pulse amplitude requires manual control.
Trigger type: Edge SetA crossing in the chosen polarity starts an event and the opposite crossing ends it. Use this for pulses whose high or low duration defines the event.
Trigger type: Edge ToggleSuccessive crossings in the chosen polarity alternate between event ON and OFF. Use this when only one edge is recorded for each state change.
PolarityPositive detects upward onset crossings; Negative detects downward onset crossings.
Min interstimMerges closely spaced detections into one burst event when they fall within this number of seconds.
Low-pass HzOptionally removes faster fluctuations before threshold detection. Use 0 to disable filtering.

Edge Set and Edge Toggle trigger interpretation
Edge Set uses opposite edges to mark ON and OFF; Edge Toggle alternates the state at consecutive selected edges.

Trial splitting

The Baseline s value adds a pre-event period before every event onset. The rest of the trial extends from the onset to the imaging frame immediately before the next event onset. In other words, trial length is the baseline duration plus the interval from the current onset to just before the following onset. Review the shortest spacing between events before choosing a baseline that would overlap another trial.

Auto sets the baseline to 20% of the shortest interval between detected event onsets. If only one onset exists, it uses 20% of the remaining analog-recording duration after that onset.

Condition files

The detected pulses define when trials occurred; a condition file can describe what happened on each trial. Choose none when the trigger channel itself represents one condition. For CSV input, select the column containing the ordered condition values, then choose Update Conditions. The number and order of condition rows must match the detected trials after any incomplete boundary events have been removed. Supported stimulus-specific parsers can be selected when their source format is available.

Basic workflow

  1. Load the analog inputs and select one or more trigger channels.
  2. Set threshold, trigger type, polarity, minimum inter-stimulus interval, and optional low-pass filtering.
  3. Choose Detect, then inspect the signal plot, shaded intervals, and Detection Summary.
  4. Set the baseline. Add a condition file when different trials represent different stimuli, and edit the condition names if needed.
  5. Choose Save events.mat. This file supplies event overlays and Event mode in DataViewer, and it supplies timing and trial selections to event-based analysis functions.
  6. Close the tool. DataViewer reloads the event file and returns to Normal mode.

Unsaved changes
Closing with unsaved event edits asks for confirmation. DataViewer does not silently write event metadata.

Field definitions are in Events.


Back to top

Copyright © LabeoTech 2026. This work is licensed under the GNU General Public License, Version 3.0.