예제 #1
0
 def testLoadSpikeListWithIds(self):
     spk = spikes.load_spikelist("tmp2.txt", id_list=range(30,40))
     assert (len(spk) == 10) and (spk.mean_rate() > 0)
예제 #2
0
 def testLoadSpikeListWithTime(self):
     spk = spikes.load_spikelist("tmp2.txt", id_list=range(30,40), t_start=0, t_stop=100)
     assert (len(spk) == 10) and (spk.mean_rate() > 0) and (spk.time_parameters() == (0,100))
예제 #3
0
 def testSaveAndLoadPickleTimePart(self):
     file = io.StandardPickleFile("tmp.pickle")
     self.spk.save(file)
     spk2 = spikes.load_spikelist(file, t_start = 0, t_stop= 50)
     assert (spk2.t_start == 0) and (spk2.t_stop == 50)
예제 #4
0
 def testLoadSpikeList(self):
     spk = spikes.load_spikelist("tmp2.txt")
     assert (len(spk) == 50) and (spk.mean_rate() > 0)
예제 #5
0
 def testSaveAndLoadPickle(self):
     file = io.StandardPickleFile("tmp.pickle")
     self.spk.save(file)
     spk2 = spikes.load_spikelist(file)
     assert len(spk2) == len(self.spk)
예제 #6
0
 def testSaveAndLoadTxtIdsPartInt(self):
     file = io.StandardTextFile("tmp.txt")
     self.spk.save(file)
     spk2 = spikes.load_spikelist(file, id_list=5)
     assert numpy.all(spk2.id_list == [0,1,2,3,4])
예제 #7
0
 def testSaveAndLoadTxtIdsPart(self):
     self.spk.save("tmp.txt")
     spk2 = spikes.load_spikelist("tmp.txt", id_list=[1,2,3])
     assert numpy.all(spk2.id_list == [1,2,3])
예제 #8
0
 def testSaveAndLoadTxtTimePart(self):
     self.spk.save("tmp.txt")
     spk2 = spikes.load_spikelist("tmp.txt", t_start = 0, t_stop= 50)
     assert (spk2.t_start == 0) and (spk2.t_stop == 50)
예제 #9
0
 def testSaveAndLoadTxt(self):
     self.spk.save("tmp.txt")
     spk2 = spikes.load_spikelist("tmp.txt")
     assert len(spk2) == len(self.spk)