Skip to content

Commit 7491749

Browse files
authored
Merge pull request #790 from SimonDanner/master
Fix reading RealWave Spike2 channels and channels with unrecognized quantities
2 parents 8375fcf + d977ead commit 7491749

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

neo/io/proxyobjects.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
Epoch, Event, SpikeTrain)
2121
from neo.core.dataobject import ArrayDict
2222

23+
import logging
2324

2425
class BaseProxy(BaseNeo):
2526
def __init__(self, array_annotations=None, **annotations):
@@ -522,6 +523,7 @@ def ensure_signal_units(units):
522523
logging.warning('Units "{}" can not be converted to a quantity. Using dimensionless '
523524
'instead'.format(units))
524525
units = ''
526+
units = pq.Quantity(1, units)
525527
return units
526528

527529

neo/rawio/spike2rawio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _parse_header(self):
215215
elif chan_info['kind'] == 9: # float32
216216
gain = 1.
217217
offset = 0.
218-
sig_dtype = 'int32'
218+
sig_dtype = 'float32'
219219
group_id = 0
220220
sig_channels.append((name, chan_id, sampling_rate, sig_dtype,
221221
units, gain, offset, group_id))

0 commit comments

Comments
 (0)