Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wheel QC should check polarity #932

Open
k1o0 opened this issue Feb 12, 2025 · 0 comments
Open

Wheel QC should check polarity #932

k1o0 opened this issue Feb 12, 2025 · 0 comments

Comments

@k1o0
Copy link
Contributor

k1o0 commented Feb 12, 2025

The check_wheel_move_during_closed_loop QC test only asserts that the wheel was moved a sufficient amount in any direction. We've since learned that on some rigs the encoder was wired incorrectly such that the extracted wheel direction was inverted. The QC check should be modified to test that the sign is correct for the recorded choice.

def _wheel_move_during_closed_loop(re_ts, re_pos, data, wheel_gain=None, tol=1, **_):
"""
Check the wheel moves the correct amount to reach threshold.
Check that the wheel moves by approximately 35 degrees during the closed-loop period
on trials where a feedback (error sound or valve) is delivered.
Metric:
M = abs(w_resp - w_t0) - threshold_displacement, where w_resp = position at response
time, w_t0 = position at go cue time, threshold_displacement = displacement required to
move 35 visual degrees
Criterion:
displacement < tol visual degree
Units:
degrees angle of wheel turn

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

No branches or pull requests

1 participant