11.1.8.2. WaveForm¶
This module implements classes to handle analysis output.
-
class
PySpice.Probe.WaveForm.AcAnalysis(simulation, frequency, nodes, branches, internal_parameters)[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements an AC analysis.
-
frequency¶ Return an Numpy array for the frequency abscissa
-
-
class
PySpice.Probe.WaveForm.Analysis(simulation, nodes=(), branches=(), elements=(), internal_parameters=())[source]¶ Bases:
objectBase class for the simulation output.
Depending of the simulation type, the simulator will return waveforms as a function of
- time
- frequency
- sweep
- …
and corresponding to
- a node’s voltage
- a source’s current
- …
The name of a waveform is
- node’s voltage: node’s name
- source’s current: source’name
- …
If the waveform name is a valid Python identifier, then you can get the corresponding waveform using:
analysis.waveforme_name
else you have to use this fallback:
analysis['waveforme_name']
Examples of usages:
# Operating point analysis for node in analysis.nodes.values(): print('Node {}: {:5.2f} V'.format(str(node), float(node))) for node in analysis.branches.values(): print('Node {}: {:5.2f} A'.format(str(node), float(node))) # DC sensitivity analysis for element in analysis.elements.values(): print(element, float(element)) # Plot the voltage of the "out" node plt.plot(analysis.out.abscissa, analysis.out)
Public Attributes:
-
branches¶
-
elements¶
-
internal_parameters¶
-
nodes¶
-
simulation¶ Return the simulation instance
-
class
PySpice.Probe.WaveForm.DcAnalysis(simulation, sweep, nodes, branches, internal_parameters)[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements a DC analysis.
When the DC analysis is performed with multiple sources, sweep is the last source.
The loop scheme is:
for v1 in vsource1: for v2 in vsource2: ...
-
sweep¶ Return an Numpy array for the sweep abscissa
-
-
class
PySpice.Probe.WaveForm.OperatingPoint(simulation, nodes=(), branches=(), elements=(), internal_parameters=())[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements an operating point analysis.
-
class
PySpice.Probe.WaveForm.SensitivityAnalysis(simulation, elements, internal_parameters)[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements an sensitivity analysis.
-
class
PySpice.Probe.WaveForm.TransientAnalysis(simulation, time, nodes, branches, internal_parameters)[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements a transient analysis.
-
time¶ Return an Numpy array for the time abscissa
-