Configuring an image¤
The AbstractImageConfig 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.AbstractImageConfig
cryojax.simulator.AbstractImageConfig
¤
Configuration and utilities for an electron microscopy image.
__abstractclassvars__
class
¤
__abstractclassvars__
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object
Build an immutable unordered collection of unique elements.
__abstractmethods__
class
¤
__abstractmethods__
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object
Build an immutable unordered collection of unique elements.
__abstractvars__
class
¤
__abstractvars__
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object
Build an immutable unordered collection of unique elements.
__annotations__
class
¤
__annotations__
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
__dataclass_fields__
class
¤
__dataclass_fields__
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
__doc__
class
¤
__doc__
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__match_args__
class
¤
__match_args__
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items.
If the argument is a tuple, the return value is the same object.
__module__
class
¤
__module__
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
coordinate_grid_in_angstroms
cached
property
¤
coordinate_grid_in_angstroms: Float[Array, '{self.y_dim} {self.x_dim} 2']
Convenience property for pixel_size * coordinate_grid_in_pixels
coordinate_grid_in_pixels
cached
property
¤
coordinate_grid_in_pixels: Float[Array, '{self.y_dim} {self.x_dim} 2']
A spatial coordinate system for the shape.
frequency_grid_in_angstroms
cached
property
¤
frequency_grid_in_angstroms: Float[Array, '{self.y_dim} {self.x_dim//2+1} 2']
Convenience property for frequency_grid_in_pixels / pixel_size
frequency_grid_in_pixels
cached
property
¤
frequency_grid_in_pixels: Float[Array, '{self.y_dim} {self.x_dim//2+1} 2']
A spatial frequency coordinate system for the shape,
with hermitian symmetry.
full_frequency_grid_in_angstroms
cached
property
¤
full_frequency_grid_in_angstroms: Float[Array, '{self.y_dim} {self.x_dim} 2']
Convenience property for full_frequency_grid_in_pixels / pixel_size
full_frequency_grid_in_pixels
cached
property
¤
full_frequency_grid_in_pixels: Float[Array, '{self.y_dim} {self.x_dim} 2']
A spatial frequency coordinate system for the shape,
without hermitian symmetry.
interaction_constant
property
¤
interaction_constant
The electron interaction constant at the given voltage_in_kilovolts.
padded_coordinate_grid_in_angstroms
cached
property
¤
padded_coordinate_grid_in_angstroms: Float[Array, '{self.padded_y_dim} {self.padded_x_dim} 2']
Convenience property for pixel_size * padded_coordinate_grid_in_pixels
padded_coordinate_grid_in_pixels
cached
property
¤
padded_coordinate_grid_in_pixels: Float[Array, '{self.padded_y_dim} {self.padded_x_dim} 2']
A spatial coordinate system for the padded_shape.
padded_frequency_grid_in_angstroms
cached
property
¤
padded_frequency_grid_in_angstroms: Float[Array, '{self.padded_y_dim} {self.padded_x_dim//2+1} 2']
Convenience property for padded_frequency_grid_in_pixels / pixel_size
padded_frequency_grid_in_pixels
cached
property
¤
padded_frequency_grid_in_pixels: Float[Array, '{self.padded_y_dim} {self.padded_x_dim//2+1} 2']
A spatial frequency coordinate system for the padded_shape,
with hermitian symmetry.
padded_full_frequency_grid_in_angstroms
cached
property
¤
padded_full_frequency_grid_in_angstroms: Float[Array, '{self.padded_y_dim} {self.padded_x_dim} 2']
Convenience property for padded_full_frequency_grid_in_pixels / pixel_size
padded_full_frequency_grid_in_pixels
cached
property
¤
padded_full_frequency_grid_in_pixels: Float[Array, '{self.padded_y_dim} {self.padded_x_dim} 2']
A spatial frequency coordinate system for the padded_shape,
without hermitian symmetry.
wavelength_in_angstroms
property
¤
wavelength_in_angstroms
The incident electron wavelength corresponding to the beam
energy voltage_in_kilovolts.
cryojax.simulator.BasicImageConfig(cryojax.simulator.AbstractImageConfig)
¤
Configuration and utilities for a basic electron microscopy image.
__init__
¤
__init__(shape: tuple[int, int], pixel_size: cryojax.jax_util.FloatLike, voltage_in_kilovolts: cryojax.jax_util.FloatLike, *, grid_helper: cryojax.simulator.GridHelper | None = None, pad_options: dict[str, Any] = {})
Arguments:
shape: Shape of the imaging plane in pixels.pixel_size: The pixel size of the image in angstroms.voltage_in_kilovolts: The incident energy of the electron beam.grid_helper: TheGridHelperobject, which stores the coordinate grids for image shapeshape. If not passed, grid are computed at run-time.pad_options: Options that control image padding.shape: The shape of the image after padding. By default, equal toshape.grid_helper: TheGridHelperobject, which stores coordinate grids for the padded shape. If not passed, grid are computed at run-time. By default, equal toNone.
cryojax.simulator.DoseImageConfig(cryojax.simulator.AbstractImageConfig)
¤
Configuration and utilities for an electron microscopy image, including the electron dose.
__init__
¤
__init__(shape: tuple[int, int], pixel_size: cryojax.jax_util.FloatLike, voltage_in_kilovolts: cryojax.jax_util.FloatLike, electron_dose: cryojax.jax_util.FloatLike, *, grid_helper: cryojax.simulator.GridHelper | None = None, pad_options: dict[str, Any] = {})
Arguments:
shape: Shape of the imaging plane in pixels.pixel_size: The pixel size of the image in angstroms.voltage_in_kilovolts: The incident energy of the electron beam.electron_dose: The integrated dose rate of the electron beam in \(e^-/A^2\)grid_helper: TheGridHelperobject, which stores the coordinate grids for image shapeshape. If not passed, grid are computed at run-time.pad_options: Options that control image padding.shape: The shape of the image after padding. By default, equal toshape.grid_helper: TheGridHelperobject, which stores coordinate grids for the padded shape. If not passed, grid are computed at run-time. By default, equal toNone.