MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / doImpulse

Function doImpulse

SLiCAP/SLiCAPshell.py:674–728  ·  view source on GitHub ↗

Returns the unit-impulse response of a transfer (ILT of a transfer function). The argument 'transfer' will be set to gain if None is given. :return: SLiCAP results object of which the following attributes with be set as a result of this instruction: :rtype: S

(cir, source='circuit', detector='circuit', lgref='circuit', 
              transfer='gain', convtype=None, pardefs=None, numeric=False, 
              stepdict=None)

Source from the content-addressed store, hash-verified

672 return result
673
674def doImpulse(cir, source='circuit', detector='circuit', lgref='circuit',
675 transfer='gain', convtype=None, pardefs=None, numeric=False,
676 stepdict=None):
677 """
678 Returns the unit-impulse response of a transfer (ILT of a transfer
679 function). The argument 'transfer' will be set to gain if None is given.
680
681 :return: SLiCAP results object of which the following attributes with be
682 set as a result of this instruction:
683
684 :rtype: SLiCAP.SLiCAPinstruction.instruction object
685
686 **Return value attributes**
687
688 - doImpulse(<circuit>).M: MNA matrix (sympy.Matrix)
689 - doImpulse(<circuit>.Iv: Vector with independent variables (sympy.Matrix)
690 - doImpulse(<circuit>).Dv: Vector with dependent variables (sympy.Matrix)
691 - doImpulse(<circuit>).numer: Numerator of the voltage transfer from V1 to
692 V_out (sympy.Expr)
693 - doImpulse(<circuit>).denom: Denominator of the voltage transfer from V1
694 to V_out (sympy.Expr)
695 - doImpulse(<circuit>).laplace: Voltage transfer from V1 to V_out
696 (sympy.Expr)
697 - doImpulse(<circuit>).impulse: Unit-impulse response of the Voltage
698 transfer from V1 to V_out (sympy.Expr)
699
700 If parameter stepping is applied, all above attributes are lists of values
701 or expressions for each step.
702
703 **Parameters**
704
705 See section `General instruction format`_.
706
707 **Example**
708
709 .. code-block:: python
710
711 import SLiCAP as sl
712 sl.initProject("My First RC Network")
713 # Generate the circuit object from the netlist
714 cir = sl.makeCircuit("myFirstRCnetwork.cir")
715 # Obtain the unit impulse response of the transfer from V1 to V_out:
716 h_t = sl.doImpulse(cir).impulse
717
718 """
719 if transfer == None:
720 print("Warning: Invalid transfer=None has been changed to 'gain'")
721 transfer = 'gain'
722
723 result = _executeInstruction(cir, transfer=transfer, source=source,
724 detector=detector, lgref=lgref,
725 convtype=convtype, datatype='impulse',
726 pardefs=pardefs, numeric=numeric,
727 stepdict=stepdict)
728 return result
729
730def doStep(cir, source='circuit', detector='circuit', lgref='circuit',
731 transfer='gain', convtype=None, pardefs=None, numeric=False,

Callers

nothing calls this directly

Calls 1

_executeInstructionFunction · 0.85

Tested by

no test coverage detected