Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 28, 2023
1 parent b2bcb00 commit fdb8466
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def sigmoid(x, L, x0, k, b):

pipeline_nodes = [node0, node1, node2, node3]

hdbscan_data = run_node_pipeline(recording, pipeline_nodes, params["job_kwargs"], job_name="extracting features")
hdbscan_data = run_node_pipeline(
recording, pipeline_nodes, params["job_kwargs"], job_name="extracting features"
)

import sklearn

Expand Down
8 changes: 5 additions & 3 deletions src/spikeinterface/sortingcomponents/matching/circus.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,16 +687,18 @@ def main_function(cls, traces, d):
# Filter using overlap-and-add convolution
if len(ignored_ids) > 0:
mask = ~np.isin(np.arange(num_templates), ignored_ids)
spatially_filtered_data = np.matmul(d["spatial"][:, mask, :], traces.T[np.newaxis, :, :])
spatially_filtered_data = np.matmul(d["spatial"][:, mask, :], traces.T[np.newaxis, :, :])
scaled_filtered_data = spatially_filtered_data * d["singular"][:, mask, :]
objective_by_rank = scipy.signal.oaconvolve(scaled_filtered_data, d["temporal"][:, mask, :], axes=2, mode="valid")
objective_by_rank = scipy.signal.oaconvolve(
scaled_filtered_data, d["temporal"][:, mask, :], axes=2, mode="valid"
)
scalar_products[mask] += np.sum(objective_by_rank, axis=0)
scalar_products[ignored_ids] = -np.inf
else:
spatially_filtered_data = np.matmul(d["spatial"], traces.T[np.newaxis, :, :])
scaled_filtered_data = spatially_filtered_data * d["singular"]
objective_by_rank = scipy.signal.oaconvolve(scaled_filtered_data, d["temporal"], axes=2, mode="valid")
scalar_products += np.sum(objective_by_rank, axis=0)
scalar_products += np.sum(objective_by_rank, axis=0)

num_spikes = 0

Expand Down

0 comments on commit fdb8466

Please sign in to comment.