Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit 4d6d4f4

Browse files
authored
Merge pull request #659 from catalystneuro/optional_blackrock_channel_unit_value
optional channel unit value
2 parents 2deda6a + 5aa5390 commit 4d6d4f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spikeextractors/extractors/neoextractors/neobaseextractor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,13 @@ def __init__(self, block_index=None, seg_index=None, **kargs):
8181
# spikeextractor for units to be uV implicitly
8282
# check that units are V, mV or uV
8383
units = self.neo_reader.header['signal_channels']['units']
84-
assert np.all(np.isin(units, ['V', 'mV', 'uV'])), 'Signal units no Volt compatible'
84+
if not np.all(np.isin(units, ['V', 'mV', 'uV'])):
85+
warnings.warn('Signal units no Volt compatible, assuming scaling as uV')
8586
self.additional_gain = np.ones(units.size, dtype='float')
8687
self.additional_gain[units == 'V'] = 1e6
8788
self.additional_gain[units == 'mV'] = 1e3
8889
self.additional_gain[units == 'uV'] = 1.
90+
self.additional_gain[units == ''] = 1.
8991
self.additional_gain = self.additional_gain.reshape(1, -1)
9092

9193
# Add channels properties

0 commit comments

Comments
 (0)