Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions neo/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* :attr:`NixIO`
* :attr:`NSDFIO`
* :attr:`OpenEphysIO`
* :attr:`OpenEphysBinaryIO`
* :attr:`PhyIO`
* :attr:`PickleIO`
* :attr:`PlexonIO`
Expand Down Expand Up @@ -177,6 +178,10 @@

.. autoattribute:: extensions

.. autoclass:: neo.io.OpenEphysBinaryIO

.. autoattribute:: extensions

.. autoclass:: neo.io.PhyIO

.. autoattribute:: extensions
Expand Down Expand Up @@ -276,6 +281,7 @@
from neo.io.nixio_fr import NixIO as NixIOFr
from neo.io.nsdfio import NSDFIO
from neo.io.openephysio import OpenEphysIO
from neo.io.openephysbinaryio import OpenEphysBinaryIO
from neo.io.phyio import PhyIO
from neo.io.pickleio import PickleIO
from neo.io.plexonio import PlexonIO
Expand Down Expand Up @@ -321,6 +327,7 @@
NeuroshareIO,
NSDFIO,
OpenEphysIO,
OpenEphysBinaryIO,
PhyIO,
PickleIO,
PlexonIO,
Expand Down
11 changes: 11 additions & 0 deletions neo/io/openephysbinaryio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from neo.io.basefromrawio import BaseFromRaw
from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO


class OpenEphysBinaryIO(OpenEphysBinaryRawIO, BaseFromRaw):
_prefered_signal_group_mode = 'group-by-same-units'
mode = 'dir'

def __init__(self, dirname):
OpenEphysBinaryRawIO.__init__(self, dirname=dirname)
BaseFromRaw.__init__(self, dirname)
15 changes: 12 additions & 3 deletions neo/io/proxyobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,19 @@ def __init__(self, array_annotations=None, **annotations):
# used to be str so raw bytes
annotations['file_origin'] = str(self._rawio.source_name())

# this mock the array annotaions to avoid inherits DataObject
if array_annotations is None:
array_annotations = {}
for k, v in array_annotations.items():
array_annotations[k] = np.asarray(v)

# clean array annotations that are not 1D
# TODO remove this once multi-dimensional array_annotations are possible
array_annotations = {k: v for k, v in array_annotations.items()
if v.ndim == 1}

# this mock the array annotations to avoid inherits DataObject
self.array_annotations = ArrayDict(self.shape[-1])
if array_annotations is not None:
self.array_annotations.update(array_annotations)
self.array_annotations.update(array_annotations)

BaseNeo.__init__(self, **annotations)

Expand Down
7 changes: 7 additions & 0 deletions neo/rawio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* :attr:`NeuroScopeRawIO`
* :attr:`NIXRawIO`
* :attr:`OpenEphysRawIO`
* :attr:`OpenEphysBinaryRawIO`
* :attr:'PhyRawIO'
* :attr:`PlexonRawIO`
* :attr:`RawBinarySignalRawIO`
Expand Down Expand Up @@ -88,6 +89,10 @@

.. autoattribute:: extensions

.. autoclass:: neo.rawio.OpenEphysBinaryRawIO

.. autoattribute:: extensions

.. autoclass:: neo.rawio.PhyRawIO

.. autoattribute:: extensions
Expand Down Expand Up @@ -141,6 +146,7 @@
from neo.rawio.neuroscoperawio import NeuroScopeRawIO
from neo.rawio.nixrawio import NIXRawIO
from neo.rawio.openephysrawio import OpenEphysRawIO
from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO
from neo.rawio.phyrawio import PhyRawIO
from neo.rawio.plexonrawio import PlexonRawIO
from neo.rawio.rawbinarysignalrawio import RawBinarySignalRawIO
Expand All @@ -165,6 +171,7 @@
NeuroScopeRawIO,
NIXRawIO,
OpenEphysRawIO,
OpenEphysBinaryRawIO,
PhyRawIO,
PlexonRawIO,
RawBinarySignalRawIO,
Expand Down
Loading