instead of estimating shift using the gradients (which was not robust in
some cases), we now invert the estimated function using LUTRealTransform.

This is part of the problem with the current code:  LUTRealTransform
requires functions to be monotonously increasing which wouldn't be the
case for our actual function fit.  Lacking time and energy, we have simply
inverted the function instead of implementing a LUTRealTransform for
decreasing functions.  TODO FIX THIS!