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

Method setStepArray

SLiCAP/SLiCAPinstruction.py:1094–1121  ·  view source on GitHub ↗

Defines the array with values for step method array. :param stepArray: Nested list: list[i] carries the step values for the step variable in instruction.stepVars[i]. The lists should have equal lengths. :type stepArray: li

(self, stepArray)

Source from the content-addressed store, hash-verified

1092 return
1093
1094 def setStepArray(self, stepArray):
1095 """
1096 Defines the array with values for step method array.
1097
1098 :param stepArray: Nested list: list[i] carries the step values for the
1099 step variable in instruction.stepVars[i].
1100 The lists should have equal lengths.
1101 :type stepArray: list
1102
1103 :Example:
1104
1105 >>> # Create an instance of the instruction object
1106 >>> my_instr = instruction()
1107 >>> # check a netlist file and use the circuit from this file for this
1108 >>> # instruction:
1109 >>> my_instr.setCircuit('my_circuit.cir')
1110 >>> # Define 'array' type stepping:
1111 >>> my_instr.setStepMethod('array')
1112 >>> # Define circuit parameters 'R_a' and 'C_a' as step variables:
1113 >>> my_instr.setStepVars(['R_a', 'C_a'])
1114 >>> Define the step values for 'R_a and 'C_a':
1115 >>> my_instr.setStepArray([['1k', 1200, 1.2e3],['1u', 10e-6, 0.0001]])
1116 >>> # Enable parameter stepping
1117 >>> my_instr.stepOn()
1118 """
1119 self.stepArray = stepArray
1120 self.checkStepArray()
1121 return
1122
1123 def checkStepArray(self):
1124 """

Callers

nothing calls this directly

Calls 1

checkStepArrayMethod · 0.95

Tested by

no test coverage detected