kpm.disc

Discretize target function. Find a suitable discretization for the independent variables of the target function. For example, in the case of the (local) density of states, this will be the energy axis, represented by a 1D-array.

Note that this module works with the rescaled axes, so the output is always some discretization of the interval [-1, 1]. The target quantity still has to be scaled back to the original matrix spectrum, together with the discretized x-axis.

Functions

kpm.disc.uniform(ndisc, eps=1e-05)[source]

Return a uniform discretization of the interval [-1, 1]. If ndisc is of type int, use ndisc discretization steps. If ndisc is of type float, use it as the stepwidth. The number of steps is then determined by the stepwidth and the boundaries (-1, 1).

Note: The returned list of numbers will always be symmetric to 0. An odd number of steps will always include 0. Likewise, a given stepwidth will always result in an odd number of values including 0.

kpm.disc.cosine(ndisc)[source]

Return cosine-like discretization of the interval [-1, 1], using ndisc discretization steps. This form of discretization is needed if the discrete cosine transform (dct) is being used for reconstructing the target function (see rcstr-module). The default for ndisc should be 2*limit, where limit is the number of moments (truncation limit).

This is the pure Python version of this function, using normal Numpy functions.

Indices and tables

Table Of Contents

Previous topic

kpm.svect

Next topic

kpm.mom

This Page