interpolation
- class HistParticle(*args, **kwargs)[source]
Bases:
InterpolationParticle
- class Interp(*args, **kwargs)[source]
Bases:
InterpolationParticlelinear interpolation for complex number
- model_name = 'interp_c'
- class Interp1D3(*args, **kwargs)[source]
Bases:
InterpolationParticlePiecewise third order interpolation
- model_name = 'interp1d3'
- class Interp1DLang(*args, **kwargs)[source]
Bases:
InterpolationParticleLagrange interpolation
- model_name = 'interp_lagrange'
- class Interp1DSpline(*args, **kwargs)[source]
Bases:
InterpolationParticleSpline interpolation function for model independent resonance
- model_name = 'spline_c'
- class Interp1DSplineIdx(*args, **kwargs)[source]
Bases:
InterpolationParticleSpline function in index way.
use
min_m: 0.19 max_m: 0.91 interp_N: 8 with_bound: True
for mass range [0.19, 0.91] and 8 interpolation points
The first and last are fixed to zero unless set
with_bound: True.This is an example of \(k\exp (i k)\) for point k.
(
Source code,png,hires.png,pdf)
- model_name = 'spline_c_idx'
- class InterpHist(*args, **kwargs)[source]
Bases:
InterpolationParticleInterpolation for each bins as constant
- model_name = 'interp_hist'
- class InterpHistIdx(*args, **kwargs)[source]
Bases:
HistParticleInterpolation for each bins as constant
use
min_m: 0.19 max_m: 0.91 interp_N: 8 with_bound: True
for mass range [0.19, 0.91] and 7 bins
The first and last are fixed to zero unless set
with_bound: True.This is an example of \(k\exp (i k)\) for point k.
(
Source code,png,hires.png,pdf)
- model_name = 'hist_idx'
- class InterpL3(*args, **kwargs)[source]
Bases:
InterpolationParticle- model_name = 'interp_l3'
- class InterpLinearNpy(*args, **kwargs)[source]
Bases:
InterpolationParticleLinear interpolation model from a
txtfile with array of [mi, re(ai), im(ai)]. Requiredfile: path_of_file.txt, for the path oftxtfile. It also supportnpyfile.The example is
exp(5 I m).(
Source code,png,hires.png,pdf)
- model_name = 'linear_txt'
- class InterpSPPCHIP(*args, **kwargs)[source]
Bases:
InterpolationParticleShape-Preserving Piecewise Cubic Hermite Interpolation Polynomial. It is monotonic in each interval.
(
Source code,png,hires.png,pdf)
- model_name = 'sppchip'
- class WidthInterpLinearNpy(*args, **kwargs)[source]
Bases:
_WidthInterpLinear interpolation model from a
txtfile with array of [mi, re(gi), im(gi)]. Requiredfile: path_of_file.txt, for the path oftxtfile. It also supportnpyfile.Using interpolation for \(\Pi(m)\).
\[f(m) = \frac{1}{m_0^2 - m^2 - m_0 \Gamma_0 (Re \Pi(m) - Re \Pi(m_0) + i Im \Pi(m))}\]Additional option
width_scale: True, will use \(\Pi(m)/Im \Pi(m_0)\) instead of \(\Pi(m)\) to have a normal width value.The example is
exp(5 I m).(
Source code,png,hires.png,pdf)
- model_name = 'width_linear_txt'
- spline_xi_matrix(xi, bc_type='not-a-knot')[source]
build matrix of xi for spline interpolation solve equation
\[S_i'(x_i) = S_{i-1}'(x_i)\]and two bound condition. \(S_0'(x_0) = S_{n-1}'(x_n) = 0\)
- sppchip(m, xi, y, idx=None, matrix=None)[source]
Shape-Preserving Piecewise Cubic Hermite Interpolation Polynomial. It is monotonic in each interval.
>>> from scipy.interpolate import pchip_interpolate >>> x_observed = np.linspace(0.0, 10.0, 11) >>> y_observed = np.sin(x_observed) >>> x = np.linspace(min(x_observed), max(x_observed)-1e-12, num=100) >>> y = pchip_interpolate(x_observed, y_observed, x) >>> assert np.allclose(y, sppchip(x, x_observed, y_observed).numpy())