Fig. 1: Raw data acquisition, temporal alignment, and recording stability.

a Schematic of recording setup, showing the flow of synchronization pulses and raw data. We use a custom Python program to record RGB images, depth images, and state (on/off) of synchronization LEDs from all four cameras. Neural data and TTL state of LEDs are recorded with a standard electrophysiology recording system. We use a custom Python program to record video frames over USB (60 frames/s) and automatically deliver LED synchronization pulses with randomized delays via Arduino microcontroller. b Close-up images of the depth cameras, showing the two infrared sensors, color sensor, and cables for data transfer and synchronization. c Photograph of recording setup, showing the four depth cameras, synchronization LEDs, and circular behavioral arena (transparent acrylic, 12” diameter). d Example raw data images (top left: single infrared image with visible infrared laser dots; top right: corresponding automatically-generated mask image for recording LED synchronization state (arrow, LED location); bottom left: corresponding depth image, estimated from binocular disparity between two infrared images; bottom right: corresponding color image). e Inter-frame-interval from four cameras (21 min of recording). Vertical ticks indicate 16.66 ms (corresponding to 60 frames/s), individual cameras are colored and vertically offset. Frame rate is very stable (jitter across all cameras: ±26 µs). Arrow, example dropped frame. f Number of dropped frames across the example 21 min recording. g Top row, LED state (on/off) as captured by one camera (the 8-bit value of central pixel of LED ROI mask), at start of recording and after 20 min of recording. Bottom row, aligned LED trace, as recorded by electrophysiology recording system. h Temporal residuals between recorded camera LED trace (g, top) and recorded TTL LED trace (g, bottom) are stable, but drift slightly (49 μs/min, left panel). We can automatically detect and correct for this small drift (right panel). Source data are provided as a Source Data file.