Skip to content

[WIP] Nest3io #739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 9 additions & 3 deletions neo/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@

.. autoattribute:: extensions

.. autoclass:: neo.io.NestIO
.. autoclass:: neo.io.Nest2IO

.. autoattribute:: extensions

.. autoclass:: neo.io.Nest3IO

.. autoattribute:: extensions

Expand Down Expand Up @@ -243,7 +247,8 @@
from neo.io.micromedio import MicromedIO
from neo.io.hdf5io import NeoHdf5IO
from neo.io.neomatlabio import NeoMatlabIO
from neo.io.nestio import NestIO
from neo.io.nest2io import Nest2IO
from neo.io.nest3io import Nest3IO
from neo.io.neuralynxio import NeuralynxIO
from neo.io.neuralynxio_v1 import NeuralynxIO as OldNeuralynxIO
from neo.io.neuroexplorerio import NeuroExplorerIO
Expand Down Expand Up @@ -285,7 +290,8 @@
NixIO, # place NixIO before NeoHdf5IO to make it the default for .h5 files
NeoHdf5IO,
NeoMatlabIO,
NestIO,
Nest2IO,
Nest3IO,
NeuralynxIO,
NeuroExplorerIO,
NeuroScopeIO,
Expand Down
3 changes: 2 additions & 1 deletion neo/io/nestio.py → neo/io/nest2io.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
"""
Class for reading output files from NEST simulations
using NEST versions 2.x
( http://www.nest-simulator.org/ ).
Tested with NEST2.10.0

Expand Down Expand Up @@ -30,7 +31,7 @@
'no type': pq.dimensionless}


class NestIO(BaseIO):
class Nest2IO(BaseIO):
"""
Class for reading NEST output files. GDF files for the spike data and DAT
files for analog signals are possible.
Expand Down
31 changes: 31 additions & 0 deletions neo/io/nest3io.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
"""
neo.io have been split in 2 level API:
* neo.io: this API give neo object
* neo.rawio: this API give raw data as they are in files.

Developer are encourage to use neo.rawio.

When this is done the neo.io is done automagically with
this king of following code.

Author: Johanna Senk, Julia Sprenger

"""

from neo.io.basefromrawio import BaseFromRaw
from neo.rawio.nest3rawio import Nest3RawIO


class Nest3IO(Nest3RawIO, BaseFromRaw):
name = 'Nest3IO'
description = "Fake IO"

# This is an important choice when there are several channels.
# 'split-all' : 1 AnalogSignal each 1 channel
# 'group-by-same-units' : one 2D AnalogSignal for each group of channel with same units
_prefered_signal_group_mode = 'group-by-same-units'

def __init__(self, filename=''):
Nest3RawIO.__init__(self, filename=filename)
BaseFromRaw.__init__(self, filename)
2 changes: 2 additions & 0 deletions neo/rawio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
from neo.rawio.examplerawio import ExampleRawIO
from neo.rawio.intanrawio import IntanRawIO
from neo.rawio.micromedrawio import MicromedRawIO
from neo.rawio.nest3rawio import Nest3RawIO
from neo.rawio.neuralynxrawio import NeuralynxRawIO
from neo.rawio.neuroexplorerrawio import NeuroExplorerRawIO
from neo.rawio.neuroscoperawio import NeuroScopeRawIO
Expand All @@ -142,6 +143,7 @@
ElanRawIO,
IntanRawIO,
MicromedRawIO,
Nest3RawIO,
NeuralynxRawIO,
NeuroExplorerRawIO,
NeuroScopeRawIO,
Expand Down
Loading