ibllib.io.extractors.video_motion

A module for aligning the wheel motion with the rotary encoder. Currently used by the camera QC in order to check timestamp alignment.

Functions

find_nearest

Classes

MotionAlignment

find_nearest(array, value)[source]
class MotionAlignment(eid, one=None, log=<Logger ibllib (INFO)>, **kwargs)[source]

Bases: object

roi = {'body': ((402, 481), (31, 103)), 'left': ((800, 1020), (233, 1096)), 'right': ((426, 510), (104, 545))}
align_all_trials(side='all')[source]

Align all wheel motion for all trials

static set_roi(video_path)[source]

Manually set the ROIs for a given set of videos TODO Improve docstring TODO A method for setting ROIs by label

load_data(download=False)[source]

Load wheel, trial and camera timestamp data :return: wheel, trials

align_motion(period=- inf, inf, side='left', sd_thresh=10, display=False)[source]
plot_alignment(energy=True, save=False)[source]