AbstractSingleDiscreteProperty

class pmrf.models.adapters.base.AbstractSingleDiscreteProperty(frequency: Any, *, z0: complex = 50 + 0j, name: str | None = None, metadata: Any = None, kind: str = 's')

Bases: AbstractSingleProperty, AbstractDiscrete, ABC

(experimental) A model that provides a single dynamic property type from a discrete grid.

To override this class, implement discrete_matrix which must return a matrix property of type self.kind.

abstractmethod discrete_matrix() Array

The primary discrete data.

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.