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')
/home/runner/Downloads/ONE/openalyx.internationalbrainlab.org/hoferlab/Subjects/SWC_043/2020-09-21/001/alf/_ibl_wheel.timestamps.npy: 100%|██████████| 8.08M/8.08M [00:00<00:00, 13.1MB/s]
/home/runner/Downloads/ONE/openalyx.internationalbrainlab.org/hoferlab/Subjects/SWC_043/2020-09-21/001/alf/_ibl_wheel.position.npy: 100%|██████████| 8.08M/8.08M [00:00<00:00, 19.0MB/s]
/home/runner/Downloads/ONE/openalyx.internationalbrainlab.org/hoferlab/Subjects/SWC_043/2020-09-21/001/alf/_ibl_wheelMoves.peakAmplitude.npy: 100%|██████████| 13.4k/13.4k [00:00<00:00, 99.5kB/s]
/home/runner/Downloads/ONE/openalyx.internationalbrainlab.org/hoferlab/Subjects/SWC_043/2020-09-21/001/alf/_ibl_wheelMoves.intervals.npy: 100%|██████████| 26.6k/26.6k [00:00<00:00, 195kB/s]

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'])
/home/runner/work/iblenv/ibllib-repo/brainbox/behavior/wheel.py:84: RuntimeWarning: divide by zero encountered in 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