etspy.align.calculate_shifts_conservation_of_mass(stack: TomoStack, xrange: tuple[int, int] | None = None, p: int = 20) ndarray[source]

Calculate shifts parallel to the tilt axis using conservation of mass.

Slices which have the highest ratio of total mass to mass variance and their location are returned.

Parameters:
stack: TomoStack

Tilt series to be aligned.

xrange: tuple[int, int] | None = None

The range for performing alignment

p: int = 20

Padding element

Returns:

xshifts – Calculated shifts parallel to tilt axis.

Return type:

ndarray