cryocat.core.cryomotl.relion2stopgap#
- cryocat.core.cryomotl.relion2stopgap(input_motl, relion_version, load_kwargs=None, output_motl_path=None, update_coordinates=False, reset_index=False)#
Converts a RelionMotl to StopgapMotl format and optionally writes it to a file.
- Parameters:
- input_motlstr or pandas.DataFrame or RelionMotl
Path to the input Relion MOTL file or an already loaded RelionMotl object.
- relion_versionfloat
Version of the input Relion object.
- load_kwargsdict, optional
Dictionary of keyword arguments passed to the
RelionMotlorRelionMotlv5constructor. SeeRelionMotl.__init__orRelionMotlv5.__init__for full list of accepted keys.- output_motl_pathstr, optional
If provided, the converted motl will be written to this path.
- update_coordinatesbool, default=False
If True, updates the coordinates in the DataFrame.
- reset_indexbool, default=False
If True, the index of the DataFrame will be reset before writing out.
- Returns:
- sg_motlStopgapMotl
The converted StopgapMotl object.