Compute the squared differences for least squares fitting.
Given a flattened rotation matrix, one N point pattern and another N point
pattern to transform into to, compute the squared differences between the
points in the two patterns after the rotation.
Parameters
----------
flattened_rot_matrix : `numpy.ndarray`, (9, )
A flattened array representing a 3x3 rotation matrix. The array is
flattened to comply with the API of scipy.optimize.least_squares.
Flattened elements are [[0, 0], [0, 1], [0, 2], [1, 0]...]
pattern_a : `numpy.ndarray`, (N, 3)
A array containing N, 3 vectors representing the objects we would like
to transform into the frame of pattern_b.
pattern_b : `numpy.ndarray`, (N, 3)
A array containing N, 3 vectors representing the reference frame we
would like to transform pattern_a into.
max_dist_rad : `float`
The maximum distance allowed from the pattern matching. This value is
used as the standard error for the resultant chi values.
Returns
-------
noralized_diff : `numpy.ndarray`, (9,)
Array of differences between the vectors representing of the source
pattern rotated into the reference frame and the converse. This is
used to minimize in a least squares fitter.
Definition at line 34 of file pessimistic_pattern_matcher_b_3D.py.