# BSplineSModel

class ipkiss3.all.circuit_sim.BSplineSModel

Numerical S-matrix model consisting of a univariate B-spline representations over wavelength.

Every S-parameter in the matrix is represented by t, c, k (knots, coefficients, degree) for both amplitude and phase, expressing the S-parameter as a function of wavelength.

The implementation is directly based on scipy’s BSpline.

The (i, j) th item in the t, c, k matrices, i.e., t[i, j, :], c[i, j, :], k[i, j] is associated with S-matrix element S[i, j]. Hence the order of the terms in the CompactModel is important to determine the order in which items appear in the t, c, k matrices.

Parameters:
t_abs, c_abs, k_abs:
t_phase, c_phase, k_phase:

t[i, j, :]: vector of knots for the S(i,j) c[i, j, :]: B-spline coefficients for S(i, j) k[i, j]: degree of the spline for S(i, j) where _abs is used to represent the absolute value, and _phase used to represent the angle.

reciprocal:

When set to True, the part of the smatrix below the diagonal is replicated to the upper part of the smatrix.

parameters = ['t_abs', 'c_abs', 'k_abs', 't_phase', 'c_phase', 'k_phase', 'reciprocal', '_n_terms']
reciprocal = False
static from_smatrix(smatrix_1dsweep, **kwargs)

Generate a BSplineSModel from a SMatrix1DSweep

Since BSplineSModel is expressed as function of wavelength, SMatrix1DSweep must be expressed as function of wavelength (sweep_parameter_name==’wavelength’) or it will be converted automatically with micrometer as a default wavelength unit. If your system simulation is in different units (e.g. nanometer), please convert smatrix_1dsweep upfront.

Parameters:
smatrix_1dsweep: SMatrix1DSweep

the data from which to interpolate, can come from a simulation or measurement.

**kwargs

the keyword arguments are passed to scipy’s splrep to alter the B-splines used for interpolation. Most notably, k is used to set the order of the spline, ‘s’ is a smoothing factor which can be used for smoothing in case of noisy input data. This function uses `splrep`, please check scipy’s documentation on splrep for more information.

Returns:
A BSplineSModel