Equating Mueller matrix elements to rotation matrix elements, we can write the system of equations for the three Euler angles. This system of equations can be solved using a normal nonlinear least-squares minimization by searching the (, , ) space for minima in squared error. With the measured Stokes vector (), , the Rayleigh sky input vector (), , and a rotation matrix (), we define the error () as . For measurements, this gives us terms. This solution is easily solvable in principle but has ambiguities. An alternative method for the direct least-squares solution for Euler angles is done in two steps. First, we directly solve a system of equations for the Mueller matrix elements that are not subject to rotational ambiguity. With the estimated Mueller matrix elements in hand, we can then perform a rotation matrix fit to the derived Mueller matrix element estimates. This two-step process allows us to use accurate starting values to speed up the minimization process and to resolve Euler angle ambiguities. When deriving the Mueller matrix elements of the telescope, one must take care that the actual derived matrices are physical. For instance, there are various matrix properties and quantities one can derive to test the physicality of the matrix.102–105 Noise and systematic errors might give overpolarizing or unphysical Mueller matrices. By fitting a rotation matrix, we avoid unphysical matrices.