File: test_ogen.py

package info (click to toggle)
pynwb 2.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,312 kB
  • sloc: python: 17,501; makefile: 597; sh: 11
file content (31 lines) | stat: -rw-r--r-- 979 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from pynwb.ogen import OptogeneticSeries, OptogeneticStimulusSite
from pynwb.ecephys import Device
from pynwb.testing import TestCase


class OptogeneticSeriesConstructor(TestCase):

    def test_init(self):
        device = Device('name')
        oS = OptogeneticStimulusSite(
            name='site1',
            device=device,
            description='description',
            excitation_lambda=300.,
            location='location'
        )
        self.assertEqual(oS.name, 'site1')
        self.assertEqual(oS.device, device)
        self.assertEqual(oS.description, 'description')
        self.assertEqual(oS.excitation_lambda, 300.)
        self.assertEqual(oS.location, 'location')

        iS = OptogeneticSeries(
            name='test_iS',
            data=[1, 2, 3],
            site=oS,
            timestamps=[0.1, 0.2, 0.3]
        )
        self.assertEqual(iS.name, 'test_iS')
        self.assertEqual(iS.unit, 'watts')
        self.assertEqual(iS.site, oS)