Skip to content

Treat Visiomode 0.5+ "none" responses as no response - #35

Merged
celefthe merged 2 commits into
mainfrom
develop
Oct 2, 2026
Merged

celefthe merged 2 commits into
mainfrom
develop

Conversation

@celefthe

@celefthe celefthe commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Visiomode 0.5+ records misses and correct rejections as a response named "none", with the trial timeout (4–10 s) as the response time. visiomode-analysis treated these trials as having a response, so the timeouts were counted as reaction times in session/subject RT metrics and report plots, the trials got a touch position of 0, and gonogo regressors gave them a cued lever push response regressor instead of the hold regressor. In the Rett dataset this affected 264 of 872 sessions (MM213, MM263, MM361, MM365, MM367, MM372); lever push durations were not affected.

Changes

  • _normalise_no_response() rewrites a "none" response into the form older Visiomode versions use for no response (no response object, response time -1). _flatten_trials() applies it straight after _normalise_legacy_outcome(), so response, response time, touch position, stimulus reconstruction and SDT inference all see no response; stop_time is unchanged.
  • summary() blanks response/response_time for "none" rows in trials CSVs and DataFrames (_blank_none_responses()), so trials CSVs written by v0.4.0 and earlier give correct RTs in visiomode-analysis subject without re-running session.
  • Checked against the Rett dataset: reprocessed trials match the previously preprocessed CSVs on outcome, correction, SDT type, response, response time and position for all 872 sessions. Subject summaries match the existing ones on every shared column for all 20 animals, both when built from fixed CSVs and from stale v0.4.0 CSVs. On a 0.5.2 gonogo session (MM263, 2024-03-01), 64 no-response trials were previously marked as lever pushes: resp_cuedpush drops from 330 to 230 samples and resp_hold rises from 0 to 98.
  • Tests (using trial shapes from real 0.5.2 data): misses and correct rejections with a "none" response, a named lever push keeping its RT, a "none" response read as no response before SDT inference, and summary() on a v0.4.0-style CSV. The four tests that target the bug fail without the fix; the lever push test is a guard against over-correcting.
  • Changelog entry under ## [Unreleased].

@celefthe
celefthe merged commit e6155e6 into main Oct 2, 2026
6 checks passed
@celefthe celefthe mentioned this pull request Oct 2, 2026
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.

1 participant