WallGo.polynomial.SpectralConvergenceInfo

class SpectralConvergenceInfo(coefficients, weightPower=0, offset=0)[source]

Bases: object

Carries information about the convergence of a polynomial expansion.

Assumes input is a 1d array of coefficients in the Chebyshev basis. Fits a slope to the logarithm of the absolute value of these coefficients. Also, finds the average value of the index, treating the coefficients as a histogram.

Initialise given an array.

Parameters:
  • coefficients (ndarray)

  • weightPower (int)

  • offset (int)

__init__(coefficients, weightPower=0, offset=0)[source]

Initialise given an array.

Parameters:
  • coefficients (ndarray)

  • weightPower (int)

  • offset (int)

Return type:

None

Methods

__init__(coefficients[, weightPower, offset])

Initialise given an array.

Attributes

apparentConvergence

True if spectral expansion appears to be converging, False otherwise.

offset

Offest in \(n\).

spectralExponent

Exponent \(\sigma\) of \(A e^{\sigma n}\) fit to spectral expansion.

spectralPeak

Positions of the peak of the spectral expansion.

weightPower

Additional powers of \(n\) to weight by in assessing convergence.

coefficients

Coefficients of expansion in the Chebyshev basis, must be 1d.

apparentConvergence: bool = False

True if spectral expansion appears to be converging, False otherwise.

coefficients: ndarray

Coefficients of expansion in the Chebyshev basis, must be 1d.

offset: int = 0

Offest in \(n\). Default is zero.

spectralExponent: float = 0.0

Exponent \(\sigma\) of \(A e^{\sigma n}\) fit to spectral expansion.

spectralPeak: int = 0

Positions of the peak of the spectral expansion.

weightPower: int = 0

Additional powers of \(n\) to weight by in assessing convergence. Default is zero.