slitflow.img.plot module

class Gauss2D(info_path=None)[source]

Bases: Image

Plot Gaussian spots according to X,Y-coordinate.

Caution

Trajectory data should be converted to localization data.

Parameters:
  • reqs[0] (Table) – Localization data including X,Y-coordinate columns. Required param; length_unit.

  • param["pitch"] (float) – Length per pixel of reconstructed image.

  • param["sd"] (float) – Standard deviation of Gaussian spots.

  • param["img_size] (list of int) – Image size as [width, height] pixels.

  • param["window_factor"] (float) – S.D. of Gaussian spots is multiplied by this factor for the half pixel width of rendering clip of Gaussian spots. If you set a too small value, Gaussian spots will be truncated square-shaped spots.

  • param["group_depth"] (int) – Plots grouping depth. The grouped coordinates by this depth will be plotted into the same frame.

  • param["split_depth"] (int) – File split depth number.

Returns:

Image class of reconstructed float32 tiff file

Return type:

Image

set_info(param={})[source]

Copy info from reqs[0] and modify columns and add params.

static process(reqs, param)[source]

Plot Gaussian spots according to X,Y-coordinate.

Parameters:
  • reqs[0] (pandas.DataFrame) – Localization data including X,Y-coordinate columns.

  • param["calc_cols"] (list of str) – X,Y-coordinate columns.

  • param["pitch"] (float) – Length per pixel of reconstructed image.

  • param["sd"] (float) – Standard deviation of Gaussian spots.

  • param["img_size] (list of int) – Image size as [width, height] pixels.

  • param["window_factor"] (float) – S.D. of Gaussian spots is multiplied by this factor for the half pixel width of rendering clip of Gaussian spots. If you set a too small value, Gaussian spots will be truncated square-shaped spots.

  • param["index_cols"] (list of str) – Column names of index.

Returns:

Reconstructed image stack

Return type:

numpy.ndarray

gauss2d(x, y, xc, yc, s)[source]

Equation for plotting 2D Gaussian image.

Parameters:
  • x (float) – X-coordinate of grid position.

  • y (float) – Y-coordinate of grid position.

  • xc (float) – X center of Gaussian distribution.

  • yc (float) – Y center of Gaussian distribution.

  • s (float) – Standard deviation of Gaussian distribution.

Returns:

Gaussian value of (x, y)

Return type:

float