From c862927e3eab2651db7018215f081de108a8fc4b Mon Sep 17 00:00:00 2001 From: Sean Jewell Date: Wed, 21 Mar 2018 10:14:59 -0700 Subject: [PATCH] correct for mean-vector scaling change dimension of spike_mag return --- python/arfpop_ctypes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/arfpop_ctypes.py b/python/arfpop_ctypes.py index 72c1113..862b88f 100644 --- a/python/arfpop_ctypes.py +++ b/python/arfpop_ctypes.py @@ -30,9 +30,7 @@ def arfpop(dat, gam, penalty, constraint): out['changePts'] = np.unique(end_vec) + 1 out['spikes'] = out['changePts'][1:] + 1 - padded = np.array([0]) - - out['spike_mag'] = np.concatenate((padded, out['mean_vec'][1:] - out['mean_vec'][0:-1])) + out['spike_mag'] = out['mean_vec'][out['spikes'] - 1] - gam * out['mean_vec'][out['spikes'] - 2] out['pos_spike_mag'] = np.maximum(out['spike_mag'], np.zeros(out['spike_mag'].shape)) ## TODO: add error catching here!