Derivative backpropagating versions of the rotation and translation functions
The functions used for rotation and translation have analytical derivatives. This means that it is in principle possible to go from a measured scattering curve to the partial derivatives of the chi-squared with respect to the various rotation and shift angles. These can then be passed to a gradient descent solver to find a local minimum. An algorithm like basin-hopping global optimization can be used to search for the global minimum.