docstr: The fixed Talbot time-domain solution is computed from the
  Laplace-space function evaluations using
  
  .. math ::
  
      f(t,M)=\frac{2}{5t}\sum_{k=0}^{M-1}\Re \left[
      \gamma_k \bar{f}(p_k)\right]
  
  where
  
  .. math ::
  
      \gamma_0 = \frac{1}{2}e^{r}\bar{f}(p_0)
  
  .. math ::
  
      \gamma_k = e^{tp_k}\left\lbrace 1 + \frac{jk\pi}{M}\left[1 +
      \cot \left( \frac{k \pi}{M} \right)^2 \right] - j\cot\left(
      \frac{k \pi}{M}\right)\right \rbrace \qquad 1\le k<M.
  
  Again, `j=\sqrt{-1}`.
  
  Before calling this function, call
  :class:`~mpmath.calculus.inverselaplace.FixedTalbot.calc_laplace_parameter`
  to set the parameters and compute the required coefficients.
  
  **References**
  
  1. Abate, J., P. Valko (2004). Multi-precision Laplace
     transform inversion. *International Journal for Numerical
     Methods in Engineering* 60:979-993,
     http://dx.doi.org/10.1002/nme.995
  2. Talbot, A. (1979). The accurate numerical inversion of
     Laplace transforms. *IMA Journal of Applied Mathematics*
     23(1):97, http://dx.doi.org/10.1093/imamat/23.1.97
docstr_tok: ["The","fixed","Talbot","time-domain","solution","is","computed","from","the","Laplace-space","function","evaluations","using","..","math",":",":","f","(","t",",","M",")","=\\frac","{","2","}","{","5t","}","\\sum_","{","k=0","}","^","{","M-1","}","\\Re","\\left","[","\\gamma_k","\\bar","{","f","}","(","p_k",")","\\right","]","where","..","math",":",":","\\gamma_0","=","\\frac","{","1","}","{","2","}","e^","{","r","}","\\bar","{","f","}","(","p_0",")","..","math",":",":","\\gamma_k","=","e^","{","tp_k","}","\\left\\lbrace","1","+","\\frac","{","jk\\pi","}","{","M","}","\\left","[","1","+","\\cot","\\left","(","\\frac","{","k","\\pi","}","{","M","}","\\right",")","^2","\\right","]","-","j\\cot\\left","(","\\frac","{","k","\\pi","}","{","M","}","\\right",")","\\right","\\rbrace","\\qquad","1\\le","k","<","M",".","Again",",","`","j=\\sqrt","{","-1","}","`",".","Before","calling","this","function",",","call",":","class",":","`","~mpmath.calculus.inverselaplace.FixedTalbot.calc_laplace_parameter","`","to","set","the","parameters","and","compute","the","required","coefficients",".","*","*","References","*","*","1",".","Abate",",","J.",",","P.","Valko","(","2004",")",".","Multi-precision","Laplace","transform","inversion",".","*","International","Journal","for","Numerical","Methods","in","Engineering","*","60:979-993",",","http",":","\/\/dx.doi.org\/10.1002\/nme.995","2",".","Talbot",",","A",".","(","1979",")",".","The","accurate","numerical","inversion","of","Laplace","transforms",".","*","IMA","Journal","of","Applied","Mathematics","*","23","(","1",")",":97",",","http",":","\/\/dx.doi.org\/10.1093\/imamat\/23.1.97"]
code: def calc_time_domain_solution(self, fp, t, manual_prec=False):
      r"""The fixed Talbot time-domain solution is computed from the
      Laplace-space function evaluations using
  
      .. math ::
  
          f(t,M)=\frac{2}{5t}\sum_{k=0}^{M-1}\Re \left[
          \gamma_k \bar{f}(p_k)\right]
  
      where
  
      .. math ::
  
          \gamma_0 = \frac{1}{2}e^{r}\bar{f}(p_0)
  
      .. math ::
  
          \gamma_k = e^{tp_k}\left\lbrace 1 + \frac{jk\pi}{M}\left[1 +
          \cot \left( \frac{k \pi}{M} \right)^2 \right] - j\cot\left(
          \frac{k \pi}{M}\right)\right \rbrace \qquad 1\le k<M.
  
      Again, `j=\sqrt{-1}`.
  
      Before calling this function, call
      :class:`~mpmath.calculus.inverselaplace.FixedTalbot.calc_laplace_parameter`
      to set the parameters and compute the required coefficients.
  
      **References**
  
      1. Abate, J., P. Valko (2004). Multi-precision Laplace
         transform inversion. *International Journal for Numerical
         Methods in Engineering* 60:979-993,
         http://dx.doi.org/10.1002/nme.995
      2. Talbot, A. (1979). The accurate numerical inversion of
         Laplace transforms. *IMA Journal of Applied Mathematics*
         23(1):97, http://dx.doi.org/10.1093/imamat/23.1.97
      """
  
      # required
      # ------------------------------
      self.t = self.ctx.convert(t)
  
      # assume fp was computed from p matrix returned from
      # calc_laplace_parameter(), so is already a list or matrix of
      # mpmath 'mpc' types
  
      # these were computed in previous call to
      # calc_laplace_parameter()
      theta = self.theta
      delta = self.delta
      M = self.degree
      p = self.p
      r = self.r
  
      ans = self.ctx.matrix(M, 1)
      ans[0] = self.ctx.exp(delta[0]) * fp[0] / 2
  
      for i in range(1, M):
          ans[i] = (
              self.ctx.exp(delta[i])
              * fp[i]
              * (
                  1
                  + 1j * theta[i] * (1 + self.cot_theta[i] ** 2)
                  - 1j * self.cot_theta[i]
              )
          )
  
      result = self.ctx.fraction(2, 5) * self.ctx.fsum(ans) / self.t
  
      # setting dps back to value when calc_laplace_parameter was
      # called, unless flag is set.
      if not manual_prec:
          self.ctx.dps = self.dps_orig
  
      return result.real
  
label_desc: Use image node_id 2 for calling the FixedTalbot obj's underlying member method code with example usage: obj.calc_time_domain_solution(fp, t, manual_prec) and returns: result