docstr: The "fixed" Talbot method deforms the Bromwich contour towards
  `-\infty` in the shape of a parabola. Traditionally the Talbot
  algorithm has adjustable parameters, but the "fixed" version
  does not. The `r` parameter could be passed in as a parameter,
  if you want to override the default given by (Abate & Valko,
  2004).
  
  The Laplace parameter is sampled along a parabola opening
  along the negative imaginary axis, with the base of the
  parabola along the real axis at
  `p=\frac{r}{t_\mathrm{max}}`. As the number of terms used in
  the approximation (degree) grows, the abscissa required for
  function evaluation tend towards `-\infty`, requiring high
  precision to prevent overflow.  If any poles, branch cuts or
  other singularities exist such that the deformed Bromwich
  contour lies to the left of the singularity, the method will
  fail.
  
  **Optional arguments**
  
  :class:`~mpmath.calculus.inverselaplace.FixedTalbot.calc_laplace_parameter`
  recognizes the following keywords
  
  *tmax*
      maximum time associated with vector of times
      (typically just the time requested)
  *degree*
      integer order of approximation (M = number of terms)
  *r*
      abscissa for `p_0` (otherwise computed using rule
      of thumb `2M/5`)
  
  The working precision will be increased according to a rule of
  thumb. If 'degree' is not specified, the working precision and
  degree are chosen to hopefully achieve the dps of the calling
  context. If 'degree' is specified, the working precision is
  chosen to achieve maximum resulting precision for the
  specified degree.
  
  .. math ::
  
      p_0=\frac{r}{t}
  
  .. math ::
  
      p_i=\frac{i r \pi}{Mt_\mathrm{max}}\left[\cot\left(
      \frac{i\pi}{M}\right) + j \right] \qquad 1\le i <M
  
  where `j=\sqrt{-1}`, `r=2M/5`, and `t_\mathrm{max}` is the
  maximum specified time.
