How to use the pynwb.ecephys.ElectrodeGroup function in pynwb

To help you get started, we’ve selected a few pynwb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NeurodataWithoutBorders / pynwb / tests / unit / test_misc.py View on Github external
def test_electrode_group(self):
        ut = Units()
        device = Device('test_device')
        electrode_group = ElectrodeGroup('test_electrode_group', 'description', 'location', device)
        ut.add_unit(electrode_group=electrode_group)
        self.assertEqual(ut['electrode_group'][0], electrode_group)
github NeurodataWithoutBorders / pynwb / tests / unit / pynwb_tests / test_ephys.py View on Github external
def test_init(self):
        dev1 = Device('dev1')  # noqa: F405
        group = ElectrodeGroup(  # noqa: F405, F841
            'tetrode1', 'tetrode description', 'tetrode location', dev1)
        table = make_electrode_table()
        region = DynamicTableRegion('electrodes', [0, 2], 'the first and third electrodes', table)
        sES = SpikeEventSeries(  # noqa: F405
            'test_sES', list(range(10)), list(range(10)), region)

        ew = EventWaveform(sES)  # noqa: F405
        self.assertEqual(ew.spike_event_series['test_sES'], sES)
        self.assertEqual(ew['test_sES'], ew.spike_event_series['test_sES'])
github NeurodataWithoutBorders / pynwb / tests / unit / test_ecephys.py View on Github external
def test_init(self):
        dev1 = Device('dev1')  # noqa: F405
        group = ElectrodeGroup(  # noqa: F405, F841
            'tetrode1', 'tetrode description', 'tetrode location', dev1)
        table = make_electrode_table()
        region = DynamicTableRegion('electrodes', [0, 2], 'the first and third electrodes', table)
        sES = SpikeEventSeries(  # noqa: F405
            'test_sES', list(range(10)), list(range(10)), region)

        ew = EventWaveform(sES)  # noqa: F405
        self.assertEqual(ew.spike_event_series['test_sES'], sES)
        self.assertEqual(ew['test_sES'], ew.spike_event_series['test_sES'])
github NeurodataWithoutBorders / pynwb / tests / unit / test_ecephys.py View on Github external
def test_init(self):
        dev1 = Device('dev1')
        group = ElectrodeGroup('elec1', 'electrode description', 'electrode location', dev1)
        self.assertEqual(group.name, 'elec1')
        self.assertEqual(group.description, 'electrode description')
        self.assertEqual(group.location, 'electrode location')
        self.assertEqual(group.device, dev1)
github NeurodataWithoutBorders / pynwb / tests / unit / test_ecephys.py View on Github external
def make_electrode_table():
    table = ElectrodeTable()
    dev1 = Device('dev1')  # noqa: F405
    group = ElectrodeGroup('tetrode1', 'tetrode description', 'tetrode location', dev1)  # noqa: F405
    table.add_row(id=1, x=1.0, y=2.0, z=3.0, imp=-1.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    table.add_row(id=2, x=1.0, y=2.0, z=3.0, imp=-2.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    table.add_row(id=3, x=1.0, y=2.0, z=3.0, imp=-3.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    table.add_row(id=4, x=1.0, y=2.0, z=3.0, imp=-4.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    return table
github NeurodataWithoutBorders / pynwb / tests / unit / test_ecephys.py View on Github external
def make_electrode_table():
    table = ElectrodeTable()
    dev1 = Device('dev1')
    group = ElectrodeGroup('tetrode1', 'tetrode description', 'tetrode location', dev1)
    table.add_row(id=1, x=1.0, y=2.0, z=3.0, imp=-1.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    table.add_row(id=2, x=1.0, y=2.0, z=3.0, imp=-2.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    table.add_row(id=3, x=1.0, y=2.0, z=3.0, imp=-3.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    table.add_row(id=4, x=1.0, y=2.0, z=3.0, imp=-4.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    return table
github NeurodataWithoutBorders / pynwb / tests / integration / hdf5 / test_ecephys.py View on Github external
def test_eg_ref(self):
        """
        Test that the electrode DynamicTableRegion references of the read ElectricalSeries have a group that
        correctly resolves to ElectrodeGroup instances.
        """
        read = self.roundtripContainer()
        row1 = read.electrodes[0]
        row2 = read.electrodes[1]
        self.assertIsInstance(row1.iloc[0]['group'], ElectrodeGroup)
        self.assertIsInstance(row2.iloc[0]['group'], ElectrodeGroup)
github NeurodataWithoutBorders / pynwb / tests / unit / pynwb_tests / test_ephys.py View on Github external
def make_electrode_table():
    table = ElectrodeTable()
    dev1 = Device('dev1')  # noqa: F405
    group = ElectrodeGroup('tetrode1', 'tetrode description', 'tetrode location', dev1)  # noqa: F405
    table.add_row(id=1, x=1.0, y=2.0, z=3.0, imp=-1.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    table.add_row(id=2, x=1.0, y=2.0, z=3.0, imp=-2.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    table.add_row(id=3, x=1.0, y=2.0, z=3.0, imp=-3.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    table.add_row(id=4, x=1.0, y=2.0, z=3.0, imp=-4.0, location='CA1', filtering='none',
                  group=group, group_name='tetrode1')
    return table
github NeurodataWithoutBorders / pynwb / tests / integration / ui_write / test_ecephys.py View on Github external
def setUpContainer(self):
        self.dev1 = Device('dev1')
        return ElectrodeGroup('elec1', 'a test ElectrodeGroup',
                                       'a nonexistent place',
                                       self.dev1)