docstr: the de Hoog, Knight & Stokes algorithm is an
  accelerated form of the Fourier series numerical
  inverse Laplace transform algorithms.
  
  .. math ::
  
      p_k = \gamma + \frac{jk}{T} \qquad 0 \le k < 2M+1
  
  where
  
  .. math ::
  
      \gamma = \alpha - \frac{\log \mathrm{tol}}{2T},
  
  `j=\sqrt{-1}`, `T = 2t_\mathrm{max}` is a scaled time,
  `\alpha=10^{-\mathrm{dps\_goal}}` is the real part of the
  rightmost pole or singularity, which is chosen based on the
  desired accuracy (assuming the rightmost singularity is 0),
  and `\mathrm{tol}=10\alpha` is the desired tolerance, which is
  chosen in relation to `\alpha`.`
  
  When increasing the degree, the abscissa increase towards
  `j\infty`, but more slowly than the fixed Talbot
  algorithm. The de Hoog et al. algorithm typically does better
  with oscillatory functions of time, and less well-behaved
  functions. The method tends to be slower than the Talbot and
  Stehfest algorithsm, especially so at very high precision
  (e.g., `>500` digits precision).
docstr_tok: ["the","de","Hoog",",","Knight","&","Stokes","algorithm","is","an","accelerated","form","of","the","Fourier","series","numerical","inverse","Laplace","transform","algorithms",".","..","math",":",":","p_k","=","\\gamma","+","\\frac","{","jk","}","{","T","}","\\qquad","0","\\le","k","<","2M+1","where","..","math",":",":","\\gamma","=","\\alpha","-","\\frac","{","\\log","\\mathrm","{","tol","}","}","{","2T","}",",","`","j=\\sqrt","{","-1","}","`",",","`","T","=","2t_\\mathrm","{","max","}","`","is","a","scaled","time",",","`","\\alpha=10^","{","-\\mathrm","{","dps\\_goal","}","}","`","is","the","real","part","of","the","rightmost","pole","or","singularity",",","which","is","chosen","based","on","the","desired","accuracy","(","assuming","the","rightmost","singularity","is","0",")",",","and","`","\\mathrm","{","tol","}","=10\\alpha","`","is","the","desired","tolerance",",","which","is","chosen","in","relation","to","`","\\alpha","`",".","`","When","increasing","the","degree",",","the","abscissa","increase","towards","`","j\\infty","`",",","but","more","slowly","than","the","fixed","Talbot","algorithm",".","The","de","Hoog","et","al",".","algorithm","typically","does","better","with","oscillatory","functions","of","time",",","and","less","well-behaved","functions",".","The","method","tends","to","be","slower","than","the","Talbot","and","Stehfest","algorithsm",",","especially","so","at","very","high","precision","(","e.g.",",","`",">","500","`","digits","precision",")","."]
code: def calc_laplace_parameter(self, t, **kwargs):
      r"""the de Hoog, Knight & Stokes algorithm is an
      accelerated form of the Fourier series numerical
      inverse Laplace transform algorithms.
  
      .. math ::
  
          p_k = \gamma + \frac{jk}{T} \qquad 0 \le k < 2M+1
  
      where
  
      .. math ::
  
          \gamma = \alpha - \frac{\log \mathrm{tol}}{2T},
  
      `j=\sqrt{-1}`, `T = 2t_\mathrm{max}` is a scaled time,
      `\alpha=10^{-\mathrm{dps\_goal}}` is the real part of the
      rightmost pole or singularity, which is chosen based on the
      desired accuracy (assuming the rightmost singularity is 0),
      and `\mathrm{tol}=10\alpha` is the desired tolerance, which is
      chosen in relation to `\alpha`.`
  
      When increasing the degree, the abscissa increase towards
      `j\infty`, but more slowly than the fixed Talbot
      algorithm. The de Hoog et al. algorithm typically does better
      with oscillatory functions of time, and less well-behaved
      functions. The method tends to be slower than the Talbot and
      Stehfest algorithsm, especially so at very high precision
      (e.g., `>500` digits precision).
  
      """
  
      # required
      # ------------------------------
      self.t = self.ctx.convert(t)
  
      # optional
      # ------------------------------
      self.tmax = kwargs.get("tmax", self.t)
  
      # empirical relationships used here based on a linear fit of
      # requested and delivered dps for exponentially decaying time
      # functions for requested dps up to 512.
  
      if "degree" in kwargs:
          self.degree = kwargs["degree"]
          self.dps_goal = int(1.38 * self.degree)
      else:
          self.dps_goal = int(self.ctx.dps * 1.36)
          self.degree = max(10, self.dps_goal)
  
      # 2*M+1 terms in approximation
      M = self.degree
  
      # adjust alpha component of abscissa of convergence for higher
      # precision
      tmp = self.ctx.power(10.0, -self.dps_goal)
      self.alpha = self.ctx.convert(kwargs.get("alpha", tmp))
  
      # desired tolerance (here simply related to alpha)
      self.tol = self.ctx.convert(kwargs.get("tol", self.alpha * 10.0))
      self.np = 2 * self.degree + 1  # number of terms in approximation
  
      # this is adjusting the dps of the calling context
      # hopefully the caller doesn't monkey around with it
      # between calling this routine and calc_time_domain_solution()
      self.dps_orig = self.ctx.dps
      self.ctx.dps = self.dps_goal
  
      # scaling factor (likely tun-able, but 2 is typical)
      self.scale = kwargs.get("scale", 2)
      self.T = self.ctx.convert(kwargs.get("T", self.scale * self.tmax))
  
      self.p = self.ctx.matrix(2 * M + 1, 1)
      self.gamma = self.alpha - self.ctx.log(self.tol) / (
          self.scale * self.T
      )
      self.p = (
          self.gamma
          + self.ctx.pi
          * self.ctx.matrix(self.ctx.arange(self.np))
          / self.T
          * 1j
      )
  
label_desc: Use image node_id 1 for calling the deHoog obj's underlying member method code with example usage: obj.calc_laplace_parameter(t) without return types