Skip to content

Conversation

@resatomo
Copy link
Collaborator

  • Low-pass filter cursor position before speed is estimated because the cursor position is sometimes jittered by optitrack issues
  • Update docstrings

@resatomo resatomo requested a review from mtringi January 12, 2026 01:31
init_pos_trial ((ntr, 3), optional) : If initial target position is different for each trial,
you should specify initial target position (x,y,z coordinates) for each trial. If you don't specify init_pos_trial,
this function assume that initial target positon is always the origin (0,0,0). (default is None)
butter_order (int or list, optional) : the order for the butterworth filter. If it is a list, the first element is used for
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add note that list should not be greater than 2 values?

speed_tmp = np.diff(dist)/(1/fs)
speed_tmp = np.insert(speed_tmp,0,speed_tmp[0]) # complement the first data point
speed = signal.filtfilt(b, a, speed_tmp, axis=0)
speed = signal.filtfilt(b2, a2, speed_tmp, axis=0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to also return the speed profile of each trial since it is already being calculated?

@resatomo resatomo merged commit 6628407 into master Jan 12, 2026
1 check passed
@resatomo resatomo deleted the tomo-modify_movement_onset branch January 12, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants