Skip to content

Commit

Permalink
removed warning about nan/zero weights, no longer useful
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobpennington committed Apr 26, 2024
1 parent 2fba4f2 commit dfaaf6b
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions kilosort/spikedetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,18 +222,6 @@ def run(ops, bfile, device=torch.device('cuda'), progress_bar=None):
weigh = torch.permute(weigh, (2, 0, 1)).contiguous()
weigh = weigh / (weigh**2).sum(1).unsqueeze(1)**.5

nan_weights = torch.isnan(weigh)
zero_weights = (weigh == 0)
if (nan_weights.sum() > 0) or (zero_weights.sum() > 0):
msg = """
NaNs and/or zeroes present in weights for spikedetect.run,
may need to adjust `min_template_size` and/or `dminx`
for best results.\n
If you're using a probe with multiple shanks, see
https://kilosort.readthedocs.io/en/latest/multi_shank.html
"""
warnings.warn(msg, UserWarning)

st = np.zeros((10**6, 6), 'float64')
tF = np.zeros((10**6, nC , ops['settings']['n_pcs']), 'float32')

Expand Down

0 comments on commit dfaaf6b

Please sign in to comment.