I am looking for a method to solve the matrix equation$$ DXa = Xb $$where $D\in \mathbb{R}^{n\times n}$ is diagonal, $a, b\in \mathbb{R}^{n}$ and $X$ is the unknown orthogonal $n\times n$ matrix such that $X^TX = I$. The matrices $a$ and $b$ have unit norm, and $D$ has diagonal entries of unit magnitude, so that the matrix equation is consistent.
Computing an orthogonal matrix subject to linear constraints
reference request;matrix equations