BarycentricRational

class pmrf.models.surrogates.rational.BarycentricRational(support_points: AbstractVariable | Inexact[jaxlib._jax.Array, '...'] = None, weights: AbstractVariable | Inexact[jaxlib._jax.Array, '...'] = None, values: AbstractVariable | Inexact[jaxlib._jax.Array, '...'] = None, *, z0: complex = 50 + 0j, name: str | None = None, metadata: Any = None, kind: str = 's')

Bases: AbstractSingleProperty

(experimental) A highly numerically stable rational model defined by a barycentric expansion: H(s) = [ sum( w_i * f_i / (s - s_i) ) ] / [ sum( w_i / (s - s_i) ) ]

Parameters:
  • support_points (Param) – The complex support points (s_i). Shape: (num_points,)

  • weights (Param) – The barycentric weights (w_i). Shape: (num_points,)

  • values (Param) – The function values at the support points (f_i). Shape: (num_points,) for scalars, or (num_points, N, N) for port matrices.

primary_matrix(freq: Frequency) Array

The primary matrix (e.g. s, a etc.) as a function of frequency.

The primary matrix represents the matrix returned by pmrf.Model.primary_property, which is either overridden by sub-classes, or is the first proprerty directly overriden out of pmrf.Model.s(), pmrf.Model.a(), pmrf.Model.y(), pmrf.Model.z() (in that order), unless :meth:pmrf.Model.build is overridden, in which case the primary matrix of the built model is returned.

This method can also be overriden itself in order to to dynamically implement one of the matrices as opposed to overriding it explicitly.

Return type:

jnp.ndarray

Raises:

NotImplementedError – If no primary property is overridden.

support_points: AbstractVariable | Inexact[jaxlib._jax.Array, '...'] = None

Complex support points

values: AbstractVariable | Inexact[jaxlib._jax.Array, '...'] = None

Function values at support points

weights: AbstractVariable | Inexact[jaxlib._jax.Array, '...'] = None

Barycentric weights