Skip to content

Configuring an image¤

The AbstractConfig is an object at the core of simulating images in cryojax. It stores a configuration for the simulated image and the electron microscope, such as the shape of the desired image and the wavelength of the incident electron beam.

cryojax.simulator.AbstractConfig ¤

Configuration and utilities for an electron microscopy image.

cryojax.simulator.AbstractConfig.wavelength_in_angstroms: Float[Array, ''] property ¤

The incident electron wavelength corresponding to the beam energy voltage_in_kilovolts.

cryojax.simulator.AbstractConfig.wavenumber_in_inverse_angstroms: Float[Array, ''] property ¤

The incident electron wavenumber corresponding to the beam energy voltage_in_kilovolts.

cryojax.simulator.AbstractConfig.n_pixels: int property ¤

Convenience property for math.prod(shape)

cryojax.simulator.AbstractConfig.y_dim: int property ¤

Convenience property for shape[0]

cryojax.simulator.AbstractConfig.x_dim: int property ¤

Convenience property for shape[1]

cryojax.simulator.AbstractConfig.coordinate_grid_in_pixels: Float[Array, '{self.y_dim} {self.x_dim} 2'] cached property ¤

A spatial coordinate system for the shape.

cryojax.simulator.AbstractConfig.coordinate_grid_in_angstroms: Float[Array, '{self.y_dim} {self.x_dim} 2'] cached property ¤

Convenience property for pixel_size * coordinate_grid_in_pixels

cryojax.simulator.AbstractConfig.frequency_grid_in_pixels: Float[Array, '{self.y_dim} {self.x_dim//2+1} 2'] cached property ¤

A spatial frequency coordinate system for the shape, with hermitian symmetry.

cryojax.simulator.AbstractConfig.frequency_grid_in_angstroms: Float[Array, '{self.y_dim} {self.x_dim//2+1} 2'] cached property ¤

Convenience property for frequency_grid_in_pixels / pixel_size

cryojax.simulator.AbstractConfig.full_frequency_grid_in_pixels: Float[Array, '{self.y_dim} {self.x_dim} 2'] cached property ¤

A spatial frequency coordinate system for the shape, without hermitian symmetry.

cryojax.simulator.AbstractConfig.full_frequency_grid_in_angstroms: Float[Array, '{self.y_dim} {self.x_dim} 2'] cached property ¤

Convenience property for full_frequency_grid_in_pixels / pixel_size

cryojax.simulator.AbstractConfig.padded_n_pixels: int property ¤

Convenience property for math.prod(padded_shape)

cryojax.simulator.AbstractConfig.padded_y_dim: int property ¤

Convenience property for padded_shape[0]

cryojax.simulator.AbstractConfig.padded_x_dim: int property ¤

Convenience property for padded_shape[1]

cryojax.simulator.AbstractConfig.padded_coordinate_grid_in_pixels: Float[Array, '{self.padded_y_dim} {self.padded_x_dim} 2'] cached property ¤

A spatial coordinate system for the padded_shape.

cryojax.simulator.AbstractConfig.padded_coordinate_grid_in_angstroms: Float[Array, '{self.padded_y_dim} {self.padded_x_dim} 2'] cached property ¤

Convenience property for pixel_size * padded_coordinate_grid_in_pixels

cryojax.simulator.AbstractConfig.padded_frequency_grid_in_pixels: Float[Array, '{self.padded_y_dim} {self.padded_x_dim//2+1} 2'] cached property ¤

A spatial frequency coordinate system for the padded_shape, with hermitian symmetry.

cryojax.simulator.AbstractConfig.padded_frequency_grid_in_angstroms: Float[Array, '{self.padded_y_dim} {self.padded_x_dim//2+1} 2'] cached property ¤

Convenience property for padded_frequency_grid_in_pixels / pixel_size

cryojax.simulator.AbstractConfig.padded_full_frequency_grid_in_pixels: Float[Array, '{self.padded_y_dim} {self.padded_x_dim} 2'] cached property ¤

A spatial frequency coordinate system for the padded_shape, without hermitian symmetry.

cryojax.simulator.AbstractConfig.padded_full_frequency_grid_in_angstroms: Float[Array, '{self.padded_y_dim} {self.padded_x_dim} 2'] cached property ¤

Convenience property for padded_full_frequency_grid_in_pixels / pixel_size

cryojax.simulator.AbstractConfig.crop_to_shape(image: Inexact[Array, 'y_dim x_dim']) -> Inexact[Array, '{self.y_dim} {self.x_dim}'] ¤

Crop an image to shape.

cryojax.simulator.AbstractConfig.pad_to_padded_shape(image: Inexact[Array, 'y_dim x_dim'], **kwargs: Any) -> Inexact[Array, '{self.padded_y_dim} {self.padded_x_dim}'] ¤

Pad an image to padded_shape.

cryojax.simulator.AbstractConfig.crop_or_pad_to_padded_shape(image: Inexact[Array, 'y_dim x_dim'], **kwargs: Any) -> Inexact[Array, '{self.padded_y_dim} {self.padded_x_dim}'] ¤

Reshape an image to padded_shape using cropping or padding.