You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I read a raw binary file that is saved in uint16 and correctly set the offset, calling unsigned_to_signed returns a recording with an invalid offset.
raw_rec=se.read_binary(
data_file,
sampling_frequency=30000.,
dtype=np.uint16,
num_channels=384,
gain_to_uV=3.05176,
offset_to_uV=-2048*3.05176,
)
# we can use get_traces with return_in_uV, all is goodunsigned=si.unsigned_to_signed(raw_rec, bit_depth=12)
# now the trace in uV have an offset, exactly 2048*3.05176
Shouldn't the unsigned_to_signed subtract 2**bit_depth / 2 * gain from the offset? Or is it expected that the offset is unset when using this function?