Skip to content

Commit

Permalink
Merge pull request #1747 from colleenjg/GH-1741/bugfix/running-speed-…
Browse files Browse the repository at this point in the history
…main

Fixes 2 errors in allensdk.brain_observatory.extract_running_speed.__…
  • Loading branch information
kschelonka authored Oct 15, 2020
2 parents 7dd9dfe + 9c07065 commit 18f49c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions allensdk/brain_observatory/extract_running_speed/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def extract_running_speeds(

durations = end_times - start_times
if use_median_duration:
angular_velocity = dx_rad / durations
angular_velocity = dx_rad / np.median(durations)
else:
angular_velocity = dx_rad = np.median(durations)
angular_velocity = dx_rad / durations

radius = wheel_radius * subject_position
linear_velocity = angular_to_linear_velocity(angular_velocity, radius)
Expand Down

0 comments on commit 18f49c7

Please sign in to comment.