Skip to content

recovar.simulation

Synthetic dataset generation and forward-model image simulation for testing and validation.

simulator

Forward-model cryo-EM image simulation from atomic volumes.

recovar.simulation.simulator

Forward-model cryo-EM image simulation from atomic volumes.

kent_sampling_scheme(n_images, grid_size, seed=0, arguments=None)

Generate Kent (5-parameter Fisher-Bingham - FB5) distributed data on the unit sphere

:param numsamp: Number of samples to generate :type numsamp: int :param kappa: Concentration parameter :param beta: Ovalness parameter :param mu: Mean vector of Kent distribution :type mu: np.array :param mu0: Mean vector of the Fisher part :type mu0: np.array :return: Data dictionary of type 'cart' containing numsamp Kent distributed data :rtype: dict

cryo_rotation_batch(U, theta)

Build rotation matrices from viewing directions U and in-plane angles theta.

Inputs

U: array-like, shape (N,3) or (3,) Viewing/propagation directions (needn't be unit; will be normalized). theta: float or array-like In-plane rotation(s) in radians. Can be scalar or shape (N,).

Returns

R: ndarray, shape (N,3,3) or (3,3) if input was a single vector Rotation matrices whose columns are [a, b, u], where u is the normalized viewing direction and (a,b) is an orthonormal basis of the plane ⟂ u, rotated by theta (right-hand rule about +u).

simulate_batch(config, volume, rotation_matrices, translations, ctf_params, skip_ctf=False)

Simulate a batch of images from a volume — Equinox API.

Simulate a batch of cryo-EM images from a volume using the Equinox API.

synthetic_dataset

Synthetic heterogeneous dataset generation.

recovar.simulation.synthetic_dataset

Synthetic heterogeneous dataset generation for testing.

simulate_scattering_potential

Compute atomic scattering potentials from PDB structures.

recovar.simulation.simulate_scattering_potential

Created on Thu Sep 30 16:04:24 2021

@author: marcaurele

voltage_to_wavelength(voltage)

Convert from electron voltage to wavelength. :param voltage: float, The electron voltage in kV. :return: float, The electron wavelength in nm.