.results - Data structure for saving PyBERT results.

Simulation results data encapsulation, for PyBERT.

Original Author: David Banas <capn.freako@gmail.com>

Original Date: 9 May 2017

This Python script provides a data structure for encapsulating the simulation results data of a PyBERT instance. It was first created, as a way to facilitate easier pickling, so that a particular result could be saved and later restored, as a reference waveform.

Copyright (c) 2017 by David Banas; All rights reserved World wide.

class pybert.results.PyBertData(the_PyBERT, date_created: str, version: str)[source]

Bases: object

PyBERT simulation results data encapsulation class.

This class is used to encapsulate that subset of the results data for a PyBERT instance, which is to be saved when the user clicks the “Save Results” button.

Copy just that subset of the supplied PyBERT instance’s ‘plotdata’ attribute, which should be saved during pickling.

static load_from_file(filepath: str | Path, pybert)[source]

Recall all the results from a file and load them as reference plots.

Confirms that the file actually exists and attempts to load back the graphs as reference plots in pybert.

Parameters:
  • filepath – The full filepath including the extension to save too.

  • pybert – instance of the main app

save(filepath: Path)[source]

Save all of the plot data out to a file.

Parameters:

filepath – The full filepath including the extension to save too.

pybert.results.RESULTS_FILEDIALOG_WILDCARD = '*.pybert_data'

This sets the supported file types in the GUI’s save-as or loading dialog.