SpatioTemporalProblem.align(reference=None, mode='warp', spatial_key=None, key_added=None)

Align the spatial data.

  • reference (Optional[TypeVar(K, bound= Hashable)]) – Reference key. If a star policy was used, its reference will always be used.

  • mode (Literal['warp', 'affine']) –

    Alignment mode. Valid options are:

    • 'warp' - warp the data to the reference.

    • 'affine' - align the data to the reference using affine transformation.

  • spatial_key (Optional[str]) – Key in obsm where the spatial coordinates are stored. If None, use spatial_key.

  • key_added (Optional[str]) – Key in obsm and uns where to store the alignment.

  • self (SpatialAlignmentMixinProtocol[K, B])

Return type:

Optional[Tuple[ndarray[Any, dtype[float64]], Optional[Dict[TypeVar(K, bound= Hashable), Optional[ndarray[Any, dtype[float64]]]]]]]


: Depending on the key_added: