File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737* :attr:`KwikIO`
3838* :attr:`MaxwellIO`
3939* :attr:`MicromedIO`
40+ * :attr:`MonkeyLogicIO`
4041* :attr:`NeoMatlabIO`
4142* :attr:`NestIO`
4243* :attr:`NeuralynxIO`
158159
159160 .. autoattribute:: extensions
160161
162+ .. autoclass:: neo.io.MonkeyLogicIO
163+
164+ .. autoattribute:: extensions
165+
161166.. autoclass:: neo.io.NeoMatlabIO
162167
163168 .. autoattribute:: extensions
295300from neo .io .mearecio import MEArecIO
296301from neo .io .maxwellio import MaxwellIO
297302from neo .io .micromedio import MicromedIO
303+ from neo .io .monkeylogicio import MonkeyLogicIO
298304from neo .io .neomatlabio import NeoMatlabIO
299305from neo .io .nestio import NestIO
300306from neo .io .neuralynxio import NeuralynxIO
345351 MEArecIO ,
346352 MaxwellIO ,
347353 MicromedIO ,
354+ MonkeyLogicIO ,
348355 NixIO , # place NixIO before other IOs that use HDF5 to make it the default for .h5 files
349356 NeoMatlabIO ,
350357 NestIO ,
Original file line number Diff line number Diff line change 1+ from neo .io .basefromrawio import BaseFromRaw
2+ from neo .rawio .monkeylogicrawio import MonkeyLogicRawIO
3+
4+
5+ class MonkeyLogicIO (MonkeyLogicRawIO , BaseFromRaw ):
6+
7+ name = 'MonkeyLogicIO'
8+
9+ _prefered_signal_group_mode = 'group-by-same-units'
10+ _prefered_units_group_mode = 'all-in-one'
11+
12+ def __init__ (self , filename ):
13+ MonkeyLogicRawIO .__init__ (self , filename )
14+ BaseFromRaw .__init__ (self , filename )
15+
16+ def __enter__ (self ):
17+ return self
18+
19+ def __exit__ (self , * args ):
20+ self .header = None
21+ self .file .close ()
Original file line number Diff line number Diff line change 1+ """
2+ Tests of neo.io.monkeylogicio
3+ """
4+
5+ import unittest
6+
7+ from neo .io import MonkeyLogicIO
8+ from neo .test .iotest .common_io_test import BaseTestIO
9+
10+ # class TestMonkeyLogicIO(BaseTestIO, unittest.TestCase):
11+ # entities_to_download = [
12+ # 'monkeylogic'
13+ # ]
14+ # entities_to_test = [
15+ # 'monkeylogic/mearec_test_10s.h5'
16+ # ]
17+ # ioclass = MonkeyLogicIO
18+
19+
20+ class TestMonkeyLogicIO (unittest .TestCase ):
21+ # TODO: Adjust this once ML files are on GIN
22+
23+ def test_read (self ):
24+ filename = '/home/sprengerj/projects/monkey_logic/210909_TSCM_5cj_5cl_Riesling.bhv2'
25+ filename = '/home/sprengerj/projects/monkey_logic/sabrina/210810__learndms_userloop.bhv2'
26+ # filename = '/home/sprengerj/projects/monkey_logic/sabrina/210916__learndms_userloop.bhv2'
27+ # filename = '/home/sprengerj/projects/monkey_logic/sabrina/210917__learndms_userloop.bhv2'
28+ io = MonkeyLogicIO (filename )
29+ io .read_block ()
30+
31+ if __name__ == "__main__" :
32+ unittest .main ()
You can’t perform that action at this time.
0 commit comments