At line 157 in the call to log_multivariate_normal_density; we pick the frame trajectory which was most likely emitted by the sample according to local noise matrix Q.