Source code for allensdk.brain_observatory.running_speed
from typing import NamedTuple
import numpy as np
[docs]class RunningSpeed(NamedTuple):
''' Describes the rate at which an experimental subject ran during a session.
values : np.ndarray
running speed (cm/s) at each sample point
timestamps : np.ndarray
The time at which each sample was collected (s).
'''
timestamps: np.ndarray
values: np.ndarray
def __eq__(self, other):
a = np.array_equal(self.timestamps, other.timestamps)
b = np.array_equal(self.values, other.values)
return a and b