Skip to content

Commit 991fd85

Browse files
authored
Merge pull request #1138 from JuliaSprenger/clean/warnings
clean up tdt warnings and badge cleanup
2 parents 0aa3a68 + 5d41388 commit 991fd85

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ A project with similar aims but for neuroimaging file formats is `NiBabel`_.
3131
Code status
3232
-----------
3333

34-
.. image:: https://travis-ci.org/NeuralEnsemble/python-neo.png?branch=master
35-
:target: https://travis-ci.org/NeuralEnsemble/python-neo
36-
:alt: Core Unit Test Status (TravisCI)
37-
.. image:: https://github.com/NeuralEnsemble/python-neo/actions/workflows/full-test.yml/badge.svg?event=push&branch=master
34+
.. image:: https://github.com/NeuralEnsemble/python-neo/actions/workflows/core-test.yml/badge.svg?event=push&branch=master
3835
:target: https://github.com/NeuralEnsemble/python-neo/actions?query=event%3Apush+branch%3Amaster
39-
:alt: IO Unit Test Status (Github Actions)
36+
:alt: Core Test Status (Github Actions)
37+
.. image:: https://github.com/NeuralEnsemble/python-neo/actions/workflows/io-test.yml/badge.svg?event=push&branch=master
38+
:target: https://github.com/NeuralEnsemble/python-neo/actions?query=event%3Apush+branch%3Amaster
39+
:alt: IO Test Status (Github Actions)
4040
.. image:: https://coveralls.io/repos/NeuralEnsemble/python-neo/badge.png
4141
:target: https://coveralls.io/r/NeuralEnsemble/python-neo
4242
:alt: Unit Test Coverage

neo/rawio/tdtrawio.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ def _parse_header(self):
179179
for seg_index in range(nb_segment)} # key = seg_index then group_id
180180

181181
keep = info_channel_groups['TankEvType'] == EVTYPE_STREAM
182+
missing_sev_channels = []
182183
for stream_index, info in enumerate(info_channel_groups[keep]):
183184
self._sig_sample_per_chunk[stream_index] = info['NumPoints']
184185

@@ -252,7 +253,7 @@ def _parse_header(self):
252253

253254
# in case non or multiple sev files are found for current stream + channel
254255
if len(sev_filename) != 1:
255-
warnings.warn(f'Could not identify sev file for channel {chan_id}.')
256+
missing_sev_channels.append(chan_id)
256257
sev_filename = None
257258

258259
if (sev_filename is not None) and sev_filename.exists():
@@ -269,6 +270,10 @@ def _parse_header(self):
269270
offset = 0.
270271
signal_channels.append((chan_name, str(chan_id), sampling_rate, dtype,
271272
units, gain, offset, stream_id))
273+
274+
if missing_sev_channels:
275+
warnings.warn(f'Could not identify sev files for channels {missing_sev_channels}.')
276+
272277
signal_streams = np.array(signal_streams, dtype=_signal_stream_dtype)
273278
signal_channels = np.array(signal_channels, dtype=_signal_channel_dtype)
274279

0 commit comments

Comments
 (0)