Component_SnP

rfnetwork.component.Component_SnP

class rfnetwork.component.Component_SnP(file, shunt=False, passive=False, state={})

Bases: Component

Component defined from a touchstone file (.snp)

Parameters

filestr | dict

dictionary of file paths. Keys are used as variable names that can be used to select files in set_state, values are file paths. Supports a single string value which is assigned as the “default” key.

shuntbool, default: False

If True, port 2 is connected to ground and port 1 is transformed into a 2-port component that can be cascaded with other components.

passivebool, default: True

if True, evaluate calls evaluate_sdata instead of evaluate_data and noise correlation matrix is computed passively.

statedict, optional

dictionary of state variables specific to the sub-class (i.e. line width, switch state etc…). The state values can be read with the state property and changed later with set_state(). Attempting to set the state of variables that were not included in the initial dictionary will raise an error.

Methods

Component_SnP.equals(other)

Returns True if the s-matrix data from other is equivalent to this object.

Component_SnP.evaluate_data(frequency)

Returns s-matrix and noise correlation matrix of the component.

Component_SnP.evaluate_sdata(frequency)

Returns s-matrix matrix of the component.

Component_SnP.format_state(**kwargs)

Get a string value of the active file.

Attributes

Component_SnP.frequency

Return the frequency values of the touchstone file for the current state.