From d859f902c924de85964c593a61cd1dd743cfcfef Mon Sep 17 00:00:00 2001 From: Sam Bray Date: Wed, 1 Nov 2023 08:29:59 -0700 Subject: [PATCH] Use int 16 conversion variable --- src/spikegadgets_to_nwb/spike_gadgets_raw_io.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spikegadgets_to_nwb/spike_gadgets_raw_io.py b/src/spikegadgets_to_nwb/spike_gadgets_raw_io.py index 91858f3..be06d1f 100644 --- a/src/spikegadgets_to_nwb/spike_gadgets_raw_io.py +++ b/src/spikegadgets_to_nwb/spike_gadgets_raw_io.py @@ -614,7 +614,8 @@ def get_analogsignal_multiplexed_partial( # read the data into int16 data = ( self._raw_memmap[i_start:i_stop, data_offsets[:, 0]] - + self._raw_memmap[i_start:i_stop, data_offsets[:, 0] + 1] * 256 + + self._raw_memmap[i_start:i_stop, data_offsets[:, 0] + 1] + * INT_16_CONVERSION ) # initialize the first row analog_multiplexed_data[0] = data[0] @@ -920,7 +921,7 @@ def get_analogsignal_multiplexed(self, channel_names=None) -> np.ndarray: # read the data into int16 data = ( self._raw_memmap[:, data_offsets[:, 0]] - + self._raw_memmap[:, data_offsets[:, 0] + 1] * 256 + + self._raw_memmap[:, data_offsets[:, 0] + 1] * INT_16_CONVERSION ) # initialize the first row # if no previous state, assume first segment. Default to superclass behavior