tomodrgn.commands.analyze.analyze_z_multidimensional#

analyze_z_multidimensional(z: ndarray, outdir: str, plot_format: Literal['png', 'svgz'], vg: VolumeGenerator, starfile_path: str, source_software: str, datadir: str | None = None, skip_vol: bool = False, skip_umap: bool = False, num_pcs: int = 2, pc_ondata: int = False, num_ksamples: int = 20, downsample: int | None = None, lowpass: float | None = None, flip: bool = False, invert: bool = False) None[source]#

Plotting and volume generation for multidimensional z

Parameters:
  • z – array of 1-D latent embeddings, shape (nptcls, zdim)

  • outdir – directory in which to save all outputs (plots and generated volumes)

  • plot_format – file format with which to save plots

  • vg – VolumeGenerator instance to aid volume generation at specficied z values

  • starfile_path – path to star file used during model training through which to load images

  • 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.

  • datadir – path to particle images on disk, used when plotting images per kmeans class

  • skip_vol – whether to skip generation of volumes

  • skip_umap – whether to skip latent embeddings UMAP dimensionality reduction

  • num_pcs – number of principal components along which to generate volumes. If 0, then no PCA is performed

  • pc_ondata – whether to use the closest on-data latent point to each PCA axis trajectory for plotting and volume generation

  • num_ksamples – number of latent clusters to form by k-means clustering for plotting and volume generation

  • downsample – downsample reconstructed volumes to this box size (units: px) by Fourier cropping, None means to skip downsampling

  • lowpass – lowpass filter reconstructed volumes to this resolution (units: Å), None means to skip lowpass filtering

  • flip – flip the chirality of the reconstructed volumes by inverting along the z axis

  • invert – invert the data sign of the reconstructed volumes (light-on-dark vs dark-on-light)

Returns:

None