eliminate buffer
@@ -113,7 +113,7 @@ class LocalizeCenterOfMass(PeakPipelineStep):
def get_dtype(self):
return self._dtype
- def compute_buffer(self, traces, peaks, waveforms): # Why buffer?
+ def compute_buffer(self, traces, peaks, waveforms):
peak_locations = np.zeros(peaks.size, dtype=self._dtype)
for main_chan in np.unique(peaks['channel_ind']):
@@ -122,7 +122,7 @@ class LocalizeCenterOfMass(PeakPipelineStep):
local_contact_locations = self.contact_locations[chan_inds, :]
wf_ptp = (waveforms[idx][:, :, chan_inds]).ptp(axis=1)
- coms = np.dot(wf_ptp, local_contact_locations)/(np.sum(wf_ptp, axis=1)[:,np.newaxis]) # What is comms? Why not used full word
+ coms = np.dot(wf_ptp, local_contact_locations)/(np.sum(wf_ptp, axis=1)[:,np.newaxis])
peak_locations['x'][idx] = coms[:, 0]
peak_locations['y'][idx] = coms[:, 1]
