Skip to content

Commit

Permalink
brainbox.single_unit.quick_unit_metrics SRP fix (#726)
Browse files Browse the repository at this point in the history
* indexing bug SRP calculation

* use ismember mask
  • Loading branch information
chris-langfield authored Feb 26, 2024
1 parent beb2039 commit ad00f63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brainbox/metrics/single_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ def quick_unit_metrics(spike_clusters, spike_times, spike_amps, spike_depths,
r.amp_std_dB[ir] = np.array(camp['log_amps'].std())
srp = metrics.slidingRP_all(spikeTimes=spike_times, spikeClusters=spike_clusters,
**{'sampleRate': 30000, 'binSizeCorr': 1 / 30000})
r.slidingRP_viol[srp['cidx']] = srp['value']
r.slidingRP_viol[ir] = srp['value']

# loop over each cluster to compute the rest of the metrics
for ic in np.arange(nclust):
Expand Down

0 comments on commit ad00f63

Please sign in to comment.