Skip to content

Commit 6b6f448

Browse files
committed
Fix format
1 parent 558e0b9 commit 6b6f448

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

element_array_ephys/readers/kilosort.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def get_best_channel(self, unit):
129129

130130
def extract_spike_depths(self):
131131
""" Reimplemented from https://github.com/cortex-lab/spikes/blob/master/analysis/ksDriftmap.m """
132+
132133
if 'pc_features' in self.data:
133134
ycoords = self.data['channel_positions'][:, 1]
134135
pc_features = self.data['pc_features'][:, 0, :] # 1st PC only
@@ -143,8 +144,9 @@ def extract_spike_depths(self):
143144
# center of mass is sum(coords.*features)/sum(features)
144145
self._data['spike_depths'] = (np.sum(spk_feature_ycoord * pc_features**2, axis=1)
145146
/ np.sum(pc_features**2, axis=1))
146-
else:
147-
self._data['spike_depths'] = None
147+
else:
148+
self._data['spike_depths'] = None
149+
148150
# ---- extract spike sites ----
149151
max_site_ind = np.argmax(np.abs(self.data['templates']).max(axis=1), axis=1)
150152
spike_site_ind = max_site_ind[self.data['spike_templates']]

0 commit comments

Comments
 (0)