code
stringlengths
3
6.57k
range(nshifts)
range(nshifts)
zip(sti0s, sti1s)
print("Padding waveforms with up to +/- %d points of fake data" % maxshift)
np.zeros((nspikes, nchans, subnt)
np.zeros((nspikes, nchans)
time.time()
enumerate(sids)
spikechans.searchsorted(chans)
print('Mean prep loop for best shift took %.3f sec' % (time.time()
time.time()
subsd.mean(axis=0)
print('Mean for best shift took %.3f sec' % (time.time()
max()
np.zeros((maxnchans, maxshift+nt+maxshift)
subsd.copy()
np.zeros((nshifts, nchans, subnt)
time.time()
enumerate(sids)
enumerate(sti0ssti1s)
sum(axis=2)
sum(axis=1)
sserrors.argmin()
dirtysids.append(sid)
print('Shifting loop took %.3f sec' % (time.time()
AD2uV(subsd.std(axis=0)
mean()
AD2uV(shiftedsubsd.std(axis=0)
mean()
print('stdev went from %.3f to %.3f uV' % (stdevbefore, stdevafter)
alignminmax(self, sids, to)
self.stream.is_open()
RuntimeError("No open stream to reload spikes from")
np.column_stack((V0s, V1s)
np.column_stack((alignis==0, alignis==1)
ValueError('Unknown to %r' % to)
len(sids)
print("Realigning %d spikes" % nspikes)
np.int32(multichantis[np.arange(nspikes)
np.zeros(nspikes, dtype=int)
np.int32(alignis)
abs(dpeaktis)
self.reload_spikes(sids)
choose_new_meanchans(self, sids)
print('Choosing new channel set for all selected spikes')
self.get_mean_wave(sids)
meanwave.data.ptp(axis=1)
argmax()
det.chans.searchsorted(maxchan)
distances.argsort()
meanchans.sort()
print('meanchans: %r' % list(meanchans)
print('furthestchan: %d' % furthestchan)
meanchans.searchsorted(furthestchan)
len(meanchans)
reload_spikes(self, sids, usemeanchans=False)
len(sids)
print('(Re)
stream.is_open()
RuntimeError("No open stream to reload spikes from")
float(self.__version__)
print('Fixing potentially incorrect time values during spike reloading')
time.time()
self.choose_new_meanchans(sids)
len(meanchans)
not (np.diff(ts)
all()
print("Selected sids aren't in temporal order, sorting by time...")
ts.argsort()
print("Done sorting sids by time")
np.where(np.diff(ts)
np.split(sids, splitis)
len(groups)
np.where(np.diff(relts // MAXGROUPDT)
len(splitis)
np.split(group, splitis)
len(subgroups)
print('ngroups: %d' % len(groups)
enumerate(groups)
printflush('<%d>' % groupi, end='')
len(group)
np.unique(spikes['chans'][group])
np.unique(np.hstack((unionchans, meanchans)
stream()
stream(t0, t1, unionchans)
printflush(sidi, end='')
printflush('.', end='')
chans.sort()
self.reload_spike_ver_lte_03(sid, nchans, tempwave, rd)
print()
print('Fixed time values of %d spikes' % nfixed)
print('(Re)
len(sids)
time.time()
reload_spike_ver_lte_03(self, sid, nchans, tempwave, rd)
alignbest()
print('Reloading sid from ver_lte_03: %d' % sid)
lrrep2Darrstripis(od)
print('')
pdb.set_trace()