QspiceLogReader¶
- class spicelib.log.qspice_log_reader.QspiceLogReader(log_filename, read_measures=True, step_set=None, encoding=None)[source]¶
Bases:
LogfileDataReads an QSpice log file and retrieves the step and measurement information if it exists. The step information is then accessible by using the ‘stepset’ property of this class. This class is intended to be used together with the RawRead to retrieve the runs that are associated with a given parameter setting.
This class constructor only reads the step information of the log file. If the measures are needed, then the user should call the get_measures() method.
- Property stepset:
dictionary in which the keys are the variables that were STEP’ed during the simulation and the associated value is a list representing the sequence of assigned values during simulation.
- Property headers:
list containing the headers on the exported data. This is only populated when the read_measures optional parameter is set to False.
- Property dataset:
dictionary in which the keys are the the headers and the export file and the values are lists. This is information is only populated when the read_measures optional parameter is set to False.
- Parameters:
log_filename (str) – path to the Export file.
read_measures (boolean) – Optional parameter to skip measuring data reading.
step_set (dict) – Optional parameter to provide the steps from another file. This is used to process .mout files.
- obtain_measures(meas_filename=None)[source]¶
In QSpice the measures are obtained by calling the QPOST command giving as arguments the .qraw file and the .log file This function makes this call to QPOST and returns the measurement output file path.
Note the call to QPOST includes the path to the circuit netlist. This is assumed to be the name of the logfile, but with the ‘.net’ or ‘.cir’ extension.
- Parameters:
meas_filename (Path | None) – This optional parameter specifies the measurement file name. If not given, it will assume the name of the log file but with the extension ‘.meas’.
- Returns:
The .meas file path
- Return type:
Path