Terminated

class pmrf.models.composite.interconnected.Terminated(terminated_from: Model, terminated_into: Model, *, name: str | None = None, metadata: Any = None, domain_from: str = 's', domain_to: str = 's', method: str | None = None)

Bases: Model

Represents one network terminated in another.

Parameters:
  • terminated_from (Model) – The model being terminated.

  • terminated_into (Model) – The model that terminated_from is terminated into.

  • domain_from (str, default='s') – (experimental) The domain to perform the calculation in for terminated_from. Options are (‘s’, ‘a’).

  • domain_to (str, default='s') – (experimental) The domain to perform the calculation in for terminated_to. Only ‘s’ is supported.

  • method (str, optional) – The algorithm to use for the call to terminate_<domain_from>_in_<domain_to>. If None, uses the default algorithm for the domain. Algorithms are available in pmrf.rf.

a_in_s_impl(frequency: Frequency, z0: Array | ndarray | bool | number | bool | int | float | complex = 50.0) Array
primary_matrix(frequency: Frequency, **kwargs)

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

The primary matrix represents the matrix returned by pmrf.Model.primary_domain, 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.

If this method is called and self.primary_domain is ‘s’, then ‘z0’ should be passed in kwargs.

Parameters:
  • freq (Frequency) – Frequency grid.

  • kwargs – Key-word arguments forwarded to the primary matrix function, such as z0.

Return type:

jnp.ndarray

Raises:

NotImplementedError – If no primary property is overridden.

s_in_s_impl(frequency: Frequency, z0: Array | ndarray | bool | number | bool | int | float | complex = 50.0) Array
domain_from: str = 's'

The domain to use for the “from” model.

domain_to: str = 's'

The domain to use for the “to” model.

method: str | None = None

The algorithm to use.

property primary_domain

The primary domain (e.g. "s", "a") as a string.

The primary property is the first overridden among PRIMARY_DOMAINS, unless build is overridden, in which case the primary property of the built model is returned.

Return type:

str

Raises:

NotImplementedError – If no primary property is overridden.

terminated_from: Model

The “from” model.

terminated_into: Model

The “into” model.