Exemplo n.º 1
0
    def setUpContainer(self):
        """ Return the test TetrodeSeries to read/write """
        self.device = Device(name='device_name')

        self.group = ElectrodeGroup(name='electrode_group',
                                    description='description',
                                    location='location',
                                    device=self.device)

        self.table = get_electrode_table(
        )  # manually create a table of electrodes
        for i in range(10):
            self.table.add_row(x=i,
                               y=i,
                               z=i,
                               imp=np.nan,
                               location='location',
                               filtering='filtering',
                               group=self.group,
                               group_name='electrode_group')

        all_electrodes = DynamicTableRegion(data=list(range(0, 10)),
                                            description='all the electrodes',
                                            name='electrodes',
                                            table=self.table)

        data = np.random.rand(100, 3)
        tetrode_series = TetrodeSeries(name='name',
                                       description='description',
                                       data=data,
                                       rate=1000.,
                                       electrodes=all_electrodes,
                                       trode_id=1)
        return tetrode_series
Exemplo n.º 2
0
 def make_electrode_table(self):
     """ Make an electrode table, electrode group, and device """
     self.table = get_electrode_table()
     self.dev1 = Device('dev1')
     self.group = ElectrodeGroup('tetrode1',
                                 'tetrode description', 'tetrode location', self.dev1)
     for i in range(4):
         self.table.add_row(x=i, y=2.0, z=3.0, imp=-1.0, location='CA1', filtering='none', group=self.group,
                            group_name='tetrode1')
Exemplo n.º 3
0
 def make_electrode_table(self):
     self.table = get_electrode_table()
     self.dev1 = Device('dev1', 'a test source')
     self.group = ElectrodeGroup('tetrode1', 'a test source',
                                 'tetrode description', 'tetrode location', self.dev1)
     self.table.add_row(id=1, x=1.0, y=2.0, z=3.0, imp=-1.0, location='CA1', filtering='none', group=self.group,
                        group_name='tetrode1')
     self.table.add_row(id=2, x=1.0, y=2.0, z=3.0, imp=-2.0, location='CA1', filtering='none', group=self.group,
                        group_name='tetrode1')
     self.table.add_row(id=3, x=1.0, y=2.0, z=3.0, imp=-3.0, location='CA1', filtering='none', group=self.group,
                        group_name='tetrode1')
     self.table.add_row(id=4, x=1.0, y=2.0, z=3.0, imp=-4.0, location='CA1', filtering='none', group=self.group,
                        group_name='tetrode1')