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

Function _doImpulse

SLiCAP/SLiCAPexecute.py:882–909  ·  view source on GitHub ↗

Calculates the inverse Laplace transform of the source-detector transfer. First it calculates the Laplace transform of the sou-detector transfer and subsequently the inverse Laplace Transform. The Laplace Transform of the source-detector transfer will be stored in the .laplace

(instr)

Source from the content-addressed store, hash-verified

880 return instr
881
882def _doImpulse(instr):
883 """
884 Calculates the inverse Laplace transform of the source-detector transfer.
885
886 First it calculates the Laplace transform of the sou-detector transfer
887 and subsequently the inverse Laplace Transform.
888
889 The Laplace Transform of the source-detector transfer will be stored in the
890 .laplace attribute of the instr object.
891
892 The instr will be stored in the .impulse attribute of the instr object.
893
894 :param instr: SLiCAP instruction object that holds instruction data.
895 :type instr: SLiCAPinstruction.instruction
896
897 :return: instr of the execution of the instruction.
898 :rtype: SLiCAPinstruction.instruction
899 """
900 instr.dataType = 'laplace'
901 instr = _doLaplace(instr)
902 if instr.step:
903 instr.impulse = []
904 for laplaceinstr in instr.laplace:
905 instr.impulse.append(ilt(laplaceinstr, ini.laplace, sp.Symbol('t')))
906 else:
907 instr.impulse = ilt(instr.laplace, ini.laplace, sp.Symbol('t'))
908 instr.dataType = 'impulse'
909 return instr
910
911def _doStep(instr):
912 """

Callers 1

_doInstructionFunction · 0.85

Calls 2

iltFunction · 0.90
_doLaplaceFunction · 0.85

Tested by

no test coverage detected