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

Function _symilt

SLiCAP/SLiCAPmath.py:2009–2032  ·  view source on GitHub ↗

Returns the Inverse Laplace Transform f(t) of an expression F(s) for t > 0. :param expr: Function of the Laplace variable F(s). :type expr: Sympy expression. :param s: Laplace variable :type s: sympy.Symbol :param t: time variable :type t: sympy.Symbol :param int

(expr, s, t, integrate=False)

Source from the content-addressed store, hash-verified

2007 return inv_laplace
2008
2009def _symilt(expr, s, t, integrate=False):
2010 """
2011 Returns the Inverse Laplace Transform f(t) of an expression F(s) for t > 0.
2012
2013 :param expr: Function of the Laplace variable F(s).
2014 :type expr: Sympy expression.
2015
2016 :param s: Laplace variable
2017 :type s: sympy.Symbol
2018
2019 :param t: time variable
2020 :type t: sympy.Symbol
2021
2022 :param integrate: True multiplies expr with 1/s, defaults to False
2023 :type integrate: Bool
2024
2025 return: Inverse Laplace Transform f(t)
2026 :rtype: sympy.Expr
2027 """
2028 if integrate:
2029 expr = expr/s
2030 inv_laplace = sp.inverse_laplace_transform(expr, s, t)
2031 # Remove the Heaviside function; positive time only
2032 return inv_laplace.replace(sp.Heaviside(t), 1)
2033
2034def nonPolyCoeffs(expr, var):
2035 """

Callers 1

iltFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected