src.paste.stack_slices_center

stack_slices_center(center_slice, slices, pis, output_params=False)[source]

Align spatial coordinates of a list of slices to a center_slice.

In other words, align:

slices[0] –> center_slice

slices[1] –> center_slice

slices[2] –> center_slice

Parameters
  • center_slice (AnnData) – Inferred center slice.

  • slices (List[AnnData]) – List of original slices to be aligned.

  • pis (List[ndarray]) – List of pi (center_align() output) between center_slice and slices.

  • output_params (bool) – If True, additionally return angles of rotation (theta) and translations for each slice.

Return type

Tuple[AnnData, List[AnnData], Optional[List[float]], Optional[List[ndarray]]]

Returns

  • Center slice with aligned spatial coordinates.

  • List of other slices with aligned spatial coordinates.

If output_params = True, additionally return:

  • List of angles of rotation (theta) for each slice.

  • List of translations [x_translation, y_translation] for each slice.