show

Plotting Utilities for GONet File Visualization.

This module provides functions to visualize GONet image files, optionally saving figures and selecting specific RGB channels to display. The main function show() is meant to be used as a command-line tool.

Functions

  • create_efficient_subplots() : Create optimized subplot grids for multiple channels.

  • save_figure() : Save matplotlib figures to disk with auto-incremented filenames.

  • auto_vmin_vmax() : Automatically scale image intensity using robust percentiles.

  • show() : Main interface to plot GONet files and optionally save the output.

Functions:

GONet_Wizard.commands.show.create_efficient_subplots(N, figsize=(10, 6))[source]

Create a compact grid of subplots for displaying multiple images.

Automatically chooses the number of rows and columns based on the number of plots required. Removes any unused axes to avoid blank spaces.

Parameters:
  • N (int) – The number of subplots needed.

  • figsize (tuple, optional) – Size of the entire figure in inches (width, height).

Returns:

A tuple of (fig, axes) where: - fig is the matplotlib Figure - axes is a list of Axes objects (length N)

Return type:

tuple

GONet_Wizard.commands.show.save_figure(fig, save_path)[source]

Save a matplotlib figure to a PDF file, avoiding overwrites.

If a file with the same name already exists, appends a counter to the filename.

Parameters:
Return type:

None

GONet_Wizard.commands.show.auto_vmin_vmax(data, lower_percentile=0.5, upper_percentile=99.5)[source]

Compute intensity bounds for image display using percentiles.

Parameters:
  • data (numpy.ndarray) – The image data array.

  • lower_percentile (float, optional) – The lower percentile for clipping (default is 0.5).

  • upper_percentile (float, optional) – The upper percentile for clipping (default is 99.5).

Returns:

A tuple (vmin, vmax) suitable for image display scaling.

Return type:

tuple

GONet_Wizard.commands.show.show_gonet_files(files, save=False, red=False, green=False, blue=False)[source]

Display one or more GONet image files with optional channel filtering and saving.

This function loads and visualizes GONet files using matplotlib. By default, all RGB channels are displayed unless specific channels are enabled via flags. Images are arranged in a compact grid. If save is specified, the resulting figure is saved to a PDF file with automatic filename disambiguation.

Parameters:
  • files (str or list of str) – A single file path or a list of paths to GONet files to display.

  • save (bool, optional) – If provided, saves the resulting figure to a .pdf file (default is False). The filename or path can be passed as the value of save.

  • red (bool, optional) – Whether to include the red channel for visualization.

  • green (bool, optional) – Whether to include the green channel for visualization.

  • blue (bool, optional) – Whether to include the blue channel for visualization.

Return type:

None

Notes

  • If none of the color channel flags (red, green, blue) are set, all channels will be shown.

  • Subplot titles include camera model and timestamp when available in metadata.

  • Output intensity is automatically scaled using robust percentiles (0.5–99.5%).

  • The saved figure will be named according to save with automatic suffixes to avoid overwrites.