Skip to content

Commit 9f7bbda

Browse files
committed
update micromed multi segment using the buffer API
2 parents 8b48f4b + 96a28af commit 9f7bbda

File tree

144 files changed

+5997
-2565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+5997
-2565
lines changed

.github/workflows/core-test.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@ jobs:
2424
strategy:
2525
fail-fast: true
2626
matrix:
27-
os: ["ubuntu-latest", "windows-latest"]
28-
# "macos-latest",
29-
python-version: ['3.8', '3.9', '3.10', '3.11']
30-
numpy-version: ['1.20.3', '1.21.6', '1.22.4', '1.23.5', '1.24.1', '1.25.1']
27+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
28+
python-version: ['3.9', '3.10', '3.11', '3.12']
29+
numpy-version: ['1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4']
30+
# numpy 1.22: 3.10, 1.23: 3.11, 1.24: 3.11, 1.25: 3.11, 1.26: 3.12
3131
exclude:
32-
- python-version: '3.8'
33-
numpy-version: '1.25.1'
34-
- python-version: '3.10'
35-
numpy-version: '1.20.3'
36-
- python-version: '3.11'
37-
numpy-version: '1.20.3'
3832
- python-version: '3.11'
39-
numpy-version: '1.21.6'
33+
numpy-version: '1.22.4'
34+
- python-version: '3.12'
35+
numpy-version: '1.22.4'
36+
- python-version: '3.12'
37+
numpy-version: '1.23.5'
38+
- python-version: '3.12'
39+
numpy-version: '1.24.1'
40+
- python-version: '3.12'
41+
numpy-version: '1.25.1'
4042
steps:
4143
- name: Set up Python ${{ matrix.python-version }}
4244
uses: actions/setup-python@v4

.github/workflows/io-test.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ concurrency: # Cancel previous workflows on the same pull request
1313

