Skip to content

Commit

Permalink
Merge pull request #1214 from JuliaSprenger/add/pl2
Browse files Browse the repository at this point in the history
Add plexon2 support
  • Loading branch information
samuelgarcia authored Jun 28, 2023
2 parents 089af8e + 6583ad3 commit 6ce00dc
Show file tree
Hide file tree
Showing 13 changed files with 1,893 additions and 5 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/io-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
key: ${{ runner.os }}-datasets-${{ steps.ephy_testing_data.outputs.dataset_hash }}
restore-keys: ${{ runner.os }}-datasets-

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v2.2.0
with:
activate-environment: neo-test-env
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -95,6 +95,13 @@ jobs:
run: |
pip install --no-dependencies -e .
- name: Install wine
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 wine
- name: Test with pytest
run: |
# only neo.rawio and neo.io
Expand Down
7 changes: 7 additions & 0 deletions neo/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
* :attr:`PhyIO`
* :attr:`PickleIO`
* :attr:`PlexonIO`
* :attr:`Plexon2IO`
* :attr:`RawBinarySignalIO`
* :attr:`RawMCSIO`
* :attr:`Spike2IO`
Expand Down Expand Up @@ -221,6 +222,10 @@
.. autoattribute:: extensions
.. autoclass:: neo.io.Plexon2IO
.. autoattribute:: extensions
.. autoclass:: neo.io.RawBinarySignalIO
.. autoattribute:: extensions
Expand Down Expand Up @@ -322,6 +327,7 @@
from neo.io.phyio import PhyIO
from neo.io.pickleio import PickleIO
from neo.io.plexonio import PlexonIO
from neo.io.plexon2io import Plexon2IO
from neo.io.rawbinarysignalio import RawBinarySignalIO
from neo.io.rawmcsio import RawMCSIO
from neo.io.spike2io import Spike2IO
Expand Down Expand Up @@ -375,6 +381,7 @@
PhyIO,
PickleIO,
PlexonIO,
Plexon2IO,
RawBinarySignalIO,
RawMCSIO,
Spike2IO,
Expand Down
17 changes: 17 additions & 0 deletions neo/io/plexon2io.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from neo.io.basefromrawio import BaseFromRaw
from neo.rawio.plexon2rawio import Plexon2RawIO


class Plexon2IO(Plexon2RawIO, BaseFromRaw):
"""
Class for reading data from Plexon PL2 files
The IO is based on the Plexon2RawIO, see comments for memory optimization
in neo.rawio.plexon2rawio.Plexon2RawIO
"""

def __init__(self, filename):
Plexon2RawIO.__init__(self, filename=filename)
BaseFromRaw.__init__(self, filename)

2 changes: 1 addition & 1 deletion neo/io/plexonio.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ class PlexonIO(PlexonRawIO, BaseFromRaw):
_prefered_signal_group_mode = 'group-by-same-units'

def __init__(self, filename):
PlexonRawIO.__init__(self, filename=filename)
PlexonRawIO.__init__(self, filename)
BaseFromRaw.__init__(self, filename)
7 changes: 7 additions & 0 deletions neo/rawio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* :attr:`OpenEphysBinaryRawIO`
* :attr:`PhyRawIO`
* :attr:`PlexonRawIO`
* :attr:`Plexon2RawIO`
* :attr:`RawBinarySignalRawIO`
* :attr:`RawMCSRawIO`
* :attr:`Spike2RawIO`
Expand Down Expand Up @@ -132,6 +133,10 @@
.. autoattribute:: extensions
.. autoclass:: neo.rawio.Plexon2RawIO
.. autoattribute:: extensions
.. autoclass:: neo.rawio.RawBinarySignalRawIO
.. autoattribute:: extensions
Expand Down Expand Up @@ -190,6 +195,7 @@
from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO
from neo.rawio.phyrawio import PhyRawIO
from neo.rawio.plexonrawio import PlexonRawIO
from neo.rawio.plexon2rawio import Plexon2RawIO
from neo.rawio.rawbinarysignalrawio import RawBinarySignalRawIO
from neo.rawio.rawmcsrawio import RawMCSRawIO
from neo.rawio.spike2rawio import Spike2RawIO
Expand Down Expand Up @@ -222,6 +228,7 @@
OpenEphysBinaryRawIO,
PhyRawIO,
PlexonRawIO,
Plexon2RawIO,
RawBinarySignalRawIO,
RawMCSRawIO,
Spike2RawIO,
Expand Down
1 change: 1 addition & 0 deletions neo/rawio/plexon2rawio/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from neo.rawio.plexon2rawio.plexon2rawio import Plexon2RawIO
Loading

0 comments on commit 6ce00dc

Please sign in to comment.