Closed ddkohler closed 1 year ago
this reads to me as one of two things:
1: these are not being treated as signed integers when they are (not sure why they would be signed, cameras ususally aren't) or vice versa
2: there is an off by one in reading the bytes so bytes which should be AABBCCDDEEFF... are read as integers AB BC CD DE EF... (missing the first byte) This has previously been seen with the InGaAs array detector, for instance.
https://github.com/yaq-project/yaqd-seek/blob/main/yaqd_seek/_seek_compact.py#L141-L142
Yeah, if you are subtracting like this, you should either upgrade the dtype to int32 (signed, larger so no risk of saturation) or do something like data -= np.minimum(data, cal)
to avoid underflow rather than adding an arbitrary offset
Right indeed @ksunden; I should be treating readouts as signed ints. Fix incoming.
Will also upgrade to int32 for subtraction.
closed via #11
16-bit readouts sometimes come back as numbers both near zero and 2^16 (this is a terrible situation for plotting). Possible solutions: