treams.TMatrix

treams.TMatrix#

class treams.TMatrix(arr, ann=(), /, **kwargs)[source]#

T-matrix with a spherical basis.

The T-matrix is square relating incident (regular) fields treams.special.vsw_rA() (helical polarizations) or treams.special.vsw_rN() and treams.special.vsw_rM() (parity polarizations) to the corresponding scattered fields treams.special.vsw_A() or treams.special.vsw_N() and treams.special.vsw_M(). The modes themselves are defined in basis, the polarization type in poltype. Also, the wave number k0 and, if not vacuum, the material material are specified.

Parameters:
  • arr (float or complex, array-like) – T-matrix itself.

  • k0 (float) – Wave number in vacuum.

  • basis (SphericalWaveBasis, optional) – Basis definition.

  • material (Material, optional) – Embedding material, defaults to vacuum.

  • poltype (str, optional) – Polarization type (Polarizations).

  • lattice (Lattice, optional) – Lattice definition. If specified the T-Matrix is assumed to be periodically repeated in the defined lattice.

  • kpar (list, optional) – Phase factor for the periodic T-Matrix.

__init__(arr, ann=(), /, **kwargs)#

Initialization.

Methods

__init__(arr[, ann])

Initialization.

all([axis, dtype, out, keepdims, where])

Test if all elements (along an axis) are True.

any([axis, dtype, out, keepdims, where])

Test if any element (along an axis) is True.

astype(*args, **kwargs)

Return array as given type.

cluster(tmats, positions)

Block-diagonal T-matrix of multiple objects.

conj(*args, **kwargs)

Complex conjugate elementwise.

conjugate(*args, **kwargs)

Complex conjugate elementwise.

cumprod([axis, dtype, out])

Cumulative product of elements (along an axis).

cumsum([axis, dtype, out])

Cumulative sum of elements (along an axis).

diagonal([offset, axis1, axis2])

Get the diagonal of the array.

flatten([order])

Flatten array to one dimension.

max([axis, out, keepdims, initial, where])

Maximum (along an axis).

min([axis, out, keepdims, initial, where])

Minimum (along an axis).

prod([axis, dtype, out, keepdims, initial, ...])

Product of elements (along an axis).

relax(*args[, mro])

Try creating AnnotatedArray subclasses if possible.

sphere(lmax, k0, radii, materials[, poltype])

T-Matrix of a (multi-layered) sphere.

sum([axis, dtype, out, keepdims, initial, where])

Sum of elements (along an axis).

swapaxes(axis1, axis2)

trace([offset, axis1, axis2, dtype, out])

Trace of an array.

transpose([axes])

Transpose array dimensions.

valid_points(grid, radii)

Points on the grid where the expansion is valid.

xs(illu[, flux])

Scattering and extinction cross section.

Attributes

T

Transpose.

ann

Array annotations.

bfield

Attach an operator to an object as attribute.

cd

Circular dichroism (CD).

changepoltype

Polarization change matrix, see also treams.operators.ChangePoltype.

chi

Electromagnetic chirality.

db

Duality breaking.

dfield

Attach an operator to an object as attribute.

efield

Attach an operator to an object as attribute.

expand

Expansion matrix, see also treams.operators.Expand.

expandlattice

Lattice expansion matrix, see also treams.operators.ExpandLattice.

ffield

Field evaluation matrix, see also treams.operators.EField.

gfield

Attach an operator to an object as attribute.

hfield

Attach an operator to an object as attribute.

imag

Imaginary part of the array.

interaction

isglobal

Test if a T-matrix is global.

ks

Wave numbers (in medium).

latticeinteraction

ndim

Number of array dimensions.

permute

Permutation matrix, see also treams.operators.Permute.

real

Real part of the array.

rotate

Rotation matrix, see also treams.operators.Rotate.

shape

Array shape.

size

Array size.

translate

Translation matrix, see also treams.operators.Translate.

xs_ext_avg

Rotation and polarization averaged extinction cross section.

xs_sca_avg

Rotation and polarization averaged scattering cross section.