dystrack.pipelines.chick_node#

Tracking the chick primitive node (Hensen’s node) during regression.

See also here.

dystrack.pipelines.chick_node.analyze_image(target_path, channel=None, await_write=2, warn_8bit=True, show=False, verbose=False)#

Compute new coordinates for the scope to track the developing chick node during regression based on a 2D or 3D image. Stable node coordinates are inferred by fitting Gaussians to the intensity profiles in z and y, and by fitting a sigmoid function to the intensity profile in x.

Parameters:
  • target_path (path-like) – Path to the image file that is to be analyzed.

  • channel (int, optional, default None) – Index of channel to use for masking in case of multi-channel images. If not specified, a single-channel image is assumed.

  • await_write (int, optional, default 2) – Seconds to wait between each check of the target file size to determine if the file is still being written to. Reducing this will shave off latency but increases the risk of race conditions.

  • warn_8bit (bool, optional, default True) – Whether to emit a warning when a non-8bit image was found and was down- converted to 8bit using min-max rescaling.

  • show (bool, optional, default False) – Whether to show various intermediate results. Default is False. Note that figures will be shown without blocking execution, so if many iterations are performed, many figures will be opened. Also, note that all figures will be closed when the python process exits.

  • verbose (bool, optional, default False) – If True, more information is printed.

Returns:

  • z_pos, y_pos, x_pos (floats) – New coordinates for the next acquisition. For 2D inputs, z_pos is 0.0.

  • img_msg (“_”) – A string output message; required by DySTrack but here unused and just set to “_”.

  • img_cache ({}) – A dictionary to be passed as keyword arguments to future calls to the pipeline; required by DySTrack but here unused and just set to {}.