Created
September 9, 2020 23:20
-
-
Save wjiang/e589c82d4e2fddce00718445c9f37fc3 to your computer and use it in GitHub Desktop.
print out the transform matrices for a symmetry defined in EMAN2 convention
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from EMAN2 import * | |
sym = "icos" | |
xf = Transform() | |
xf.to_identity() | |
nsym=xf.get_nsym(sym) | |
for i in range(nsym): | |
e = xf.get_sym(sym, i) | |
m = e.get_params("matrix") | |
print(f"EMAN2 {sym}: sym {i+1}/{nsym}:") | |
print(f"{m['m11']:8.4f}\t{m['m12']:8.4f}\t{m['m13']:8.4f}\t{m['tx']:8.4f}") | |
print(f"{m['m21']:8.4f}\t{m['m22']:8.4f}\t{m['m23']:8.4f}\t{m['ty']:8.4f}") | |
print(f"{m['m31']:8.4f}\t{m['m32']:8.4f}\t{m['m33']:8.4f}\t{m['tz']:8.4f}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment