tomodrgn.starfile.load_sta_starfile#

load_sta_starfile(star_path: str, source_software: Literal['auto', 'warp', 'cryosrpnt', 'nextpyp', 'tomodrgn_preprocessed', 'cistem', 'warptools', 'relion'] = 'auto', image_ctf_premultiplied: bool | None = None, image_dose_weighted: bool | None = None) TiltSeriesStarfile | TomoParticlesStarfile[source]#

Loads a tomodrgn star file handling class (either TiltSeriesStarfile or TomoParticlesStarfile) from a star file on disk. The input star_path must point to either a particle imageseries star file (e.g. from Warp v1) or an optimisation set star file (e.g. from RELION v5). This is the preferred way of creating a tomodrgn starfile class instance.

Parameters:
  • star_path – path to star file to load on disk

  • source_software – type of source software used to create the star file, used to indicate the appropriate star file handling class to instantiate. Default of ‘auto’ tries to infer the appropriate star file handling class based on whether star_path is an optimisation set star file.

  • image_ctf_premultiplied – optional override for whether CTF premultiplication was applied during particle extraction. Only applied when loading a TomoParticlesStarfile. If None (default), the value is read from the star file. If True or False, this overrides the value inferred from the star file.

  • image_dose_weighted – optional override for whether dose weighting was applied during particle extraction. Only applied when loading a TomoParticlesStarfile. If None (default), the standard default for the detected software is used. If True or False, this overrides that default.

Returns:

The created starfile object (either TiltSeriesStarfile or TomoParticlesStarfile)