Behavioral videos for 8-Neuropixels recordings from Stringer et al 2019 Science
2019-07-01T19:18:14Z (GMT) by
Companion to https://janelia.figshare.com/articles/Eight-probe_Neuropixels_recordings_during_spontaneous_behaviors/7739750
For each of the three datasets, two movies were recorded: one zoomed in on the mouse's right eye, and one zoomed out on the frontal aspect of the mouse including face and forelimbs. The eye video looks straight at the eye so the mouse's nose is to the right and tail is to the left. The front video looks straight at the mouse, so the mouse's right side is on the left side of the frame.
Video format is 'mj2', motion jpeg 2, with compression ratio 5. In matlab video frames can be loaded with:
>> vr = VideoReader('filename.mj2');
>> img = read(vr, frameIdx);
Eye videos were taken at ~100fr/s and face videos at ~40 fr/s. Timestamps of the frames in the same timebase as the spiking data are given in the _timestamps.npy files. These files have a particular format: an Nx2 matrix where the first column is frame numbers and the second column is the time in seconds at which those frames occurred. So, to get the time at which every frame occurred, use this line in matlab:
>> tsData = readNPY('...timestamps.npy');
>> nF = get(vr, 'NumberOfFrames');
>> allTS = interp1(tsData(:,1), tsData(:,2), 1:nF);
That's just linearly interpolating between the times given for the various frames for which exact times were registered in the alignment system.
Questions/problems to nick.steinmetz at gmail.