cryocat.core.cryomotl.emmotl2relion#

cryocat.core.cryomotl.emmotl2relion(input_motl, relion_version, output_motl_path=None, flip_handedness=False, tomo_dim=None, load_kwargs=None, write_kwargs=None)#

Converts an EmMotl to RelionMotl format and optionally writes it to file.

Parameters:
input_motlstr or pandas.Dataframe or EmMotl

Path to the input EM MOTL file or an already loaded EmMotl object.

relion_versionfloat

The version of the Relion file format.

output_motl_pathstr, optional

If provided, the converted motl will be written to this path.

flip_handednessbool, default=False

If True, flips the handedness of the coordinates.

tomo_dimtuple of int, optional

Dimensions of the tomogram (required if flip_handedness=True).

load_kwargsdict, optional

Dictionary of keyword arguments passed to the RelionMotl constructor. See RelionMotl.__init__ for full list of accepted keys, e.g.: {"pixel_size": 2.3, "optics_data": ...,}

write_kwargsdict, optional

Dictionary of keyword arguments passed to RelionMotl.write_out(). See RelionMotl.write_out for details, e.g.: {"optics_data": ..., "optics_data": ...}

Returns:
rln_motlRelionMotl converted object.