Encoding model: running/LP/pupil regressor issues found during methods verification

Open
#5 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
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
jupyter-notebook, python

Research direction

Start by reading io_utils.running and io_utils.facial_features, then trace how the LP and pupil regressors are loaded for the five listed sessions. Compare the binning, z-scoring, displacement calculation, and lick threshold with the stated expected behavior and related npc_sessions issues. Done means the regressors exclude invalid epochs and sessions, use a meaningful displacement measure, and match the NWB lick threshold.

Written by the indexing model from the issue text.

Description

Impact: UNKNOWN–MEDIUM (affects how the encoding-model regressors are interpreted) · Fix: EASY

Found while writing the behaviour methods (npc_sessions methods draft, 2026-10-19):

  1. io_utils.running bins the whole running series.
    • Running speed contains values up to 1e11 cm/s in optotagging and RF-mapping epochs, and is delayed by seconds in 8 task sessions (see npc_sessions issues).
    • Check that the time bins and any z-scoring exclude non-task epochs, and exclude the delayed sessions.
  2. io_utils.facial_features computes "Euclidean displacement" as √(x² + y²): the distance from the image corner, not a displacement. A displacement from a reference (e.g. the session median), or frame-to-frame motion, is probably intended.
  3. Video-derived regressors (LP, pupil) in 644864_2023-02-02, 644866_2023-02-10, 649943_2023-02-13, 666986_2023-08-15 and 666986_2023-08-17 are mis-timed by up to 23 s (npc_sessions video-timing issue). Exclude these sessions until the timing is fixed.
  4. Minor: the lick threshold is < 0.5 here vs <= 0.5 in the NWB is_likely_lick flag.
Dominant language
Jupyter Notebook
Stars
3
Forks
0
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.

Similar issues

More Data Engineering issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.