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]) 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() NoWedge[source]

Create a no-wedge missing wedge model.

acryo.tilt.core.single_axis(tilt_range: tuple[float, float], axis: Literal['x', 'y'] = 'y') SingleAxis[source]
acryo.tilt.core.single_axis(tilt_range: None, axis: Literal['x', 'y'] = 'y') 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: TiltSeriesModel

create_mask(rotator: ~scipy.spatial.transform._rotation.Rotation = <scipy.spatial.transform._rotation.Rotation object>, shape: tuple[int, int, int] = (49, 49, 49)) ndarray[tuple[int, ...], dtype[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: TiltSeriesModel

create_mask(rotator: ~scipy.spatial.transform._rotation.Rotation = <scipy.spatial.transform._rotation.Rotation object>, shape: tuple[int, int, int] = (49, 49, 49)) ndarray[tuple[int, ...], dtype[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

apply_mask(rotator: Rotation, img: ndarray[tuple[int, ...], dtype[float32]]) ndarray[tuple[int, ...], dtype[float32]][source]

Apply the missing wedge mask.

abstract create_mask(rotator: Rotation, shape: tuple[int, int, int]) ndarray[tuple[int, ...], dtype[float32]][source]

Create a missing wedge mask.

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

Bases: TiltSeriesModel

create_mask(rotator: ~scipy.spatial.transform._rotation.Rotation = <scipy.spatial.transform._rotation.Rotation object>, shape: tuple[int, int, int] = (49, 49, 49)) ndarray[tuple[int, ...], dtype[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]) 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() 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') SingleAxis | 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.