fishtank.correct.spot_alignment

Contents

fishtank.correct.spot_alignment#

fishtank.correct.spot_alignment(spots, alignment, x='global_x', y='global_y', z=None)#

Adjust spot coordinates based on alignment.

Parameters:
  • spots (DataFrame) – a DataFrame of spot coordinates. Can be 2D or 3D.

  • alignment (GeoDataFrame) – a GeoDataFrame specifying the alignment between spots and polygons.

  • x (str (default: 'global_x')) – the name of the x column in the spots.

  • y (str (default: 'global_y')) – the name of the y column in the spots.

  • z (Optional[str] (default: None)) – the name of the z column in the spots. If None, alignment is done in 2D.

Return type:

DataFrame

Returns:

spots the spots DataFrame with x and y columns shifted based on alignment.