fixes waveclus extractor for h5py files
@@ -16,8 +16,7 @@ class WaveClusSortingExtractor(MatlabHelper, BaseSorting):
cluster_classes = self._getfield("cluster_class")
classes = cluster_classes[:, 0]
spike_times = cluster_classes[:, 1]
- par = self._getfield("par")
- sampling_frequency = par[0, 0][np.where(np.array(par.dtype.names) == 'sr')[0][0]][0][0]
+ sampling_frequency = float("par/sr")
unit_ids = np.unique(classes).astype('int')
if keep_good_only:
unit_ids = unit_ids[unit_ids > 0]
