Skip to content

Instantly share code, notes, and snippets.

@alisterburt
Last active April 17, 2023 13:20
Show Gist options
  • Select an option

  • Save alisterburt/7cf4aa0985e85ab74bffb6e6d78f5d38 to your computer and use it in GitHub Desktop.

Select an option

Save alisterburt/7cf4aa0985e85ab74bffb6e6d78f5d38 to your computer and use it in GitHub Desktop.
Decomposing a RELION projection matrix for James Hooker
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jahooker

jahooker commented Apr 5, 2023

Copy link
Copy Markdown

Thanks Alister,

A few questions/comments:

  1. I’ll take your word for it that the matrices are in the form you describe. Is there a specification somewhere that confirms this?

  2. In the case that $\cos(\beta)$ is zero, $\beta$ could presumably be either $\pi / 2$ or $3 \pi / 2$, and -M[1, 2] / M[1, 1] could be either $\tan(\alpha - \gamma)$ or $\tan(\alpha + \gamma)$. Whether $\beta$ is $\pi / 2$ or $3 \pi / 2$ could be told from M[2, 0].

  3. I don’t immediately see why in the case that $\cos(\beta)$ is zero, the choice of $\gamma$ should be arbitrary. Why not fix $\alpha$?

@alisterburt

Copy link
Copy Markdown
Author

Hey James

  1. no spec afaik, I actually made a small mistake in the matrices above, s1 should be made from the tilt-image center not the tomogram center: https://github.com/alisterburt/tomo_preprocessing/blob/4a47549a1e0bf350fd924820169d563adf78d5ca/tomography_preprocessing/tilt_series_alignment/_job_utils.py#L28-L69
    You will also need to be careful, IMOD uses N+1 / 2 (zero indexed) as the image rotation center whilst RELION uses N / 2

  2. yep - Euler angles are not a singular representation, there will always be multiple degenerate solutions

  3. Another arbitrary point, same as above - you could fix alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment