SpikeGLX Tutorial
Gates and Triggers Tabs
Gates and Triggers Tabs
Concepts
Gate modes
Trigger modes
g
t
file
0 1 2
0 1 0
0 1 1
222
333
444
g0_t0 g0_t1 g0_t2 g1_t2
g1_t0 g2_t1 g2_t2
g1_t1 g2_t0
Concepts: Gates and Triggers are Nested
When the gate is high the trigger program is allowed to run.
When the trigger is also high file writing begins.
Writing stops when either the trigger or gate goes low.
When the gate goes low, the trigger program stops and resets.
(g, t) = (-1, -1) at run start.
Gate goes high => g-index advances, t-index resets to -1.
Trigger goes high => t-index advances.
All file names carry the current g- and t-index.
Concepts: Concatenation
You can concatenate (join) files to find common spike sorting units.
Sequences of files saved from a single run with constant parameters
are g-series and/or t-series. Such series share a run base name.
Because all the files are drawn from the same continuously streaming
run data, they can be concatenated with preserved actual time. CatGT
can do that by looking at the ‘firstSample’ metadata item that places
each file on this timeline.
CatGT can alternatively squeeze out dead time, or even join files from
disparate runs (supercat), because users asked for that.
Gates
SpikeGLX has two gate control modes:
1. Immediate: Gate latches high at run start (go high, stay high).
2. Remote: Remote SDK client calls TriggerGT(g, t) command.
Both modes have the option to add an ‘Enable/disable Recording’ button to
the Graphs window toolbar. In that case:
1. Immediate: The button toggles the gate high/low.
2. Remote: The button enables/disables response to TriggerGT(g, t).
Immediate mode is selected.
Recording button on Graphs window
toolbar will be shown, with recording
initially disabled.
The button IS THE GATE…
Click high.
Click low.
Click high.
Click low…
Actually, in this mode the button can be
clicked remotely with SDK command
SetRecordingEnable( on/off ).
Triggers
Trigger modes are programs that watch for a defined event type:
1. Immediate: Trigger is a copy of gate.
2. Timed: Trigger high and low intervals follow a clock.
3. TTL: Trigger controlled by external signal (e.g. behavior rig).
4. Spike: Trigger on spike occurrence.
5. Remote: Trigger from remote SDK script.
Immediate mode selected.
The trigger echoes the gate.
Gate high => trigger high
Gate low => trigger low
Basically, writing is controlled by clicking
the ‘Enable/disable Recordingbutton.
Timed mode selected.
Specify either:
1. Start N seconds after gate goes high
and stay high until gate low.
2. Programmed train of high and low
intervals.
TTL mode selected.
Define which channel to follow.
Select whether TTL rising edge:
1. Latches high until gate closes.
2. Triggers high for N seconds.
3. Or, high/low follows TTL high/low.
You can set a required refractory period.
You can set a perievent window width.
Spike mode selected.
When a spike in a given channel crosses the
given threshold, record a perievent file.
You can set:
Maximum repeat count
Required refractory period
Perievent window width
Remote mode selected.
Trigger is controlled via the remote SDK
command TriggerGT(g, t).
More Info
Gate Tab Help
Trigger Tab Help
CatGT App
CatGT User Manual
Tutorial List