acryo.tilt package

Submodules

acryo.tilt.core module

acryo.tilt.core.dual_axis(tilt_range_y: tuple[float, float], tilt_range_x: tuple[float, float]) acryo.tilt._base.UnionAxes[source]

Create a dual-axis missing wedge model.

Parameters
  • tilt_range_y ((float, float)) – Minimum and maximum tilt angles of the y-axis tilt series in degrees.

  • tilt_range_x ((float, float)) – Minimum and maximum tilt angles of the x-axis tilt series in degrees.

acryo.tilt.core.no_wedge() acryo.tilt._base.NoWedge[source]

Create a no-wedge missing wedge model.

acryo.tilt.core.single_axis(tilt_range: tuple[float, float], axis: Literal['x', 'y'] = 'y') acryo.tilt._single.SingleAxis[source]
acryo.tilt.core.single_axis(tilt_range: None, axis: Literal['x', 'y'] = 'y') acryo.tilt._base.NoWedge

Create a single-axis missing wedge model.

Parameters
  • tilt_range ((float, float)) – Minimum and maximum tilt angles in degrees.

  • axis (str, default is "y") – The rotation axis of tomography.

Module contents

class acryo.tilt.NoWedge[source]

Bases: acryo.tilt._base.TiltSeriesModel

create_mask(rotator: scipy.spatial.transform._rotation.Rotation = <scipy.spatial.transform._rotation.Rotation object>, shape: tuple[int, int, int] = (49, 49, 49)) numpy.ndarray[Any, numpy.dtype[numpy.float32]][source]

Create an array filled with 1.0.

Parameters
  • rotator (Rotation) – Does not affect the result.

  • shape (tuple of int) – The shape of the mask.

Returns

Missing wedge mask.

Return type

np.ndarray

class acryo.tilt.SingleAxis(tilt_range: tuple[float, float] = (- 60.0, 60.0))[source]

Bases: acryo.tilt._base.TiltSeriesModel

create_mask(rotator: scipy.spatial.transform._rotation.Rotation = <scipy.spatial.transform._rotation.Rotation object>, shape: tuple[int, int, int] = (49, 49, 49)) numpy.ndarray[Any, numpy.dtype[numpy.float32]][source]

Create a binary mask that covers tomographical missing wedge.

Note that the mask is not shifted to the center of the Fourier domain. np.fft.fftn(img) * mask will be the correct way to apply the mask.

Parameters
  • rotator (Rotation) – The rotation object that describes the direction of the mask.

  • shape (tuple of int) – The shape of the mask.

Returns

Missing wedge mask.

Return type

np.ndarray

property tilt_range: tuple[float, float]

Range of tilt angles in degrees.

class acryo.tilt.TiltSeriesModel[source]

Bases: abc.ABC

apply_mask(rotator: scipy.spatial.transform._rotation.Rotation, img: numpy.ndarray[Any, numpy.dtype[numpy.float32]]) numpy.ndarray[Any, numpy.dtype[numpy.float32]][source]

Apply the missing wedge mask.

abstract create_mask(rotator: scipy.spatial.transform._rotation.Rotation, shape: tuple[int, int, int]) numpy.ndarray[Any, numpy.dtype[numpy.float32]][source]

Create a missing wedge mask.

class acryo.tilt.UnionAxes(wedges: Iterable[acryo.tilt._base.TiltSeriesModel])[source]

Bases: acryo.tilt._base.TiltSeriesModel

create_mask(rotator: scipy.spatial.transform._rotation.Rotation = <scipy.spatial.transform._rotation.Rotation object>, shape: tuple[int, int, int] = (49, 49, 49)) numpy.ndarray[Any, numpy.dtype[numpy.float32]][source]

Create a binary mask that covers tomographical missing wedge.

Note that the mask is not shifted to the center of the Fourier domain. np.fft.fftn(img) * mask will be the correct way to apply the mask.

Parameters
  • rotator (Rotation) – The rotation object that describes the direction of the mask.

  • shape (tuple of int) – The shape of the mask.

Returns

Missing wedge mask.

Return type

np.ndarray

acryo.tilt.dual_axis(tilt_range_y: tuple[float, float], tilt_range_x: tuple[float, float]) acryo.tilt._base.UnionAxes[source]

Create a dual-axis missing wedge model.

Parameters
  • tilt_range_y ((float, float)) – Minimum and maximum tilt angles of the y-axis tilt series in degrees.

  • tilt_range_x ((float, float)) – Minimum and maximum tilt angles of the x-axis tilt series in degrees.

acryo.tilt.no_wedge() acryo.tilt._base.NoWedge[source]

Create a no-wedge missing wedge model.

acryo.tilt.single_axis(tilt_range: tuple[float, float] | None = None, axis: Literal['x', 'y'] = 'y') acryo.tilt._single.SingleAxis | acryo.tilt._base.NoWedge[source]

Create a single-axis missing wedge model.

Parameters
  • tilt_range ((float, float)) – Minimum and maximum tilt angles in degrees.

  • axis (str, default is "y") – The rotation axis of tomography.