Skip to content

Commit 8973e09

Browse files
sbuergersalejoe91samuelgarcia
authored
Axonarawio (#958)
* added placeholder for axonarawio.py and temporary notebook for testing * some progress - reading data with BinConverter help and starting on .set file * added first draft of sig_channels * first draft - check if I can use AxonaRawIO * some minor additions * added axonarawio to neo.rawio.__init__.py * added axonarawio.py to neo/rawio/__init__.py * first scaffolding for reading raw cont data * added comparison of two methods for reading cont data using mmap * added way of reading data using np.memmap for comparison * cleaned up notebook and settled on np.memmap for raw signal * implemented reading raw continous data with get_analogsignal_chunk * added timing checks + looking for faster get_analogsignal_chunk * trying hopefully faster implementation for get_analogsignal_chunk * trying to test hopefully faster implementation of get_analogsignal_chunk * fixed base index vector to read cont. data * fixed selecting arbitrary chunk of cont data * some minor changes * some changes to adjust toward new baserawio * found better implementation of reading cont signals * implemented new method for reading cont data * added check for reading cont data using axonarawio * adjusted helper methods * somewhat checking adjustments of helper methods * started exploring unit data files * linting or comment changes * copied over updated annotatiosn from examplerawio.py where applicable * adjusted get_channel_gain (still unverified if correct) * starting to explore remaining pieces for python-neo .bin implmementation * added slightly more detailed notes about data formats * added more thorough description of what data should be supported * small clean-up of notebook * filled in methods related to signal dur or len * added test_axonarawio.py * adjusted desc and filled spiking and event information with None * added axonaio.py * added test_axonaio.py * changed files_to_download to only include base filename * added axonaio to io.__init__ * check if AxonaIO works * removed specific example tests for test_axonaio * added gain factor for conversion to uV for .bin data * added notes and fixed equation for uV conversion * checking conversion factor for getting uV * Update neo/io/axonaio.py remove default val for filename, bc filename has to be specified Co-authored-by: Alessio Buccino <[email protected]> * remove default val for filename * removed variable assignment that already has it as default val * rewrite desc * allow base filename, set and bin extensions as user input * made channel_memory_offset global variable * ensure chan_id is a str * ensure stream_id is a str * create class variable for channel_memory_offset (remapping of chan ids) * made ecephys data type instance variable * check code modifications * remove jupyter notebook * minor annotation adjustments * remove None from first index in channel_memory_offset * count channel ids from 0 upwards instead of 1 * explicitly load set and bin file in test_axonaio.py * Steffen and Sam do some debug. * automatically get sampling rate from .set file * added additional annotations, including tetrode per channel * debugged new additions - tests pass * pep8 adherence in axonarawio * removed #eof * fix pep8 from pep8speaks complaints * final pep8 fixes Co-authored-by: Alessio Buccino <[email protected]> Co-authored-by: Samuel Garcia <[email protected]>
1 parent 4cce40f commit 8973e09

File tree

7 files changed

+432
-0
lines changed

7 files changed

+432
-0
lines changed

doc/source/authors.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ and may not be the current affiliation of a contributor.
5656
* Shashwat Sridhar
5757
* Alessio Buccino [23]
5858
* Regimantas Jurkus [13]
59+
* Steffen Buergers [24]
5960

6061
1. Centre de Recherche en Neuroscience de Lyon, CNRS UMR5292 - INSERM U1028 - Universite Claude Bernard Lyon 1
6162
2. Unité de Neuroscience, Information et Complexité, CNRS UPR 3293, Gif-sur-Yvette, France
@@ -80,6 +81,7 @@ and may not be the current affiliation of a contributor.
8081
21. Institut des Neurosciences Paris-Saclay, CNRS UMR 9197 - Université Paris-Sud, Gif-sur-Yvette, France
8182
22. Neurtex Brain Research Institute, Dallas, TX, USAs
8283
23. Bio Engineering Laboratory, DBSSE, ETH, Basel, Switzerland
84+
24. CatalystNeuro
8385

8486
If we've somehow missed you off the list we're very sorry - please let us know.
8587

neo/io/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* :attr:`AsciiSignalIO`
2020
* :attr:`AsciiSpikeTrainIO`
2121
* :attr:`AxographIO`
22+
* :attr:`AxonaIO`
2223
* :attr:`AxonIO`
2324
* :attr:`BCI2000IO`
2425
* :attr:`BlackrockIO`
@@ -77,6 +78,10 @@
7778
7879
.. autoattribute:: extensions
7980
81+
.. autoclass:: neo.io.AxonaIO
82+
83+
.. autoattribute:: extensions
84+
8085
.. autoclass:: neo.io.AxonIO
8186
8287
.. autoattribute:: extensions
@@ -250,6 +255,7 @@
250255
from neo.io.asciisignalio import AsciiSignalIO
251256
from neo.io.asciispiketrainio import AsciiSpikeTrainIO
252257
from neo.io.axographio import AxographIO
258+
from neo.io.axonaio import AxonaIO
253259
from neo.io.axonio import AxonIO
254260
from neo.io.blackrockio import BlackrockIO
255261
from neo.io.blkio import BlkIO
@@ -295,6 +301,7 @@
295301
AsciiSignalIO,
296302
AsciiSpikeTrainIO,
297303
AxographIO,
304+
AxonaIO,
298305
AxonIO,
299306
BCI2000IO,
300307
BlackrockIO,

neo/io/axonaio.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from neo.io.basefromrawio import BaseFromRaw
2+
from neo.rawio.axonarawio import AxonaRawIO
3+
4+
5+
class AxonaIO(AxonaRawIO, BaseFromRaw):
6+
name = 'Axona IO'
7+
description = "Read raw continuous data (.bin and .set files)"
8+
9+
def __init__(self, filename):
10+
AxonaRawIO.__init__(self, filename=filename)
11+
BaseFromRaw.__init__(self, filename)

neo/rawio/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Classes:
1414
1515
* :attr:`AxographRawIO`
16+
* :attr:`AxonaRawIO`
1617
* :attr:`AxonRawIO`
1718
* :attr:`BlackrockRawIO`
1819
* :attr:`BrainVisionRawIO`
@@ -41,6 +42,10 @@
4142
4243
.. autoattribute:: extensions
4344
45+
.. autoclass:: neo.rawio.AxonaRawIO
46+
47+
.. autoattribute:: extensions
48+
4449
.. autoclass:: neo.rawio.AxonRawIO
4550
4651
.. autoattribute:: extensions
@@ -133,6 +138,7 @@
133138
import os
134139

135140
from neo.rawio.axographrawio import AxographRawIO
141+
from neo.rawio.axonarawio import AxonaRawIO
136142
from neo.rawio.axonrawio import AxonRawIO
137143
from neo.rawio.blackrockrawio import BlackrockRawIO
138144
from neo.rawio.brainvisionrawio import BrainVisionRawIO
@@ -159,6 +165,7 @@
159165

160166
rawiolist = [
161167
AxographRawIO,
168+
AxonaRawIO,
162169
AxonRawIO,
163170
BlackrockRawIO,
164171
BrainVisionRawIO,

0 commit comments

Comments
 (0)