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

Function htmlElValue

SLiCAP/SLiCAPhtml.py:1117–1141  ·  view source on GitHub ↗

Returns code for inline display of value of element 'elName' from instruction 'instr'. :param instr: Instruction that holds the parameter definition :type instr: SLiCAPinstruction.instruction :param elName: Element identifier :type elName: string :param param: Element

(cir, elName, param='value', numeric=False)

Source from the content-addressed store, hash-verified

1115 return '$' + str(sp.latex(roundN(cir.getParValue(parName)))) + '$'
1116
1117def htmlElValue(cir, elName, param='value', numeric=False):
1118 """
1119 Returns code for inline display of value of element 'elName' from instruction
1120 'instr'.
1121
1122 :param instr: Instruction that holds the parameter definition
1123 :type instr: SLiCAPinstruction.instruction
1124
1125 :param elName: Element identifier
1126 :type elName: string
1127
1128 :param param: Element parameter name
1129 :type param: string
1130
1131 :param numeric: - True: full recursive substitution of circuit parameters.
1132 - False: value or expression of the parameter given with
1133 the element.
1134
1135 Defaults to False
1136
1137 :return: HTML code for the element value
1138 :rtype: string
1139 """
1140 return '$' + str(sp.latex(roundN(cir.getElementValue(elName, param=param,
1141 numeric=numeric)))) + '$'

Callers

nothing calls this directly

Calls 2

roundNFunction · 0.90
getElementValueMethod · 0.45

Tested by

no test coverage detected