Running speed delayed 0.1–3.1 s in 8 task sessions (and ~5–6 s in optotagging): add QC flag

Open
#178 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
data, testing

Research direction

Start with experiments/methods_behavior_video/ and read outputs/methods_running_licks_video.md, then inspect running_lag_task_all.json and video_timing_classification_v3.json. Confirm how per-session QC flags are represented in the project before deciding where to add this flag. Done means the eight listed task sessions are flagged or annotated and the recommendation to use running speed only in task and spontaneous epochs is recorded.

Written by the indexing model from the issue text.

Description

Impact: HIGH for running analyses in 8 sessions; HIGH outside the task · Fix: MEDIUM (root cause in acquisition; the existing data can only be excluded or approximately corrected)

Running speed was cross-correlated with leg motion energy in the side video (video timing corrected first):

Epoch Sessions Lag of running speed
Optotagging 742903_2024-10-24, 681532_2023-10-18 5.3–5.9 s
Task 48 confirmed ≤ 4 frames
Task 8 0.1–3.1 s

The 8 task sessions: 733891_2024-09-18 (3.1 s), 626791_2022-08-15 (2.5 s), 741148_2024-10-18 (2.1 s), 733780_2024-09-04, 761583_2024-12-16, 712815_2024-05-21, 712815_2024-05-22, 714753_2024-07-02 (0.1–0.8 s, often shrinking during the session).

Of the remaining task sessions, 19 are unresolved but probably fine (lag −0.5 to +2.5 frames), and 2 have no usable window.

Timestamps-to-vsync mapping is exact, so the delay is in the encoder data itself (see the DynamicRoutingTask issue).

Action:

  • Add a per-session running-timing QC flag. Exclude or annotate these 8 sessions.
  • Recommend using running speed only in task and spontaneous epochs.

Evidence: experiments/methods_behavior_video/ and outputs/methods_running_licks_video.md in npc_sessions (local, 2026-10-19; datacube v0.0.289, 82 brainwide sessions). Key files: running_lag_task_all.json, video_timing_classification_v3.json.

Dominant language
Python
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AllenInstitute/npc_sessions

All issues in AllenInstitute/npc_sessions

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.