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.
-
property
frequency¶ Return an Numpy array for the frequency abscissa
-
property
-
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:
nodesDictionary for node voltages indexed by node names
branchesDictionary for branch currents indexed by source names
elementsDictionary for elements …
-
property
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: ...
-
property
sweep¶ Return an Numpy array for the sweep abscissa
-
property
-
class
PySpice.Probe.WaveForm.DistortionAnalysis(simulation, frequency, nodes, branches, internal_parameters)[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements Distortion analysis.
-
property
frequency¶ Return an Numpy array for the frequency abscissa
-
property
-
class
PySpice.Probe.WaveForm.NoiseAnalysis(simulation, nodes, branches, internal_parameters)[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements Noise analysis.
-
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.PoleZeroAnalysis(simulation, nodes, branches, internal_parameters)[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements a Pole-Zero 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.TransferFunctionAnalysis(simulation, nodes, branches, internal_parameters)[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements Transfer Function (TF) analysis.
-
class
PySpice.Probe.WaveForm.TransientAnalysis(simulation, time, nodes, branches, internal_parameters)[source]¶ Bases:
PySpice.Probe.WaveForm.AnalysisThis class implements a transient analysis.
-
property
time¶ Return an Numpy array for the time abscissa
-
property
-
class
PySpice.Probe.WaveForm.WaveForm[source]¶ Bases:
PySpice.Unit.Unit.UnitValuesThis class implements waveform on top of a Numpy Array.
Public Attributes:
nameunittitleabscissaNumpy array of the analysis abscissa