Callbacks¶
Callbacks process data produced by services. Camera callbacks receive frames and timestamps. DAQ callbacks receive analog input chunks and metadata. Use callbacks to save data, display live previews, or stream derived information.
Protocol Syntax¶
Callbacks are configured under a service block:
GCM:
callbacks:
save_avi:
save_timestamps:
disp_fast:
framerate: 10
DAQ:
callbacks:
save_h5:
plot_fast:
channels_to_plot: [0, 1]
Use an empty value when a callback has no parameters. Use a nested mapping when the callback accepts options.
Camera Callbacks¶
Name |
Purpose |
|---|---|
|
Display frames with OpenCV. |
|
Display frames with pyqtgraph. |
|
Save frames with OpenCV |
|
Save frames with an ffmpegcv backend. |
|
Save frames through VidGear. |
|
Save video with NVIDIA Video Processing Framework. |
|
Save image frames to HDF5. |
|
Save image frames to Zarr. |
|
Save system and camera timestamps. |
Some video writers require optional packages or GPU-specific binaries. Confirm
support on the rig with etho version --debug and a short test run.
DAQ And DLP Callbacks¶
Name |
Purpose |
|---|---|
|
Save analog input chunks and metadata to HDF5. |
|
Save analog input chunks and metadata to Zarr. |
|
Display traces with pyqtgraph. |
|
Display traces with matplotlib. |
|
Save DLP frame or stimulus metadata. |
plot_fast and plot can limit displayed channels:
callbacks:
plot_fast:
channels_to_plot: [0, 1, 2]
Writing A Callback¶
See Extensions.