fishtank.scripts.align_experiments

fishtank.scripts.align_experiments#

fishtank.scripts.align_experiments(ref, moving, ref_series, moving_series, output='alignment.json', color=405, z_offset=-3, file_pattern='{series}/Conv_zscan_{fov}.dax', downsample=4, filter_sigma=5, attachment=15, tile_size=100, rotation=None, ref_mosaic=None, moving_mosaic=None, scale_factor=None, **kwargs)#

Align experiments using optical flow.

fishtank align-experiments -r ref -m moving –ref_series H0M1 –moving_series H0R1 -o alignment.json

Parameters:
  • ref (str | Path) – Reference image directory.

  • moving (str | Path) – Moving image directory.

  • ref_series (str) – Reference series to use for alignment.

  • moving_series (str) – Moving series to use for alignment.

  • output (str | Path (default: 'alignment.json')) – Output file path.

  • color (int (default: 405)) – Color channel to use for alignment.

  • z_offset (int (default: -3)) – Z offset for alignment.

  • file_pattern (str (default: '{series}/Conv_zscan_{fov}.dax')) – Naming pattern for image files.

  • downsample (int (default: 4)) – Image downsample factor.

  • filter_sigma (float (default: 5)) – Sigma for unsharp mask filter.

  • attachment (float (default: 15)) – Attachment factor for optical flow.

  • tile_size (int (default: 100)) – Size of shift tiles in pixels.

  • rotation (Optional[float] (default: None)) – Rotation matrix (.npy) or angle (float) of moving images.

  • ref_mosaic (Union[str, Path, None] (default: None)) – Path to precomputed reference mosaic TIFF. If provided, ref, ref_series, file_pattern and z_offset will be ignored.

  • moving_mosaic (Union[str, Path, None] (default: None)) – Path to precomputed moving mosaic TIFF. If provided, moving, moving_series, file_pattern and z_offset will be ignored.

  • scale_factor (Optional[float] (default: None)) – Scale factor in micron per pixel