1414
jobs:
1515
build-and-test:
16-
name: Test on (${{ inputs.os }})
16+
name: Test on (${{ inputs.os }}) (${{ matrix.python-version}})
1717
runs-on: ${{ inputs.os }}
1818
strategy:
1919
fail-fast: true
2020
matrix:
21-
python-version: ['3.9', ]
21+
python-version: ['3.9', '3.11.9']
2222
defaults:
2323
# by default run in bash mode (required for conda usage)
2424
run:
@@ -75,6 +75,7 @@ jobs:
7575
if: steps.cache-conda-env.outputs.cache-hit != 'true'
7676
run: |
7777
conda env update --name neo-test-env --file environment_testing.yml --prune
78+
conda install python=${{ matrix.python-version }}
7879
7980
- name: Configure git
8081
run: |
@@ -107,6 +108,14 @@ jobs:
107108
sudo apt-get update -qq
108109
sudo apt-get install -yqq --allow-downgrades libc6:i386 libgcc-s1:i386 libstdc++6:i386 wine
109110
111+
- name: Pip list
112+
run: |
113+
pip list
114+
115+
- name: Conda list
116+
run: |
117+
conda list
118+
110119
- name: Test with pytest
111120
env:
112121
HDF5_PLUGIN_PATH: ${{ github.workspace }}/hdf5_local_plugin_path

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,8 @@ doc/*.plx
7676
doc/*.nev
7777
doc/*.ns5
7878
doc/*.nix
79-
doc/*.nwb
79+
doc/*.nwb
80+
*.plx
81+
*.smr
82+
B95.zip
83+
grouped_ephys

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ grant agreement FETPI-015879 (FACETS), by the European Union Seventh Framework P
6464
under grant agreements no. 269921 (BrainScaleS) and no. 604102 (HBP),
6565
and by the European Union’s Horizon 2020 Framework Programme for
6666
Research and Innovation under the Specific Grant Agreements No. 720270 (Human Brain Project SGA1),
67-
No. 785907 (Human Brain Project SGA2) and No. 945539 (Human Brain Project SGA3).
67+
No. 785907 (Human Brain Project SGA2) and No. 945539 (Human Brain Project SGA3),
68+
and by the European Union's Research and Innovation Program Horizon Europe Grant Agreement No. 101147319 (EBRAINS 2.0).
6869

6970
.. _OpenElectrophy: https://github.com/OpenElectrophy/OpenElectrophy
7071
.. _Elephant: http://neuralensemble.org/elephant

codemeta.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"license": "https://spdx.org/licenses/BSD-3-Clause",
55
"codeRepository": "https://github.com/NeuralEnsemble/python-neo",
66
"contIntegration": "https://github.com/NeuralEnsemble/python-neo/actions",
7-
"dateModified": "2024-02-02",
8-
"downloadUrl": "https://files.pythonhosted.org/packages/b2/07/b8653dd235919dc13671fc31bd8bcbb57571e72d75e4cb04dc1347416357/neo-0.13.0.tar.gz",
7+
"dateModified": "2024-10-14",
8+
"downloadUrl": "https://files.pythonhosted.org/packages/e0/0d/e973b7e8464b6f1d88022c46040f203d93c0b080af0e33702bb11873dbbb/neo-0.13.4.tar.gz",
99
"issueTracker": "https://github.com/NeuralEnsemble/python-neo/issues",
1010
"name": "Neo",
11-
"version": "0.13.0",
11+
"version": "0.13.4",
1212
"identifier": "RRID:SCR_000634",
1313
"description": "Neo is a Python package for working with electrophysiology data in Python, together with support for reading a wide range of neurophysiology file formats, including Spike2, NeuroExplorer, AlphaOmega, Axon, Blackrock, Plexon, Tdt, and support for writing to a subset of these formats plus non-proprietary formats including HDF5.\n\nThe goal of Neo is to improve interoperability between Python tools for analyzing, visualizing and generating electrophysiology data by providing a common, shared object model. In order to be as lightweight a dependency as possible, Neo is deliberately limited to represention of data, with no functions for data analysis or visualization.\n\nNeo is used by a number of other software tools, including SpykeViewer (data analysis and visualization), Elephant (data analysis), the G-node suite (databasing), PyNN (simulations), tridesclous_ (spike sorting) and ephyviewer (data visualization).\n\nNeo implements a hierarchical data model well adapted to intracellular and extracellular electrophysiology and EEG data with support for multi-electrodes (for example tetrodes). Neo's data objects build on the quantities package, which in turn builds on NumPy by adding support for physical dimensions. Thus Neo objects behave just like normal NumPy arrays, but with additional metadata, checks for dimensional consistency and automatic unit conversion.",
1414
"applicationCategory": "neuroscience",
15-
"releaseNotes": "https://neo.readthedocs.io/en/stable/releases/0.13.0.html",
15+
"releaseNotes": "https://neo.readthedocs.io/en/latest/releases/0.13.4.html",
1616
"funding": "https://cordis.europa.eu/project/id/945539",
1717
"developmentStatus": "active",
1818
"referencePublication": "https://doi.org/10.3389/fninf.2014.00010",
@@ -23,7 +23,7 @@
2323
"programmingLanguage": ["Python"],
2424
"operatingSystem": ["Linux", "Windows", "macOS"],
2525
"softwareRequirements": [
26-
"Python (version 3.8+)",
26+
"Python (version 3.9+)",
2727
"see https://github.com/NeuralEnsemble/python-neo/blob/master/pyproject.toml"
2828
],
2929
"relatedLink": ["https://neo.readthedocs.io", "https://neuralensemble.org/community"],
@@ -54,6 +54,7 @@
5454
{ "@type": "Person", "givenName": "Kyler", "familyName": "Brown" },
5555
{ "@type": "Person", "givenName": "Mikkel Elle", "familyName": "Lepperød" },
5656
{ "@type": "Person", "givenName": "C Daniel", "familyName": "Meliza" },
57+
{ "@type": "Person", "givenName": "Michael", "familyName": "Denker" },
5758
{ "@type": "Person", "givenName": "Julia", "familyName": "Sprenger" },
5859
{ "@type": "Person", "givenName": "Maximilian", "familyName": "Schmidt" },
5960
{ "@type": "Person", "givenName": "Johanna", "familyName": "Senk" },
@@ -103,6 +104,15 @@
103104
{ "@type": "Person", "givenName": "Cody", "familyName": "Baker" },
104105
{ "@type": "Person", "givenName": "Fernando J.", "familyName": "Chaure" },
105106
{ "@type": "Person", "alternateName": "Filipe@github" },
106-
{ "@type": "Person", "givenName": "Matthias Klumpp" }
107+
{ "@type": "Person", "givenName": "Matthias", "familyName": "Klumpp" },
108+
{ "@type": "Person", "givenName": "Greg", "familyName": "Knoll" },
109+
{ "@type": "Person", "givenName": "Chris", "familyName": "Halcrow" },
110+
{ "@type": "Person", "givenName": "Szonja", "familyName": "Weigl" },
111+
{ "@type": "Person", "givenName": "Teo", "familyName": "Lohrer"},
112+
{ "@type": "Person", "givenName": "Kyu Hun", "familyName": "Lee"},
113+
{ "@type": "Person", "givenName": "Xin", "familyName": "Niu"},
114+
{ "@type": "Person", "givenName": "Anthony", "familyName": "Pinto"},
115+
{ "@type": "Person", "givenName": "Chris", "familyName": "Heydrick"},
116+
{"@type": "Person", "givenName": "Nikhil", "familyName": "Chandra"}
107117
]
108118
}

doc/source/authors.rst

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ and may not be the current affiliation of a contributor.
2727
* Kyler Brown
2828
* Mikkel Elle Lepperød [11]
2929
* C Daniel Meliza [12]
30+
* Michael Denker [13, 29]
3031
* Julia Sprenger [13, 6]
3132
* Maximilian Schmidt [13]
3233
* Johanna Senk [13]
@@ -54,7 +55,7 @@ and may not be the current affiliation of a contributor.
5455
* Aitor Morales-Gregorio [13]
5556
* Peter N Steinmetz [22]
5657
* Shashwat Sridhar
57-
* Alessio Buccino [23]
58+
* Alessio Buccino [23, 24, 38]
5859
* Regimantas Jurkus [13]
5960
* Steffen Buergers [24]
6061
* Etienne Combrisson [6]
@@ -64,21 +65,30 @@ and may not be the current affiliation of a contributor.
6465
* Heberto Mayorquin [24]
6566
* Thomas Perret [25]
6667
* Kyle Johnsen [26, 27]
67-
* Zach McKenzie [28]
68-
* Moritz Alexander Kern
68+
* Zach McKenzie [28,39]
69+
* Moritz Alexander Kern [29]
6970
* Joscha Schmiedt
70-
* Daniel P. Crepeau
71-
* Divyansh Gupta
72-
* Nate Dolensek
73-
* Philipp Hornauer
71+
* Daniel P. Crepeau [30]
72+
* Divyansh Gupta [31]
73+
* Nate Dolensek [3]
74+
* Philipp Hornauer [32]
7475
* Robert Wolff
75-
* Jules Lebert
76+
* Jules Lebert [33]
7677
* Benjamin Heasly
77-
* Baptiste Grimaud
78-
* Cody Baker
79-
* Fernando J. Chaure
78+
* Baptiste Grimaud [34]
79+
* Cody Baker [24]
80+
* Fernando J. Chaure [35]
8081
* Filipe*github
8182
* Matthias Klumpp
83+
* Greg Knoll [36]
84+
* Chris Halcrow [37]
85+
* Szonja Weigl [24]
86+
* Chris Heydrick [40]
87+
* Kyu Hun Lee
88+
* Téo Lohrer
89+
* Anthony Pinto [41]
90+
* Xin Niu
91+
* Nikhil Chandra [40]
8292

8393
1. Centre de Recherche en Neuroscience de Lyon, CNRS UMR5292 - INSERM U1028 - Universite Claude Bernard Lyon 1
8494
2. Unité de Neuroscience, Information et Complexité, CNRS UPR 3293, Gif-sur-Yvette, France
@@ -108,6 +118,21 @@ and may not be the current affiliation of a contributor.
108118
26. Georgia Institute of Technology
109119
27. Emory University
110120
28. Harvard Medical School
121+
29. Institute for Advanced Simulation (IAS-6), Forschungszentrum Jülich, Germany
122+
30. Dark Horse Neuro, Inc.
123+
31. IST Austria
124+
32. Department of Biosystems Science and Engineering, ETH Zürich, Basel, Switzerland
125+
33. University College London
126+
34. École Normale Supérieure Paris-Saclay
127+
35. Institute of Biomedical Engineering, University of Buenos Aires, Argentina
128+
36. Bernstein Center for Computational Neuroscience, Berlin, Germany
129+
37. University of Edinburgh
130+
38. Allen Institute for Neural Dynamics, Seattle, WA, United States
131+
39. Massachusetts General Hospital, Department of Molecular Biology
132+
40. Plexon Inc.
133+
41. Paris Brain Institute
134+
135+
111136

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

doc/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@
252252
)
253253

254254
sphinx_gallery_conf = {
255+
# 'only_warn_on_example_error': True, # helps with debugging broken examples
255256
"examples_dirs": "../../examples", # path to your example scripts
256257
"gallery_dirs": "examples", # path to where to save gallery generated output
257258
}

doc/source/contributing.rst

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,28 @@ The first time this is run, all of the Neo test files will be downloaded to your
208208
so the run time can be an hour or more.
209209
For subsequent runs, the files are already there, so the tests will run much faster.
210210

211+
Because Neo downloads datasets this can lead to issues in the course of offline development or
212+
for packaging Neo (e.g. for a Linux distribution). In order to not download datasets and to skip
213+
tests which require downloaded datasets the environment variable :code:`NEO_TESTS_NO_NETWORK` can
214+
be set to any truthy value (e.g. :code:`'True'``).
215+
216+
For macOS/Linux this can be done by doing:
217+
218+
.. code-block:: bash
219+
220+
NEO_TESTS_NO_NETWORK='True' pytest .
221+
222+
For Windows this can be done by doing:
223+
224+
.. code-block:: bat
225+
226+
set NEO_TESTS_NO_NETWORK=true
227+
228+
pytest .
229+
230+
This can also be done with a conda environment variable if developing in a conda env. To configure these
231+
see the docs at `conda env vars documentation`_.
232+
211233
It is often helpful to run only parts of the test suite. To test only the :mod:`neo.core` module,
212234
which is much quicker than testing :mod:`neo.io`, run::
213235

@@ -465,4 +487,5 @@ Making a release
465487
.. _PyPI: https://pypi.org/project/neo
466488
.. _`continuous integration server`: https://github.com/NeuralEnsemble/python-neo/actions
467489
.. _`Read the Docs`: https://neo.readthedocs.io/en/latest/
468-
.. _`docs configuration page`: https://readthedocs.org/projects/neo/
490+
.. _`docs configuration page`: https://readthedocs.org/projects/neo/
491+
.. _`conda env vars documentation`: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment

doc/source/rawio.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,32 @@ Read event timestamps and times
281281
In [42]: print(ev_times)
282282
[ 0.0317]
283283

284+
Signal streams and signal buffers
285+
---------------------------------
286+
287+
For reading analog signals **neo.rawio** has 2 important concepts:
288+
289+
1. The **signal_stream** : it is a group of channels that can be read together using :func:`get_analog_signal_chunk()`.
290+
This group of channels is guaranteed to have the same sampling rate, and the same duration per segment.
291+
Most of the time, this group of channel is a "logical" group of channels. In short they are from the same headstage
292+
or from the same auxiliary board.
293+
Optionally, depending on the format, a **signal_stream** can be a slice of or an entire **signal_buffer**.
294+
295+
2. The **signal_buffer** : it is group of channels that share the same data layout in a file. The most simple example
296+
is channel that can be read by a simple :func:`signals = np.memmap(file, shape=..., dtype=... , offset=...)`.
297+
A **signal_buffer** can contain one or several **signal_stream**'s (very often it is only one).
298+
There are two kind of formats that handle this concept:
299+
300+
* Formats which use :func:`np.memmap()` internally
301+
* Formats based on hdf5
302+
303+
There are many formats that do not handle this concept:
304+
305+
* the ones that use an external python package for reading data (edf, ced, plexon2, ...)
306+
* the ones with a complicated data layout (e.g. those where the data blocks are split without structure)
307+
308+
To check if a format makes use of the buffer api you can check the class attribute flag `has_buffer_description_api` of the
309+
rawio class.
284310

285311

286312

doc/source/releases.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Release notes
66
.. toctree::
77
:maxdepth: 1
88

9+
releases/0.13.4.rst
10+
releases/0.13.3.rst
11+
releases/0.13.2.rst
12+
releases/0.13.1.rst
913
releases/0.13.0.rst
1014
releases/0.12.0.rst
1115
releases/0.11.1.rst

0 commit comments

Comments
 (0)