diff --git a/neo/rawio/biocamrawio.py b/neo/rawio/biocamrawio.py index d61d92daee..80400e5473 100644 --- a/neo/rawio/biocamrawio.py +++ b/neo/rawio/biocamrawio.py @@ -4,7 +4,7 @@ See: https://www.3brain.com/products/single-well/biocam-x -Author : Alessio Buccino +Authors: Alessio Buccino, Robert Wolff, Baptiste Grimaud """ from .baserawio import (BaseRawIO, _signal_channel_dtype, _signal_stream_dtype, @@ -145,14 +145,14 @@ def open_biocam_file_header(filename): if format_100: if signal_inv == 1: read_function = readHDF5t_100 - elif signal_inv == 1: + elif signal_inv == -1: read_function = readHDF5t_100_i else: raise Exception("Unknown signal inversion") else: if signal_inv == 1: read_function = readHDF5t_101 - elif signal_inv == 1: + elif signal_inv == -1: read_function = readHDF5t_101_i else: raise Exception("Unknown signal inversion") @@ -166,16 +166,16 @@ def open_biocam_file_header(filename): def readHDF5t_100(rf, t0, t1, nch): - return rf['3BData/Raw'][t0:t1] + return rf['3BData/Raw'][t0:t1].astype(np.int16) - 2048 def readHDF5t_100_i(rf, t0, t1, nch): - return 4096 - rf['3BData/Raw'][t0:t1] + return 2048 - rf['3BData/Raw'][t0:t1].astype(np.int16) def readHDF5t_101(rf, t0, t1, nch): - return rf['3BData/Raw'][nch * t0:nch * t1].reshape((t1 - t0, nch), order='C') + return rf['3BData/Raw'][nch * t0:nch * t1].reshape((t1 - t0, nch), order='C').astype(np.int16) - 2048 def readHDF5t_101_i(rf, t0, t1, nch): - return 4096 - rf['3BData/Raw'][nch * t0:nch * t1].reshape((t1 - t0, nch), order='C') + return 2048 - rf['3BData/Raw'][nch * t0:nch * t1].reshape((t1 - t0, nch), order='C').astype(np.int16)