kpm.rcstr

Reconstruct the target function, using different methods.

To do: –> implement fast cosine transform (FCT) algorithm –> create pure Python versions for all the algorithms –> implement fast Fourier transform (FFT) algorithm –> implement discrete Fourier transform (DFT) algorithm –> add VMKPM variants (given a mapping energy -> moment)

Functions

kpm.rcstr.select(string)

Select one of the reconstruction methods defined in this module by a given string. For example, this could be an option string from a command line option.

kpm.rcstr.all()

Return a list of all reconstruction methods defined in this module.

kpm.rcstr.std()

std(moments, disc=None, varmom=None, limits=None, omp=True, num_threads=None, out=None)

Reconstruct target function using the “naive” Chebychev series expansion. A user-defined x-axis discretization “disc” has to be specified.

This function only delegates the work to the corresponding low-level functions, all beginning with “_std_”. If no optimal low-level function is found for the given datatype, the plain Python implementation “_std” is used.

If “omp” is True, use available OpenMP-parallelized variants of the algorithms. If “num_threads” is not None, set the number of threads accordingly. If “num_threads” is smaller than 1, determine and use the number of processor cores.

If “varmom” is given, use a variable moments approach. “varmom” has to have the same shape as “disc”, specifying a truncation limit for each discretization step. The values of “varmom” must not be greater than the length of “moments”.

kpm.rcstr.dct(moments, ndisc=None, omp=True, num_threads=None, out=None)

Reconstruct target function using discrete cosine transformation. Use the function “disc.cosine(ndisc)” from the “disc” submodule with the same number of discretization steps “ndisc” like here to get the corresponding x-axis discretization, otherwise, the returned target function values are not valid.

This function only delegates the work to the corresponding low-level functions, all beginning with “_std_”. If no optimal low-level function is found for the given datatype, the plain Python implementation “_std” is used.

If “omp” is True, use available OpenMP-parallelized variants of the algorithms. If “num_threads” is not None, set the number of threads accordingly. If “num_threads” is smaller than 1, determine and use the number of processor cores.

kpm.rcstr.fct()

Use discrete cosine transform to reconstruct target function. Use “ndisc” discretization steps. If “ndisc” is None, set ndisc=2*limit, where limit is the number of moments (truncation limit). If out is None, return the results, otherwise save them to the given array.

This function uses scipy.fftpack.dct.

kpm.rcstr.dft()

Reconstruct target function using discrete fourier transform.

kpm.rcstr.fft()

Reconstruct target function using fast fourier transform algorithm.

Indices and tables

Table Of Contents

Previous topic

kpm.kern

Next topic

kpm.resc

This Page