Loading Wheel Data

Wheel data recorded during task

Relevant Alf objects

  • wheel

  • wheelMoves

Loading

[2]:
from one.api import ONE
one = ONE()
eid = '4ecb5d24-f5cc-402c-be28-9d0f7cb14b3a'

wheel = one.load_object(eid, 'wheel', collection='alf')
wheelMoves = one.load_object(eid, 'wheelMoves', collection='alf')

More details

Useful modules

Exploring wheel data

Example 1: Extract wheel velocity

[3]:
from brainbox.behavior.wheel import velocity

wh_velocity = velocity(wheel['timestamps'], wheel['position'])
C:\Users\Mayo\iblenv\ibllib-repo\brainbox\behavior\wheel.py:84: RuntimeWarning: divide by zero encountered in true_divide
  vel = dp / dt

Example 2: Find linearly interpolated wheel position

[4]:
from brainbox.behavior.wheel import interpolate_position

wh_pos_lin, wh_ts_lin = interpolate_position(wheel['timestamps'], wheel['position'])

Other relevant examples