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

Function _delResNoiseSources

SLiCAP/SLiCAPexecute.py:798–819  ·  view source on GitHub ↗

Deletes the noise sources from instr.circuit, added by executing this instruction with dataType: 'noise'. :param instr: SLiCAP instruction object that holds instruction data. :type instr: SLiCAPinstruction.instruction :return: instr of the execution of the instruction.

(instr)

Source from the content-addressed store, hash-verified

796 return instr
797
798def _delResNoiseSources(instr):
799 """
800 Deletes the noise sources from instr.circuit, added by executing this
801 instruction with dataType: 'noise'.
802
803 :param instr: SLiCAP instruction object that holds instruction data.
804 :type instr: SLiCAPinstruction.instruction
805
806 :return: instr of the execution of the instruction.
807 :rtype: SLiCAPinstruction.instruction
808 """
809 names = []
810 for i in range(len(instr.circuit.indepVars)):
811 refDes = instr.circuit.indepVars[i]
812 if len(refDes) > 8:
813 prefix = refDes[0:8]
814 if prefix == 'I_noise_':
815 del instr.circuit.elements[refDes]
816 names.append(refDes)
817 for name in names:
818 instr.circuit.indepVars.remove(name)
819 return instr
820
821def _doDC(instr):
822 """

Callers 1

checkMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected