diff --git a/kinisi/diffusion.py b/kinisi/diffusion.py index 5be7856a..60e77376 100644 --- a/kinisi/diffusion.py +++ b/kinisi/diffusion.py @@ -323,7 +323,7 @@ def model_variance(dt: np.ndarray, a: float) -> np.ndarray: popt, _ = curve_fit(model_variance, self.dt[max_ngp:], self._v[max_ngp:]) model_v = model_variance(self.dt[max_ngp:], *popt) - self._covariance_matrix = self.populate_covariance_matrix(model_v, self._n_i) + self._covariance_matrix = self.populate_covariance_matrix(model_v, self._n_i[max_ngp:]) self._covariance_matrix = find_nearest_positive_definite(self._covariance_matrix) mv = multivariate_normal(self._n[max_ngp:], self._covariance_matrix, allow_singular=True)