neuralib.locomotion.spatial.spatial_info
- neuralib.locomotion.spatial.spatial_info(t, x, ta, a, x_bins=100, epoch=None)[source]
Calculate spatial information score for a single neuron on a 1D linear track.
Note: the absolute value is sensitive to the df/f normalization method.
Dimension parameters:
P = number of position samples
F = number of activity samples
B = number of spatial bins
- Parameters:
t (ndarray) – Position time array. Array[float, P]
x (ndarray) – Normalized position array in [0, 1]. Array[float, P]
ta (ndarray) – Activity time array. Array[float, F]
a (ndarray) – Activity value array. Array[float, F]
x_bins (int) – Number of spatial bins
epoch (ndarray | None) – Boolean mask for restricting to a specific epoch (e.g., running). Must have the same length as
tandx. Array[bool, P]
- Returns:
SpatialInfoResult- Return type: