Bad convergence with large `PhiInit` in `register()`
With very large initial rotations for example, register goes mad. Apparently swapping back line ~394 in the dot product behaviour is fine but does not seem mathematically sound.
# CASE 7: 3D case with large initial rotation (say 120 deg)
rot = 120
imDef = spam.DIC.applyPhi(im, Phi=spam.deformation.computePhi({'r': [rot, 0, 0]}))
returns7 = spam.DIC.register(im, imDef, margin=10, PhiInit=spam.deformation.computePhi({'r': [rot+2.5, 0, 0]}))
returns7['transformation'] = spam.deformation.decomposePhi(returns7['Phi'])
# Did you converge? Pas donné...
self.assertEqual(returns7['returnStatus'], 2)
for i in range(3):
self.assertAlmostEqual(numpy.array(returns7['transformation']["t"][i]), 0, places=1)
self.assertAlmostEqual(numpy.array(returns7['transformation']["r"][i]) - [rot, 0, 0][i], 0, places=1)