Skip to content

Commit

Permalink
Reverted special case for batch 0 in template_matching.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobpennington committed May 9, 2024
1 parent ed9abbe commit d879c03
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kilosort/template_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ def extract(ops, bfile, U, device=torch.device('cuda'), progress_bar=None):

stt = stt.double()
#st[k:k+nsp,0] = ((stt[:,0]-nt)/ops['fs'] + ibatch * (ops['batch_size']/ops['fs'])).cpu().numpy()
left_pad = 0 if ibatch == 0 else nt
st[k:k+nsp,0] = ((stt[:,0]-left_pad) + ibatch * (ops['batch_size'])).cpu().numpy() - nt//2 + ops['nt0min']
st[k:k+nsp,0] = ((stt[:,0]-nt) + ibatch * (ops['batch_size'])).cpu().numpy() - nt//2 + ops['nt0min']

st[k:k+nsp,1] = stt[:,1].cpu().numpy()
st[k:k+nsp,2] = amps[:,0].cpu().numpy()
Expand Down

0 comments on commit d879c03

Please sign in to comment.