acoustotreams.ScalarSphericalWaveBasis.defaultlmax

static ScalarSphericalWaveBasis.defaultlmax(dim, nmax=1)[source]

Calculate the maximum degree for a given number of modes.

Return the estimated maximum value of l given the dimension of the T-matrix. This is the inverse of :meth:defaultdim. A value of zero is returned for empty T-matrices.

Example

>>> acoustotreams.ScalarSphericalWaveBasis.defaultlmax(len(acoustotreams.ScalarSphericalWaveBasis.default(3)))
3
Parameters:
  • dim (int) – Dimension of the T-matrix, respectively number of modes.

  • nmax (int, optional) – Number of scatterers. Defaults to 1.

Returns:

int