lcapy.oneport.ParSer
- class lcapy.oneport.ParSer
Bases:
OnePortParallel/serial class
Methods
expand()Expand compound components such as crystals or ferrite bead models into
latex()\(\LaTeX\) string representation of the component.
Convert to noise model representation.
pprint()Prints a pretty string representation of the component to the console.
pretty(**kwargs)'Pretty' string representation of the component.
s_model()Converts the model to s-domain.
simplify([deep])Performs simple simplifications.
Attributes
Short circuit current
Open circuit voltage
bool(x) -> bool
- property Isc
Short circuit current
- Return type:
The short circuit current.
- property Voc
Open circuit voltage
- Return type:
The open circuit voltage.
- property has_independent_source
bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
- latex()
\(\LaTeX\) string representation of the component. :returns: A latex string representation of the component. :rtype: str
- noise_model()
Convert to noise model representation.
- Return type:
The noise model representation.
- pprint()
Prints a pretty string representation of the component to the console.
Examples
>>> print(Par(R(3), R(2)).simplify()) R(ConstantDomainExpression(6/5)) >>> Par(R(3), R(2)).simplify().pprint() R(6/5)
- pretty(**kwargs)
‘Pretty’ string representation of the component.
- Returns:
A string representation of the component.
- Return type:
str
Examples
>>> print(Par(R(3), R(2)).simplify()) R(ConstantDomainExpression(6/5)) >>> print(Par(R(3), R(2)).simplify().pretty()) R(6/5)
- s_model()
Converts the model to s-domain.
- Return type:
The s-domain model.
- simplify(deep=True)
Performs simple simplifications.
These simplifications may include parallel resistors, series inductors, etc., rather than collapsing to a Thevenin or Norton network.
- Parameters:
deep – TODO: appears unused
Warning
This does not expand compound components such as crystal or ferrite bead models. Use
expand()first.Examples
>>> Par(Par(R(3), R(2)), I(2)).pprint() R(3) | R(2) | I(2) >>> Par(Par(R(3), R(2)), I(2)).simplify().pprint() R(6/5) | I(2)