interpolation
- class HistParticle(*args, **kwargs)[source]
Bases:
InterpolationParticle
- class Interp(*args, **kwargs)[source]
Bases:
InterpolationParticle
linear interpolation for complex number
- model_name = 'interp_c'
- class Interp1D3(*args, **kwargs)[source]
Bases:
InterpolationParticle
Piecewise third order interpolation
- model_name = 'interp1d3'
- class Interp1DLang(*args, **kwargs)[source]
Bases:
InterpolationParticle
Lagrange interpolation
- model_name = 'interp_lagrange'
- class Interp1DSpline(*args, **kwargs)[source]
Bases:
InterpolationParticle
Spline interpolation function for model independent resonance
- model_name = 'spline_c'
- class Interp1DSplineIdx(*args, **kwargs)[source]
Bases:
InterpolationParticle
Spline 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:
InterpolationParticle
Interpolation for each bins as constant
- model_name = 'interp_hist'
- class InterpHistIdx(*args, **kwargs)[source]
Bases:
HistParticle
Interpolation 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:
InterpolationParticle
Linear interpolation model from a
npy
file with array of [mi, re(ai), im(ai)]. Requiredfile: path_of_file.npy
, for the path ofnpy
file.The example is
exp(5 I m)
.(
Source code
,png
,hires.png
,pdf
)- model_name = 'linear_npy'
- class InterpLinearTxt(*args, **kwargs)[source]
Bases:
InterpLinearNpy
Linear interpolation model from a
txt
file with array of [mi, re(ai), im(ai)]. Requiredfile: path_of_file.txt
, for the path oftxt
file.The example is
exp(5 I m)
.(
Source code
,png
,hires.png
,pdf
)- model_name = 'linear_txt'
- class InterpSPPCHIP(*args, **kwargs)[source]
Bases:
InterpolationParticle
Shape-Preserving Piecewise Cubic Hermite Interpolation Polynomial. It is monotonic in each interval.
(
Source code
,png
,hires.png
,pdf
)- model_name = 'sppchip'
- 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())