merquaco.figures.plot_perfusion_figure

merquaco.figures.plot_perfusion_figure(flow_data: ndarray, title: str = '', out_file: str | Path = None, ylim: bool = True)

Plot (and save) figure of extracted fluidics log file data

Flow rates for each time point in experiment plotted with median flow rate highlighted and dotted low flow rate line plotted at 0.5 flow units (ml/min)

Parameters:
  • flow_data (tuple) – Tuple of arrays: hrs_after_start, flow_rates, median_flow_times, median_flow_rates

  • title (str, optional) – Title for plot. Default is None.

  • out_path (str or Path, optional) – Path to save flow figure. Default is ‘’

  • ylim (bool, optional) – Whether to limit y axis on scale to (0, 2). Default is True.

Notes

Ideal flow rates are between 1.0 and 1.5, and most common concerns are about low flow rates. Especially high (> 2) flow rate data points indicate air bubbles in the fluidics lines causing flow sensor to detect transient but extreme flow rates. Setting ylim to False unrestricts the y axis range to properly visualize these points