docstr_tok: ["The","``","fixed","''","Talbot","method","deforms","the","Bromwich","contour","towards","`","-\\infty","`","in","the","shape","of","a","parabola",".","Traditionally","the","Talbot","algorithm","has","adjustable","parameters",",","but","the","``","fixed","''","version","does","not",".","The","`","r","`","parameter","could","be","passed","in","as","a","parameter",",","if","you","want","to","override","the","default","given","by","(","Abate","&","Valko",",","2004",")",".","The","Laplace","parameter","is","sampled","along","a","parabola","opening","along","the","negative","imaginary","axis",",","with","the","base","of","the","parabola","along","the","real","axis","at","`","p=\\frac","{","r","}","{","t_\\mathrm","{","max","}","}","`",".","As","the","number","of","terms","used","in","the","approximation","(","degree",")","grows",",","the","abscissa","required","for","function","evaluation","tend","towards","`","-\\infty","`",",","requiring","high","precision","to","prevent","overflow",".","If","any","poles",",","branch","cuts","or","other","singularities","exist","such","that","the","deformed","Bromwich","contour","lies","to","the","left","of","the","singularity",",","the","method","will","fail",".","*","*","Optional","arguments","*","*",":","class",":","`","~mpmath.calculus.inverselaplace.FixedTalbot.calc_laplace_parameter","`","recognizes","the","following","keywords","*","tmax","*","maximum","time","associated","with","vector","of","times","(","typically","just","the","time","requested",")","*","degree","*","integer","order","of","approximation","(","M","=","number","of","terms",")","*","r","*","abscissa","for","`","p_0","`","(","otherwise","computed","using","rule","of","thumb","`","2M\/5","`",")","The","working","precision","will","be","increased","according","to","a","rule","of","thumb",".","If","'degree","'","is","not","specified",",","the","working","precision","and","degree","are","chosen","to","hopefully","achieve","the","dps","of","the","calling","context",".","If","'degree","'","is","specified",",","the","working","precision","is","chosen","to","achieve","maximum","resulting","precision","for","the","specified","degree",".","..","math",":",":","p_0=\\frac","{","r","}","{","t","}","..","math",":",":","p_i=\\frac","{","i","r","\\pi","}","{","Mt_\\mathrm","{","max","}","}","\\left","[","\\cot\\left","(","\\frac","{","i\\pi","}","{","M","}","\\right",")","+","j","\\right","]","\\qquad","1\\le","i","<","M","where","`","j=\\sqrt","{","-1","}","`",",","`","r=2M\/5","`",",","and","`","t_\\mathrm","{","max","}","`","is","the","maximum","specified","time","."]
code: def calc_laplace_parameter(self, t, **kwargs):
      r"""The "fixed" Talbot method deforms the Bromwich contour towards
      `-\infty` in the shape of a parabola. Traditionally the Talbot
      algorithm has adjustable parameters, but the "fixed" version
      does not. The `r` parameter could be passed in as a parameter,
      if you want to override the default given by (Abate & Valko,
      2004).
  
      The Laplace parameter is sampled along a parabola opening
      along the negative imaginary axis, with the base of the
      parabola along the real axis at
      `p=\frac{r}{t_\mathrm{max}}`. As the number of terms used in
      the approximation (degree) grows, the abscissa required for
      function evaluation tend towards `-\infty`, requiring high
      precision to prevent overflow.  If any poles, branch cuts or
      other singularities exist such that the deformed Bromwich
      contour lies to the left of the singularity, the method will
      fail.
  
      **Optional arguments**
  
      :class:`~mpmath.calculus.inverselaplace.FixedTalbot.calc_laplace_parameter`
      recognizes the following keywords
  
      *tmax*
          maximum time associated with vector of times
          (typically just the time requested)
      *degree*
          integer order of approximation (M = number of terms)
      *r*
          abscissa for `p_0` (otherwise computed using rule
          of thumb `2M/5`)
  
      The working precision will be increased according to a rule of
      thumb. If 'degree' is not specified, the working precision and
      degree are chosen to hopefully achieve the dps of the calling
      context. If 'degree' is specified, the working precision is
      chosen to achieve maximum resulting precision for the
      specified degree.
  
      .. math ::
  
          p_0=\frac{r}{t}
  
      .. math ::
  
          p_i=\frac{i r \pi}{Mt_\mathrm{max}}\left[\cot\left(
          \frac{i\pi}{M}\right) + j \right] \qquad 1\le i <M
  
      where `j=\sqrt{-1}`, `r=2M/5`, and `t_\mathrm{max}` is the
      maximum specified time.
  
      """
  
      # required
      # ------------------------------
      # time of desired approximation
      self.t = self.ctx.convert(t)
  
      # optional
      # ------------------------------
      # maximum time desired (used for scaling) default is requested
      # time.
      self.tmax = self.ctx.convert(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 = self.degree
      else:
          self.dps_goal = int(1.72 * self.ctx.dps)
          self.degree = max(12, int(1.38 * self.dps_goal))
  
      M = self.degree
  
      # 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
  
      # Abate & Valko rule of thumb for r parameter
      self.r = kwargs.get("r", self.ctx.fraction(2, 5) * M)
  
      self.theta = self.ctx.linspace(0.0, self.ctx.pi, M + 1)
  
      self.cot_theta = self.ctx.matrix(M, 1)
      self.cot_theta[0] = 0  # not used
  
      # all but time-dependent part of p
      self.delta = self.ctx.matrix(M, 1)
      self.delta[0] = self.r
  
      for i in range(1, M):
          self.cot_theta[i] = self.ctx.cot(self.theta[i])
          self.delta[i] = (
              self.r * self.theta[i] * (self.cot_theta[i] + 1j)
          )
  
      self.p = self.ctx.matrix(M, 1)
      self.p = self.delta / self.tmax
  
label_desc: Use image node_id 1 for calling the FixedTalbot obj's underlying member method code with example usage: obj.calc_laplace_parameter(t) without return types