updated get_distortion_params2 to use a C language fitter
(speed improves by 30x)