treams.SphericalWaveBasis

class treams.SphericalWaveBasis(modes, positions=None)

Basis of spherical waves.

Functions of the spherical wave basis are defined by their angular momentum l, its projection onto the z-axis m, and the polarization pol. If the basis is defined with respect to a single origin it is referred to as “global”, if it contains multiple origins it is referred to as “local”. In a local basis an additional position index pidx is used to link the modes to one of the specified positions.

For spherical waves there exist multiple Polarizations and they can be separated into incident and scattered fields. Depending on these combinations the basis modes refer to one of the functions vsw_A(), vsw_rA(), vsw_M(), vsw_rM(), vsw_N(), or vsw_rN().

Parameters:
  • modes (array-like) – A tuple containing a list for each of l, m, and pol or pidx, l, m, and``pol``.

  • positions (array-like, optional) – The positions of the origins for the specified modes. Defaults to [[0, 0, 0]].

pidx

Integer referring to a row in positions.

Type:

array-like

l

Angular momentum as an integer \(l > 0\)

Type:

array-like

m

Angular momentum projection onto the z-axis, it is an integer with \(m \leq |l|\)

Type:

array-like

pol

Polarization, see also Polarizations.

Type:

array-like

Attributes

isglobal

Basis is defined with respect to a single (global) origin.

positions

Positions of the modes' origins.

Methods

__and__(other)

__eq__(other)

Compare basis sets.

__ge__(other)

Return self>=value.

__getitem__(idx)

Get a subset of the basis.

__gt__(other)

Return self>value.

__le__(other)

Return self<=value.

__len__()

Number of modes.

__lt__(other)

Return self<value.

__ne__(value, /)

Return self!=value.

__or__(other)

Return self|value.

__repr__()

String representation.

__str__()

Return str(self).

__sub__(other)

__xor__(other)

count(value)

default(lmax[, nmax, positions])

Default basis for the given maximal multipolar order.

defaultdim(lmax[, nmax])

Default number of modes for a given mulipolar order.

defaultlmax(dim[, nmax])

Calculate the default mode order for a given length.

ebcm(lmax[, nmax, mmax, positions])

Order of modes suited for ECBM.

index(value, [start, [stop]])

Raises ValueError if the value is not present.

isdisjoint(other)

Return True if two sets have a null intersection.

__le__(other)

Return self<=value.

__lt__(other)

Return self<value.

__str__()

Return str(self).

__or__(other)

Return self|value.

__and__(other)

__xor__(other)

__ge__(other)

Return self>=value.

__gt__(other)

Return self>value.

__len__()

Number of modes.

__ne__(value, /)

Return self!=value.

__sub__(other)