Skip to content

Potential to speed up calculations #5

@cmlamman

Description

@cmlamman

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions