diff --git a/spikeinterface/extractors/neoextractors/neobaseextractor.py b/spikeinterface/extractors/neoextractors/neobaseextractor.py index 1186e05394..4d023a45c9 100644 --- a/spikeinterface/extractors/neoextractors/neobaseextractor.py +++ b/spikeinterface/extractors/neoextractors/neobaseextractor.py @@ -1,3 +1,5 @@ +import warnings + import numpy as np from spikeinterface.core import (BaseRecording, BaseSorting, BaseEvent, BaseRecordingSegment, BaseSortingSegment, BaseEventSegment) @@ -64,8 +66,9 @@ def __init__(self, stream_id=None, all_annotations=False, **neo_kwargs): units = signal_channels['units'] if not np.all(np.isin(units, ['V', 'Volt', 'mV', 'uV'])): # check that units are V, mV or uV - error = f'This extractor based on neo.{self.NeoRawIOClass} have strange units not in (V, mV, uV) {units}' - print(error) + message = f'This extractor based on neo.{self.NeoRawIOClass} have strange units not in (V, mV, uV) {units}' + warnings.warn(message) + additional_gain = np.ones(units.size, dtype='float') additional_gain[units == 'V'] = 1e6 additional_gain[units == 'Volt'] = 1e6