For a given digitised voltage trace, I want to avoid any quantization error introduced via an insufficient precision of the float data type – and at the same time reduce the memory cost. However, I am not sure that I have understood all the concepts correctly. The digitised signal is given as a 32-bit integer which needs to be multiplied by a constant ($12958 \times 10^{-12}$) to get the voltage value...
The signal originates from an ADC with an input range of ±10V and 24-bit resolution, the quantisation step size should be $\frac{20}{2^{24}} \approx 1.19e{-06}$. Therefore it should not be possible to store the resulting (int*const) float value as float32
, since the float32 resolution on my machine (using numpy -> np.finfo(np.float32).resolution
) is $1e{-06}$.
Does this make sense or am I confusing some concepts?
EDIT: I want to process the signal (e.g. filtering) therefore further use of the integers is not possible. And as I work in Python I will work with floating point integers.
I want to point out, that I do not want to map the integers to floats. As far as I understand the integers are stored for memory efficiency and after multiplication with a constant get the 'real' float signal of the sensor. My concern is, that the floating numbers does lose some information because the step size of the 24-bit integers multiplied with the constant is less than the minimal step size of the float (in that region, accounting for relative error of float). The scaling constant for the integer is $12958 \times 10^{-12}$ (for Volt)- However, since I want to work with µV I usually normalise with $12958 \times 10^{-6}$. The usual range of the signal is about ±200µV.
This is the machine epsilon of my machine for the relevant signal interval.
Does this mean, that it should be 'save' to use the float32 since the step sizes in the relevant signal range are smaller than my scaling constant $12958 \times 10^{-6}$?
I would highly appreciate some literature suggestion to understand the concepts better.