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

Method setLGref

SLiCAP/SLiCAPinstruction.py:1364–1392  ·  view source on GitHub ↗

Defines the loop gain reference (name of a controlled source). A list with names of dependent (controlled) sources is returned by the method **instruction.controlled()**. :param lgRef: Name of the loop gain reference. :type lgRef: str, sympy.Symbol

(self, lgRef)

Source from the content-addressed store, hash-verified

1362 return
1363
1364 def setLGref(self, lgRef):
1365 """
1366 Defines the loop gain reference (name of a controlled source).
1367
1368 A list with names of dependent (controlled) sources is returned by the
1369 method **instruction.controlled()**.
1370
1371 :param lgRef: Name of the loop gain reference.
1372 :type lgRef: str, sympy.Symbol
1373
1374 :Example:
1375
1376 >>> # create an instance of the instruction object
1377 >>> my_instr = instruction()
1378 >>> # check a netlist file and use the circuit from this file for this
1379 >>> # instruction:
1380 >>> my_instr.setCircuit('my_circuit.cir')
1381 >>> # Display a list with controlled sources of the circuit:
1382 >>> my_instr.controlled()
1383 """
1384 if type(lgRef) == str:
1385 self.lgRef = [lgRef, None]
1386 self.checkLGref()
1387 elif type(lgRef) == list and len(lgRef) == 2:
1388 self.lgRef = lgRef
1389 self.checkLGref()
1390 else:
1391 print("Error in loop gain reference specification.")
1392 return
1393
1394 def checkLGref(self):
1395 """

Callers 1

_executeInstructionFunction · 0.80

Calls 1

checkLGrefMethod · 0.95

Tested by

no test coverage detected