twpasolver.matrices_arrays module#

ABCD matrices array module.

class twpasolver.matrices_arrays.TwoByTwoArray(mat: ndarray)[source]#

Bases: object

A class representing an array of 2x2 matrices.

property shape#

Shape of the internal array.

property len#

Length of the internal array.

class twpasolver.matrices_arrays.ABCDArray(mat: ndarray)[source]#

Bases: TwoByTwoArray

A class representing an array of ABCD matrices.

property A: ndarray#

A parameter (element (0,0)) of the 2x2 matrices.

property B: ndarray#

B parameter (element (0,1)) of the 2x2 matrices.

property C: ndarray#

C parameter (element (1,0)) of the 2x2 matrices.

property D: ndarray#

D parameter (element (1,1)) of the 2x2 matrices.

class twpasolver.matrices_arrays.SMatrixArray(mat: ndarray)[source]#

Bases: TwoByTwoArray

A class representing an array of two-ports S parameters matrices.

property S11: ndarray#

S11 parameter (element (0,0)) of the 2x2 matrices.

property S12: ndarray#

S12 parameter (element (0,1)) of the 2x2 matrices.

property S21: ndarray#

S21 parameter (element (1,0)) of the 2x2 matrices.

property S22: ndarray#

S22 parameter (element (1,1)) of the 2x2 matrices.

class twpasolver.matrices_arrays.ZMatrixArray(mat: ndarray)[source]#

Bases: TwoByTwoArray

A class representing an array of two-ports Z parameters matrices.

property Z11: ndarray#

Z11 parameter (element (0,0)) of the 2x2 matrices.

property Z12: ndarray#

Z12 parameter (element (0,1)) of the 2x2 matrices.

property Z21: ndarray#

Z21 parameter (element (1,0)) of the 2x2 matrices.

property Z22: ndarray#

Z22 parameter (element (1,1)) of the 2x2 matrices.

twpasolver.matrices_arrays.abcd_identity(N_abcd: int) ABCDArray[source]#

Get abcd array of identity matrices.

Parameters:

N_abcd (int) – Number of matrices in array.

Returns:

Array of identity matrices.

Return type:

ABCDArray