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

Function _doDenom

SLiCAP/SLiCAPexecute.py:177–223  ·  view source on GitHub ↗

Returns the denominator of a transfer function, or of the Laplace Transform of a detector voltage or current. The instr will be stored in the **.denom** attribute of the resturn object. In cases of parameter stepping, this attribute is a list with numerators. :param instr: SLi

(instr)

Source from the content-addressed store, hash-verified

175 return instr
176
177def _doDenom(instr):
178 """
179 Returns the denominator of a transfer function, or of the Laplace Transform
180 of a detector voltage or current.
181
182 The instr will be stored in the **.denom** attribute of the resturn object. In
183 cases of parameter stepping, this attribute is a list with numerators.
184
185 :param instr: SLiCAP instruction object that holds instruction data.
186 :type instr: SLiCAPinstruction.instruction
187
188 :return: instr of the execution of the instruction.
189 :rtype: SLiCAPinstruction.instruction
190 """
191 if instr.step:
192 if ini.step_function:
193 if instr.gainType == 'loopgain' or instr.gainType == 'servo':
194 instr = _makeAllMatrices(instr)
195 instr = _doPyLoopGainServo(instr)
196 else:
197 instr = _makeAllMatrices(instr)
198 instr = _doPyDenom(instr)
199 denom = instr.denom[0]
200 instr.denom = _stepFunctions(instr.stepDict, denom)
201 else:
202 stepVars = list(instr.stepDict.keys())
203 numSteps = len(instr.stepDict[stepVars[0]])
204 for i in range(numSteps):
205 for j in range(len(stepVars)):
206 instr.parDefs[stepVars[j]] = instr.stepDict[stepVars[j]][i]
207 if instr.gainType == 'loopgain' or instr.dataType == 'servo':
208 instr = _makeAllMatrices(instr)
209 instr = _doPyLoopGainServo(instr)
210 else:
211 instr = _makeAllMatrices(instr)
212 instr = _doPyDenom(instr)
213 instr.denom[-1] = instr.denom[-1]
214 else:
215 if instr.gainType == 'loopgain' or instr.gainType == 'servo':
216 instr = _makeAllMatrices(instr)
217 instr = _doPyLoopGainServo(instr)
218 instr.denom[-1] = instr.denom[-1]
219 else:
220 instr = _makeAllMatrices(instr)
221 instr = _doPyDenom(instr)
222 instr.denom = instr.denom[0]
223 return instr
224
225def _doLaplace(instr):
226 """

Callers 2

_doInstructionFunction · 0.85
_doPolesFunction · 0.85

Calls 4

_makeAllMatricesFunction · 0.85
_doPyLoopGainServoFunction · 0.85
_doPyDenomFunction · 0.85
_stepFunctionsFunction · 0.85

Tested by

no test coverage detected