-
Notifications
You must be signed in to change notification settings - Fork 159
Closed
Labels
Description
Describe the bug
2 errors introduced by latest commit to allensdk/brain_observatory/extract_running_speed/__main__.py in extract_running_speeds().
- The if/else statements (line 62-65) are reversed: median duration is not used if
use_median_durationis True, and is used otherwise. - In the
elsestatement,angular_velocityis 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:
if use_median_duration:
angular_velocity = dx_rad / durations
else:
angular_velocity = dx_rad = np.median(durations)
should be
if use_median_duration:
angular_velocity = dx_rad / np.median(durations)
else:
angular_velocity = dx_rad / durations