Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/n/e/NeuroTools-0.2.0/src/io.py   NeuroTools(Download)
        from NeuroTools.signals import spikes
        data   = self.get_data()
        result = spikes.SpikeList(data, p['id_list'], p['t_start'], p['t_stop'], p['dims'])
        del data
        return result
        # really need to check the agreement between file metadata and
        # params for all metadata items
        return spikes.SpikeList(spike_data, id_list, t_start=0.0, t_stop=t_stop,
                                dims=M['dimensions'])
 

src/n/e/NeuroTools-0.2.0/test/test_spikes.py   NeuroTools(Download)
            for spike in pspikes:
                self.spikes.append((idx, spike))
        self.spk = spikes.SpikeList(self.spikes, range(10))
 
    def tearDown(self):
    def testMerge(self):
        spk2 = spikes.SpikeList(self.spikes, range(50,60))
        self.spk.merge(spk2)
        assert len(self.spk) == 20
 
    def testTime_Slice(self):
        spk = spikes.SpikeList(self.spikes,range(10), t_start=0)
        new_spk = spk.time_slice(0, 1000.)
        assert (new_spk.t_start == spk.t_start) and (new_spk.t_stop == 1000.)
 
            for spike in pspikes:
                spks.append((idx, spike))
        spk = spikes.SpikeList(spks,range(3),0,1000)
        assert len(spk.select_ids("cell.mean_rate() < 20")) == 1
 
            for spike in pspikes: 
                self.spikes.append((idx, spike))
        self.spk = spikes.SpikeList(self.spikes, range(nb_cells), 0, 4000)
        self.spk.save("tmp2.txt")