Returns the numerator of a transfer function, or of the Laplace Transform of a detector voltage or current. The instr will be stored in the **.numer** attribute of the return object. In cases of parameter stepping, this attribute is a list with numerators. :param instr: SLiCAP
(instr)
| 127 | return instr |
| 128 | |
| 129 | def _doNumer(instr): |
| 130 | """ |
| 131 | Returns the numerator of a transfer function, or of the Laplace Transform |
| 132 | of a detector voltage or current. |
| 133 | |
| 134 | The instr will be stored in the **.numer** attribute of the return object. In |
| 135 | cases of parameter stepping, this attribute is a list with numerators. |
| 136 | |
| 137 | :param instr: SLiCAP instruction object that holds instruction data. |
| 138 | :type instr: SLiCAPinstruction.instruction |
| 139 | |
| 140 | :return: instr of the execution of the instruction. |
| 141 | :rtype: SLiCAPinstruction.instruction |
| 142 | """ |
| 143 | if instr.step: |
| 144 | if ini.step_function: |
| 145 | if instr.gainType == 'loopgain' or instr.gainType == 'servo': |
| 146 | instr = _makeAllMatrices(instr) |
| 147 | instr = _doPyLoopGainServo(instr) |
| 148 | else: |
| 149 | instr = _makeAllMatrices(instr) |
| 150 | instr = _doPyNumer(instr,instr) |
| 151 | numer = instr.numer[0] |
| 152 | instr.numer = _stepFunctions(instr.stepDict, numer) |
| 153 | else: |
| 154 | stepVars = list(instr.stepDict.keys()) |
| 155 | numSteps = len(instr.stepDict[stepVars[0]]) |
| 156 | for i in range(numSteps): |
| 157 | for j in range(len(stepVars)): |
| 158 | instr.parDefs[stepVars[j]] = instr.stepDict[stepVars[j]][i] |
| 159 | if instr.gainType == 'loopgain' or instr.gainType == 'servo': |
| 160 | instr = _makeAllMatrices(instr) |
| 161 | instr = _doPyLoopGainServo(instr) |
| 162 | else: |
| 163 | instr = _makeAllMatrices(instr) |
| 164 | instr = _doPyNumer(instr) |
| 165 | instr.numer[-1] = instr.numer[-1] |
| 166 | else: |
| 167 | if instr.gainType == 'loopgain' or instr.gainType == 'servo': |
| 168 | instr = _makeAllMatrices(instr) |
| 169 | instr = _doPyLoopGainServo(instr) |
| 170 | else: |
| 171 | instr = _makeAllMatrices(instr) |
| 172 | instr = _doPyNumer(instr) |
| 173 | instr.numer = instr.numer[0] |
| 174 | instr = _correctDMcurrentinstr(instr) |
| 175 | return instr |
| 176 | |
| 177 | def _doDenom(instr): |
| 178 | """ |
no test coverage detected