treams.CylindricalWaveBasis.defaultmmax

static CylindricalWaveBasis.defaultmmax(dim, nkz=1, nmax=1)

Calculate the default mode order for a given length.

Given the dimension of the T-matrix return the estimated maximal value of m. This is the inverse of defaultdim(). A value of zero is allowed for empty T-matrices.

Example

>>> CylindricalWaveBasis.defaultmmax(len(CylindricalWaveBasis.default([0], 2)), 1)
2
Parameters:
  • dim (int) – Dimension of the T-matrix, respectively number of modes

  • nkz (int, optional) – Number of z-components of the wave vector.

  • nmax (int, optional) – Number of particles, defaults to 1.

Returns:

int