Support for micrograph star import

Seems like it’d be simplest to use the new movies.star to change the file names.

import shutil
from pyem import star

df = star.parse_star('movies.star')
for x, y in df[[star.Relion.MICROGRAPHMOVIE_NAME, star.Relion.OPTICSGROUP]].to_numpy():
    shutil.move(x, x.replace(".tif", "_" + str(y) + ".tif"))

Or, make them symlinks in another directory, if you don’t want to rename the real files.

1 Like