Report Functions

pycube.reports.plotter.par_plot_powerpoint(plot_param_list, h5_list=[])

Plot single plots as defined in the list of PlotParameter instances as png files and optionally insert them into a PowerPoint.

Cube Parameters:
  • task_source (str): name of the source task, with h5 file with the signals to plot in the subfolder ‘results’

  • task_target (str, optional): name of the target task, defaults to current task

  • powerpoint (bool, optional): toggle PowerPoint creation, defaults to False

if powerpoint is True:
  • powerpoint_filename (str, optional): name of the resulting PowerPoint file. ‘.pptx’ will be added automatically. If not given, one individual PowerPoint per h5 input file will be created.

  • slide_layout (str): PowerPoint slide layout name

  • slide_shape (str): name of the shape in the layout defining the plot insertion area

  • slide_grid (list[int]): grid to place plots [rows: int, cols: int]

  • delete_png (bool, optional): delete png files after insertion to the PowerPoint, defaults to False (always False if no PowerPoint is created)

  • powerpoint_title (str, optional): title of the PowerPoint

  • slide_title (str, optional): PowerPoint slide title text

  • experiment_name (str, optional): experiment name will be added to the subtitle

Parameters:
  • plot_param_list (List[PlotParameter]) – list of PlotParameter for single plots

  • h5_list (List[str]) – list of h5 files to be plotted. Defaults to empty: All h5 files found in the source folder are plotted

pycube.reports.spectrogram_plot.par_spectrogram(h5_list=[])

Generate spectrogram plots.

Cube Parameters:
  • task_source (str): name of the source task, with h5 file with the signals to plot in the subfolder ‘results’

  • task_target (str, optional): name of the target task, defaults to current task

  • signals (list[str]: names of the signals for spectrogram creation

  • powerpoint (bool): toggle PowerPoint creation

  • powerpoint_filename (str, optional): name of the resulting PowerPoint file. “.pptx” will be added automatically. If not given, one individual PowerPoint per h5 input file will be created.

  • powerpoint_title (str, optional): title of the PowerPoint

  • slide_title (str, optional): PowerPoint slide title text

  • experiment_name (str, optional): experiment name will be added to the subtitle

  • delete_png (bool): delete png files after insertion to the PowerPoint (always False if no PowerPoint is created)

  • fft_length (int): length per time sequence segment, must be a power of 2

  • fft_overlap_percent (int): segment overlap in % (a Hanning window is used by default)

  • logscale (bool): toggle log scale

Scaling values - set both min and max value to 0.0 for autoscale:
  • fmin (float, optional): minimum frequency, defaults to 0.0

  • fmax (float, optional): maximum frequency, defaults to 0.0

  • ymin_time (float, optional): minimum time, defaults to 0.0

  • ymax_time (float, optional): maximum time, defaults to 0.0

  • ymin_spectrum (float, optional): minimum amplitude scale for summed spectrum, defaults to 0.0

  • ymax_spectrum (float, optional): maximum amplitude scale for summed spectrum, defaults to 0.0

  • ymin_cmap (float, optional): minimum amplitude scale for spectrogram, defaults to 0.0

  • ymax_cmap (float, optional): maximum amplitude scale for spectrogram, defaults to 0.0

Parameters:

h5_list (List[str]) – list of h5 files to be plotted. Defaults to empty: All h5 files found in the source folder are plotted

pycube.reports.powerpoint.par_png_powerpoint()

Insert png files found in the results folders of the tasks in task_source_list in a PowerPoint presentation.

Cube Parameters:
  • task_source_list (list[str]): name(s) of the source task(s). png files are collected from all source tasks and inserted into the PowerPoint presentation.

  • task_target (str, optional): name of the target task, defaults to current task.

  • powerpoint_filename (str): name of the resulting PowerPoint file. ‘.pptx’ will be added automatically.

  • slide_layout (str, optional): PowerPoint slide layout name, defaults to ‘content’.

  • slide_shape (str, optional): name of the shape in the layout defining the plot insertion area, defaults to ‘content’.

  • slide_grid (list[int]): grid to place plots [rows: int, cols: int].

  • powerpoint_title (str, optional): title of the PowerPoint.

  • slide_title (str, optional): PowerPoint slide title text.

  • slide_subtitle (str, optional): PowerPoint slide subtitle text.

  • experiment_name (str, optional): experiment name will be added to the subtitle.

  • substring (str, optional): filter pattern for png files, including file extension.

pycube.reports.powerpoint.par_powerpoint_merge()

Collect powerpoints from the results folders of the workflow and merge them into one final PowerPoint.

Cube Parameters:
  • task_source_list (list[str], optional): list of tasks to consider as source. All PowerPoints of the workflow are collected if this parameter is not set.

  • task_target (str, optional): name of the target task, defaults to current task

  • powerpoint_filename (str): name of the resulting PowerPoint file. ‘.pptx’ will be added automatically.

  • results_filter_list (list[str], optional): list of str defining a file filter: PowerPoint files according to the pattern *filterstring*.pptx will be merged into the PowerPoint file powerpoint_filename_filterstring.pptx.

  • delete_source (bool, optional): delete source files after merge, defaults to False.

pycube.reports.powerpoint.par_powerpoint_merge_byfile()

Collect powerpoints from the results folders of the workflow and merge them into final powerpoints, one for each filename found. Results are saved in a pptx file of the same name as the source files.

Cube Parameters:
  • task_source_list (list[str], optional): list of tasks to consider as source. All PowerPoints of the workflow are collected if this parameter is not set.

  • task_target (str, optional): name of the target task, defaults to current task.

  • parallel (bool, optional): execute merge as parallel processes, defaults to False.

  • delete_source (bool, optional): delete source files after merge, defaults to False.