Skip to content

Commit 273746c

Browse files
authored
Merge branch 'master' into release-14.2
2 parents ac7a46d + 6a7b3e3 commit 273746c

File tree

4 files changed

+36
-54
lines changed

4 files changed

+36
-54
lines changed

CODE_OF_CONDUCT.md

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,16 @@
1-
# Contributor Covenant Code of Conduct
1+
# [The NumFOCUS Code of Conduct](https://numfocus.org/code-of-conduct)
22

3-
## Our Pledge
3+
Neo subscribes to the NumFOCUS Code of Conduct.
44

5-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
5+
## The Short Version
6+
Be kind to others. Do not insult or put down others. Behave professionally. Remember that harassment and sexist, racist, or exclusionary jokes are not appropriate for NumFOCUS.
67

7-
## Our Standards
8+
All communication should be appropriate for a professional audience including people of many different backgrounds. Sexual language and imagery is not appropriate.
89

9-
Examples of behavior that contributes to creating a positive environment include:
10+
NumFOCUS is dedicated to providing a harassment-free community for everyone, regardless of gender, sexual orientation, gender identity and expression, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of community members in any form.
1011

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
12+
Thank you for helping make this a welcoming, friendly community for all.
1613

17-
Examples of unacceptable behavior by participants include:
14+
## The Complete Version
1815

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
24-
25-
## Our Responsibilities
26-
27-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28-
29-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30-
31-
## Scope
32-
33-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34-
35-
## Enforcement
36-
37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38-
39-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40-
41-
## Attribution
42-
43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44-
45-
[homepage]: http://contributor-covenant.org
46-
[version]: http://contributor-covenant.org/version/1/4/
16+
The full version of the NumFOCUS Code of Conduct is available at the [NumFOCUS website](https://numfocus.org/code-of-conduct)

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Neo objects behave just like normal NumPy arrays, but with additional metadata,
2727
checks for dimensional consistency and automatic unit conversion.
2828

2929
A project with similar aims but for neuroimaging file formats is `NiBabel`_.
30+
Neo is a `NumFocus Affiliated Project`_.
3031

3132
Code status
3233
-----------
@@ -82,3 +83,4 @@ and by the European Union's Research and Innovation Program Horizon Europe Grant
8283
.. _`issue tracker`: https://github.c
8384
.. _tridesclous: https://github.com/tridesclous/tridesclous
8485
.. _ephyviewer: https://github.com/NeuralEnsemble/ephyviewer
86+
.. _`NumFocus Affiliated Project`: https://numfocus.org/sponsored-projects/affiliated-projects

doc/source/governance.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Governance
55
Neo is a community-developed project,
66
we welcome contributions from anyone who is interested in the project.
77
The project maintainers are the members of the `Neo maintainers team`_.
8-
All contributors agree to abide by the Code of Conduct, see the file `CODE_OF_CONDUCT.md`_.
8+
All contributors agree to abide by the `NumFocus Code of Conduct`_,
9+
see the file `CODE_OF_CONDUCT.md`_.
910

1011
Contributions
1112
=============
@@ -49,3 +50,4 @@ The current maintainers are:
4950
.. _`@mdenker`: https://github.com/mdenker
5051
.. _`@alejoe91`: https://github.com/alejoe91
5152
.. _`@zm711`: https://github.com/zm711
53+
.. _`NumFocus Code of Conduct`: https://numfocus.org/code-of-conduct

neo/rawio/neuronexusrawio.py

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,11 @@ def _parse_header(self):
132132
self._n_samples, self._n_channels = self.metadata["status"]["shape"]
133133
# Stored as a simple float32 binary file
134134
BINARY_DTYPE = "float32"
135+
TIMESTAMP_DTYPE = "int64" # this is from the allego sample reader timestamps are np.int64
135136
binary_file = self.binary_file
136137
timestamp_file = self.timestamp_file
137138

138-
# the will cretae a memory map with teh generic mechanism
139+
# the will cretae a memory map with the generic mechanism
139140
buffer_id = "0"
140141
self._buffer_descriptions = {0: {0: {}}}
141142
self._buffer_descriptions[0][0][buffer_id] = {
@@ -149,7 +150,7 @@ def _parse_header(self):
149150
# Make the memory map for timestamp
150151
self._timestamps = np.memmap(
151152
timestamp_file,
152-
dtype=np.int64, # this is from the allego sample reader timestamps are np.int64
153+
dtype=TIMESTAMP_DTYPE,
153154
mode="r",
154155
offset=0, # headerless binary file
155156
)
@@ -167,24 +168,28 @@ def _parse_header(self):
167168
signal_channels = []
168169
channel_info = self.metadata["sapiens_base"]["biointerface_map"]
169170

170-
# as per dicussion with the Neo/SpikeInterface teams stream_id will become buffer_id
171-
# and because all data is stored in the same buffer stream for the moment all channels
172-
# will be in stream_id = 0. In the future this will be split into sub_streams based on
173-
# type but for now it will be the end-users responsability for this.
174-
stream_id = "0" # hard-coded see note above
171+
# NeuroNexus uses a single buffer for all file types. Now that we buffer API
172+
# we divide each Allego signal into it's appropriate stream for the end-user
175173
buffer_id = "0"
176174
for channel_index, channel_name in enumerate(channel_info["chan_name"]):
177175
channel_id = channel_info["ntv_chan_name"][channel_index]
178176
# 'ai0' indicates analog data which is stored as microvolts
177+
# sometimes also called the pri data for NeuroNexus terminology
179178
if channel_info["chan_type"][channel_index] == "ai0":
180179
units = "uV"
180+
stream_id = "ai-pri"
181181
# 'd' means digital. Per discussion with neuroconv users the use of
182182
# 'a.u.' makes the units clearer
183-
elif channel_info["chan_type"][channel_index][0] == "d":
183+
elif channel_info["chan_type"][channel_index][:2] == "di":
184184
units = "a.u."
185-
# aux channel
185+
stream_id = "din"
186+
elif channel_info["chan_type"][channel_index][:2] == "do":
187+
# aux channel
188+
units = "a.u."
189+
stream_id = "dout"
186190
else:
187191
units = "V"
192+
stream_id = "aux"
188193

189194
signal_channels.append(
190195
(
@@ -212,7 +217,7 @@ def _parse_header(self):
212217
signal_streams["buffer_id"] = buffer_id
213218
self._stream_buffer_slice = {}
214219
for stream_index, stream_id in enumerate(stream_ids):
215-
name = stream_id_to_stream_name.get(int(stream_id), "")
220+
name = stream_id_to_stream_name.get(stream_id, "")
216221
signal_streams["name"][stream_index] = name
217222
chan_inds = np.flatnonzero(signal_channels["stream_id"] == stream_id)
218223
self._stream_buffer_slice[stream_id] = chan_inds
@@ -294,7 +299,10 @@ def _get_analogsignal_buffer_description(self, block_index, seg_index, buffer_id
294299
return self._buffer_descriptions[block_index][seg_index][buffer_id]
295300

296301

297-
# this is pretty useless right now, but I think after a
298-
# refactor with sub streams we could adapt this for the sub-streams
299-
# so let's leave this here for now :)
300-
stream_id_to_stream_name = {"0": "Neuronexus Allego Data"}
302+
# here we map the stream_id to the more descriptive stream_name
303+
stream_id_to_stream_name = {
304+
"ai-pri": "NeuroNexus Allego Analog (pri) Data",
305+
"din": "NeuroNexus Allego Digital-in (din) Data",
306+
"dout": "NeuroNexus Allego Digital-out (dout) Data",
307+
"aux": "NeuroNexus Allego Auxiliary (aux) Data",
308+
}

0 commit comments

Comments
 (0)