def klusters_files(table,basename): CluFileName,FetFileName,ResFileName,SpkFileName,XMLFileName = (basename + ext for ext in [".clu.1",".fet.1",".res.1",".spk.1",".xml"]) output.write_clu(table.cols.clu[:],CluFileName) output.write_fet(to2d(table.cols.fet[:]),FetFileName,samples=table.cols.time[:]) output.write_res(table.cols.time[:],ResFileName) output.write_spk(table.cols.wave[:],SpkFileName) output.write_xml(n_ch=N_CH,n_samp=S_TOTAL,n_feat=N_CH*FPC,sample_rate=SAMPLE_RATE,filepath=XMLFileName)
def write_files(basename,CluList,TmList,FetList,ChannelGraph=None,STArr=None): """Writes files that result from a clustering job.""" CluFileName = basename+'.clu.1' FetFileName = basename+'.fet.1' ResFileName = basename+'.res.1' XMLFileName = basename+'.xml' if CluList is not None: output.write_clu(np.array(CluList),CluFileName) output.write_res(np.array(TmList),ResFileName) output.write_fet(np.array(FetList),FetFileName,samples=np.array(TmList)) output.write_xml(n_ch=N_CH,n_samp=S_TOTAL,n_feat=N_CH*FPC,sample_rate=SAMPLE_RATE,filepath=XMLFileName) if STArr is not None: np.save("ST.npy",STArr)
def klusters_files(table, basename): CluFileName, FetFileName, ResFileName, SpkFileName, XMLFileName = ( basename + ext for ext in [".clu.1", ".fet.1", ".res.1", ".spk.1", ".xml"]) output.write_clu(table.cols.clu[:], CluFileName) output.write_fet(to2d(table.cols.fet[:]), FetFileName, samples=table.cols.time[:]) output.write_res(table.cols.time[:], ResFileName) output.write_spk(table.cols.wave[:], SpkFileName) output.write_xml(n_ch=N_CH, n_samp=S_TOTAL, n_feat=N_CH * FPC, sample_rate=SAMPLE_RATE, filepath=XMLFileName)
def write_files(basename, CluList, TmList, FetList, ChannelGraph=None, STArr=None): """Writes files that result from a clustering job.""" CluFileName = basename + '.clu.1' FetFileName = basename + '.fet.1' ResFileName = basename + '.res.1' XMLFileName = basename + '.xml' if CluList is not None: output.write_clu(np.array(CluList), CluFileName) output.write_res(np.array(TmList), ResFileName) output.write_fet(np.array(FetList), FetFileName, samples=np.array(TmList)) output.write_xml(n_ch=N_CH, n_samp=S_TOTAL, n_feat=N_CH * FPC, sample_rate=SAMPLE_RATE, filepath=XMLFileName) if STArr is not None: np.save("ST.npy", STArr)