ibllib.io.extractors.training_wheel

Training wheel extractor from Pybpod output.

ibllib.io.extractors.training_wheel.check_alf_folder(session_path)

Check if alf folder exists, creates it if it doesn’t.

Parameters:session_path (str) – absolute path of session folder
ibllib.io.extractors.training_wheel.get_wheel_position(session_path, bp_data=None, save=False, display=False)
Get wheel data from raw files and converts positions into radians mathematical convention
(anti-clockwise = +) and timestamps into seconds relative to Bpod clock.

Optional: saves _ibl_wheel.times.npy and _ibl_wheel.position.npy

Times: Gets Rotary Encoder timestamps (us) for each position and converts to times. Synchronize with Bpod and outputs

Positions: Radians mathematical convention

Parameters:
  • session_path (str) – absolute path of session folder
  • data (dict, optional) – dictionary containing the contents pybppod jsonable file read with raw.load_data
  • save (bool, optional) – wether to save the corresponding alf file to the alf folder, defaults to False
Returns:

Numpy structured array.

Return type:

numpy.ndarray