-
Notifications
You must be signed in to change notification settings - Fork 151
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
Running speed incorrectly calculated. #1741
Comments
Hi Colleen, thanks for the report. Looks like we overlooked this module in our update. Edit: |
Regardless, this seems pretty cut and dry to me. You're welcome to make a PR if you'd like, otherwise we'll add it to our sprint schedule for fixing. 👍 |
@kschelonka right, that wasn't very clear. I meant that the bug was introduced in the most recent commit where this specific script was modified. But you are right, that commit was made back in Sept 2019, so it is a longstanding bug. |
Fixes 2 errors in allensdk.brain_observatory.extract_running_speed.__main__.py in `extract_running_speeds()`. In the if/else statement (lines 61-65), 1) the second consecutive `=` (a typo) was corrected to `\` so that `dx_rad` is divided by median duration. 2) The if/else clauses were switched, so that the if `use_median_duration` statement is the one that uses np.median(durations) and not v.v.
…main Fixes 2 errors in allensdk.brain_observatory.extract_running_speed.__…
Describe the bug
2 errors introduced by latest commit to
allensdk/brain_observatory/extract_running_speed/__main__.py
inextract_running_speeds()
.use_median_duration
is True, and is used otherwise.else
statement,angular_velocity
is accidentally set to the median duration due to a=
instead of a/
on line 65. As a result, the running velocity array is set entirely to a single repeating value, namely the median duration.allensdk version 2.3.0
FIX:
should be
The text was updated successfully, but these errors were encountered: