Currently, np.cos() is used twice: in computing multiplet orientation and in the position angle between multiplet and tracer. However, these relatively slow functions could maybe be avoided by using:
$$cos(2\theta) = \frac{2 [\hat{p} \cdot (\hat{x}-\hat{y})]^2}{|\hat{x}-\hat{y}|^2} - 1$$
Where $\hat{p}$ is the direction of the multiplet's major axis on the unit sphere, and $\hat{x}$ and $\hat{y}$ are the unit sphere positions of the multiplet's center and the tracer, respectively.
This would require changing nearly all steps of the code...
Currently, np.cos() is used twice: in computing multiplet orientation and in the position angle between multiplet and tracer. However, these relatively slow functions could maybe be avoided by using:
Where$\hat{p}$ is the direction of the multiplet's major axis on the unit sphere, and $\hat{x}$ and $\hat{y}$ are the unit sphere positions of the multiplet's center and the tracer, respectively.
This would require changing nearly all steps of the code...