replay_trajectory_classification.core#

Core algorithms for decoding.

Functions

atleast_2d

Appends a dimension at the end if x is one dimensional

check_converged

We have converged if the slope of the log-likelihood function falls below 'tolerance',

get_centers

Given a set of bin edges, return the center of the bin.

mask

Set bins that are not part of the track to NaN.

normalize_to_probability

Ensure the distribution integrates to 1 so that it is a probability distribution.

scaled_likelihood

Scale the likelihood so the maximum value is 1.