# Negative running speed Neuropixel behavior dataset

**URL:** <https://community.brain-map.org/t/negative-running-speed-neuropixel-behavior-dataset/2141>\
**Category:** General\
**Created:** [February 15, 2023, 10:33pm UTC](https://community.brain-map.org/t/negative-running-speed-neuropixel-behavior-dataset/2141 "2023-02-15T22:33:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertooooo](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/robertooooo/32/243_2.png) [@robertooooo](https://community.brain-map.org/u/robertooooo)\
**Post date:** [February 15, 2023, 10:33pm UTC](https://community.brain-map.org/t/negative-running-speed-neuropixel-behavior-dataset/2141/1 "2023-02-15T22:33:15Z")

</div>

Hi,  
I am looking into the Neuropixel behavior dataset, I see that some sessions (e.g. 1102183214) show a continuous negative speed. Am I to understand that the mouse was running backwards for long stretches of time? That sounds puzzling… In these sessions the speed seems also to be positively correlated with the licking, something quite unusual, normally the mouse stops when he/she is licking (negative correlated).

Thanks!

 ![Screenshot 2023-02-15 at 23.30.26](https://canada1.discourse-cdn.com/flex027/uploads/brainobservatory/original/1X/d323207f5f18f6bb1ad7d6bd6a9daee80bb5e46a.png)

---

<div class="post-metadata">

**Author:** ![corbettb](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@corbettb](https://community.brain-map.org/u/corbettb)\
**Post date:** [February 16, 2023, 7:44pm UTC](https://community.brain-map.org/t/negative-running-speed-neuropixel-behavior-dataset/2141/2 "2023-02-16T19:44:26Z")

</div>

Thanks for catching this! This is a bug due to a hardware malfunction in our behavior boxes that flipped the polarity of the running signal (the mice definitely aren’t running backwards!).

You can track progress on resolving this bug (and see a list of impacted sessions) here:

> <https://github.com/AllenInstitute/AllenSDK/issues/2661>
>
> \*\*Describe the bug\*\*
> Due to a hardware malfunction, the polarity of the encoder… used to measure running speed was flipped for a number of behavior sessions run on the behavior boxes for the visual behavior neuropixels dataset. The nwb files for these sessions appear to indicate that the mouse was running backwards. Here's a plot of the running for one of these sessions (note in particular the negative values on the right plot):
> 
> !\[1079013681\_change\_triggered\_running\](https://user-images.githubusercontent.com/8775049/219467395-7028509e-10cb-434a-84f5-edc707ee0e02.png)
> 
> Engineering can't provide an exact list of impacted sessions, but looking at the histogram of mean speeds across sessions, they recommend a threshold of -1 cm/s, which looks like a reasonable cutoff:
> 
> !\[image\](https://user-images.githubusercontent.com/8775049/219468169-b542f165-9a21-4c16-afa9-5768ee5e135e.png)
> 
> Here are the behavior session ids for the sessions with mean speeds less than -1. Manual inspection confirms that all of these sessions appear to have flipped encoders.
> 
> \['1102211933',
> '1091800400',
> '1029420108',
> '1099395913',
> '1100194778',
> '1099832458',
> '1099623071',
> '1101322871',
> '1100688180',
> '1079013681',
> '1100176592',
> '1101486794',
> '1096658058',
> '1092231641',
> '1100230109',
> '1100793165',
> '1079223135',
> '1078579330',
> '1099164948',
> '1098371885',
> '1098141739',
> '1096262499',
> '1099579114',
> '1096465710',
> '1078783957',
> '1096951446',
> '1100087539',
> '1101080541',
> '1102183214',
> '1101698040',
> '1099898239'\]
> 
> 
> \*\*To Reproduce\*\*
> Plot the running over time for any of the above session nwb files.
> 
> \*\*Expected behavior\*\*
> The sign of the running traces for these sessions should be flipped (ie the running values for these sessions should be multiplied by -1)
> 
> \*\*Do you want to work on this issue?\*\*
> Happy to help validate these when the bug is fixed.

---

<div class="post-metadata">

**Author:** ![robertooooo](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/robertooooo/32/243_2.png) [@robertooooo](https://community.brain-map.org/u/robertooooo)\
**Post date:** [February 20, 2023, 10:10am UTC](https://community.brain-map.org/t/negative-running-speed-neuropixel-behavior-dataset/2141/3 "2023-02-20T10:10:17Z")

</div>

Thanks!
