How to rescale linear measurement of log datas to its original values ?
Publié le 2 Mai 2013
The problem
Given a log-log data graph from published experimental results, I want to digitize the coordinates of the points in order to compare with my calculations.
For this mission, you can use the great open source Digitizer (also available in Ubuntu repository).
However, I did not have access to it at work ("safety" reasons - it's a complex story). Then I started to implement it by myself using ImageJ software. A nice plugin is already available for non log datas (see this nice descriptive). However, this method is limited to linear scales.
Anyway, I digitized my log scaled datas using a linear scaling.
This kind of silly action opened to my mind an interesting mathematical problem which is the following.
Conclusion
To not waste your time, here is the conclusion : there is no simple analytical solution to this problem. A numerical resolution is possible but its stability is reduced.
Details
Given the interval containing the datas $x \in [x_{min},x_{max}]$, let's find a function which restore the log scaling of the datas from the linear measurements. Then $x'=f(x)$ on each value of your measured datas will give the rescaled value, corresponding to one written on the original paper.
The function is of course linked to a log or exponential functions, on which we add few fitting coefficients. The logscale is based on powers of 10. Thus by digitizing the numbers using a linear scaling, we implicitly applied the function $f^{-1}$, then we shall write \[ f(x) = e^{x/a \ln(10)} - b \\ x_{min} = f(x_{xmin}) \\ x_{max} = f(x_{max}) \]
Notice that the function has to contain two values of x so that $x=f(x)$, defining two fixed points.
Finding $a$ and $b$ is equivalent to solve the following equation system \[ y = e^{x/a \ln(10)} - b \\ x_{min} = e^{x_{min}/a \ln(10)} - b \\ x_{max} = e^{x_{max}/a \ln(10)} - b \]
This system is not linear and admits a numerical solution if $x_{max}$ is not too high, due to the exponent. Indeed, it is easy to reach $10^{304}$ and thus an "Out of range" error. You can try a normalization of the datas before applying the function, but the denormalization is non linear and thus fails.
However, we can try to find an analytical solution by a change of variable, so that the sum of exponents becomes symmetric, and leads to a hyperbolic sinus since \[ \frac{e^{x}-e^{-x}}{2} = \sinh (x) \].
This change of variable is to make the interval for $x$ symetric, so that \[ x_{min} = m - \Delta m \\ x_{max} = m + \Delta m \].
Thus we find \[ b=e^{\ln 10 (m-\Delta m) / a} + \Delta m - m \\ \Delta m = \sinh \left( \frac{\ln 10 \Delta m}{a} \right) e^{m \ln 10 / a}. \]
The $arcsinh$ leads to a $\sqrt{}$ which restricts the definition set to $\ln(\Delta m) < - \frac{2 m}{a} \ln 10$.
The conclusion is that the equation is not solvable for any case and require a numerical approach.