-
Notifications
You must be signed in to change notification settings - Fork 237
Open
Labels
preprocessingRelated to preprocessing moduleRelated to preprocessing module
Milestone
Description
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 good
unsigned = si.unsigned_to_signed(raw_rec, bit_depth=12)
# now the trace in uV have an offset, exactly 2048*3.05176Shouldn'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?
Metadata
Metadata
Assignees
Labels
preprocessingRelated to preprocessing moduleRelated to preprocessing module