<jupyter_start><jupyter_text>stack version<jupyter_code>i0 = np.hstack(spk[0].T)-shift
window = W/scale
plot(window.ravel(), '-o')
plot(shift.ravel(), '-o')
i0 = i0*window
i0
np.dot(i0, pca.components_.T)
fet[0]<jupyter_output><empty_output><jupyter_text>FIR version<jupyter_code>spk[0].shape
s = spk[0].T
s.shape
shift = shift.reshape(3,-1)
window = window.reshape(3,-1)
pca.components_.T.shape
comp = pca.components_.T.reshape(3,25,3)
comp.shape
plot(s[0])
plot(s[1])
plot(s[2])
plot(((s - shift)*window).T)
fir0 = np.dot((s[0] - shift[0])*window[0], comp[0])
fir1 = np.dot((s[1] - shift[1])*window[1], comp[1])
fir2 = np.dot((s[2] - shift[2])*window[2], comp[2])
fir0 + fir1 + fir2
app.model.spktag.spktag['spk'].shape
chmask = app.model.spktag.spktag['ch'] == app.ch
app.model.spktag.spktag['t'][chmask][app.clu[0]][0]
app.model.spktag.spktag['spk'][chmask][app.clu[0]][0]
mua = app.model.mua
mua.data[60719-10:60719+15,26]
npmm = np.memmap('/mnt/ramdisk/pcie.bin', dtype=np.int32).reshape(-1,32)
npmm[60719-10:60719+15,26]
np.asarray(mua.data[60719-10:60719+15,26]*float(2**14), dtype=np.int32)
window
np.asarray(shift*float(2**14), dtype=np.int32)
g = lambda x: [str(x*'1') + '0' + str((7-x)*'0'), str(x*'1') + '0' + str((7-x)*'1')]
for i in range(8): print g(i)
0b01111111
0b1111
bin(31)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.243202416918429, 'fraction_numerical': 0.09818731117824774, 'mean_word_length': 6.443820224719101, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '473847', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 695, 'n_tokens_neox': 649, 'n_words': 83, 'path': 'notebooks/Xike_spkDetB_spkPacket.ipynb', 'repo_name': 'aliddell/spiketag', 'size': '1324'}