MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / setStepVars

Method setStepVars

SLiCAP/SLiCAPinstruction.py:782–823  ·  view source on GitHub ↗

Defines the step variables for 'array' type stepping. :param stepVars: List with names (*str, sympy.Symbol*) of step variables for array type stepping. :type stepVars: list :Example: >>> # Create an instance of the instruction obje

(self, stepVars)

Source from the content-addressed store, hash-verified

780 return
781
782 def setStepVars(self, stepVars):
783 """
784 Defines the step variables for 'array' type stepping.
785
786 :param stepVars: List with names (*str, sympy.Symbol*) of step
787 variables for array type stepping.
788 :type stepVars: list
789
790 :Example:
791
792 >>> # Create an instance of the instruction object
793 >>> my_instr = instruction()
794 >>> # check a netlist file and use the circuit from this file for this
795 >>> # instruction:
796 >>> my_instr.setCircuit('my_circuit.cir')
797 >>> # Define 'array' type stepping:
798 >>> my_instr.stepMethod = 'array'
799 >>> # Define circuit parameters 'R_a' and 'C_a' as step variables:
800 >>> my_instr.setStepVars(['R_a', 'C_a'])
801 >>> Define the step values for 'R_a and 'C_a':
802 >>> my_instr.setStepArray ([['1k', 1200, 1.2e3],['1u', 10e-6, 0.0001]])
803 >>> # Enable parameter stepping
804 >>> my_instruction.stepOn()
805
806 :note:
807
808 A list with names (*sympy.Symbol*) that can be used as stepping
809 parameter is obtained as follows:
810
811 :Example:
812
813 >>> # Create an instance of the instruction object
814 >>> my_instr = instruction()
815 >>> # check a netlist file and use the circuit from this file for this
816 >>> # instruction:
817 >>> my_instr.setCircuit('my_circuit.cir')
818 >>> # print the list with names of all parameters that can be stepped:
819 >>> print instr.circuit.params + list(instr.circuit.parDefs.keys())
820 """
821 self.stepVars = stepVars
822 self.checkStepVars()
823 return
824
825 def checkStepVars(self):
826 """

Callers

nothing calls this directly

Calls 1

checkStepVarsMethod · 0.95

Tested by

no test coverage detected