Fixes for the calculation of the frame order matrix in the test data generation base script.
The matrix generation now handles multiple modes of motion correctly. The total rotation matrix is
constructed when looping over the modes by using the dot product of the individual rotation to the
total, and then this is used to create the outer product, summed over all states.