neuralib.locomotion.position.interp_pos1d

neuralib.locomotion.position.interp_pos1d(time, pos, *, sampling_rate=1000, norm_max_value=150, remove_nan=True, renew_trial_value=-100)[source]

Interpolate the raw position data

Dimension parameters:

P = Number of position points (Raw)

Parameters:
  • time (ndarray) – An array of time stamps corresponding to positional data. Array[float, P].

  • pos (ndarray) – An array of positional data (a.u, encoder or other hardware readout). Array[float, P].

  • sampling_rate (float) – The rate at which data points should be sampled, defaults to 1000.

  • norm_max_value (float) – The value by which to normalize the positional data, defaults to 150 (cm).

  • remove_nan (bool) – Flag indicating whether to remove NaN values from interpolated data, defaults to True.

  • renew_trial_value (float) – The value used to detect the overflow index which signifies trial renewals, defaults to -100.

Returns:

CircularPosition

Return type:

CircularPosition