Core
Provide basic user's interfaces for the ACTest toolkit.
Contents
Index
ACTest.make_data
ACTest.make_data_std
ACTest.make_green
ACTest.make_grid
ACTest.make_kernel
ACTest.make_mesh
ACTest.make_peak
ACTest.make_spectrum
ACTest.read_param
ACTest.reprod
ACTest.setup_param
Parameters
ACTest.setup_param
— Functionsetup_param(C::Dict{String,Any}, reset::Bool = true)
Setup the configuration dictionaries via function call. Here C
contains parameters for general setup. If reset
is true, then the configuration dictionaries will be reset to their default values at first. Later, C
will be used to customized the dictionaries further.
Arguments
See above explanations.
Returns
N/A
See also: read_param
.
ACTest.read_param
— Functionread_param()
Setup the configuration dictionaries via an external file. The valid format of a configuration file is toml
.
Arguments
N/A
Returns
N/A
See also: setup_param
.
Data
ACTest.make_data_std
— Functionmake_data_std()
Try to build a standard dataset (ACT100
), which contains 100 typical spectral functions and the corresponding correlation functions. These spectral functions are defined in src/dataset.jl
. Please use the script util/acstd.jl
to do this job.
Arguments
N/A
Returns
N/A
ACTest.make_data
— Functionmake_data()
Try to generate spectral functions and the corresponding Green's functions.
Arguments
N/A
Returns
N/A
ACTest.make_peak
— Functionmake_peak(rng::AbstractRNG)
Generate peak to build the final spectral function.
Arguments
- rng -> Random number generator.
Returns
- 𝑝 -> A Peak struct (subtype of AbstractPeak).
See also: AbstractPeak
.
ACTest.make_spectrum
— Functionmake_spectrum(rng::AbstractRNG, mesh::AbstractMesh)
Generate a spectral function randomly at given mesh.
Arguments
- rng -> Random number generator.
- mesh -> Real frequency mesh, ω.
Returns
- sf -> A SpectralFunction struct.
See also: make_data
.
make_spectrum(
mesh::AbstractMesh,
pv::Vector{<:AbstractPeak},
sv::Vector{F64}
)
Generate a spectral function with given peaks and signs at given mesh.
Arguments
- mesh -> Real frequency mesh, ω.
- pv -> List of peaks.
- sv -> List of signs.
Returns
- sf -> A SpectralFunction struct.
See also: make_data_std
.
ACTest.make_green
— Functionmake_green(
rng::AbstractRNG,
sf::SpectralFunction,
kernel::Matrix{F64},
grid::AbstractGrid
)
For given spectral function A and kernel matrix K, try to generate the corresponding correlation function G (note that G ≡ KA).
Arguments
- rng -> Random number generator.
- sf -> A SpectralFunction struct, A(ω).
- kernel -> Kernel matrix.
- grid -> Grid for correlation function.
Returns
- gf -> A GreenFunction struct.
Grids
ACTest.make_grid
— Functionmake_grid(_grid = nothing)
To generate imaginary time grid or Masubara grid for many-body correlator. It will return a sub-type of the AbstractGrid struct.
Arguments
- _grid -> If it is present, we should use it to setup grid.
Returns
- grid -> Imaginary time or imaginary frequency grid.
See also: AbstractGrid
.
Meshes
ACTest.make_mesh
— Functionmake_mesh(_ktype = nothing, _mesh = nothing)
Try to generate an uniform (linear) or non-uniform (non-linear) mesh for the spectral function in real axis.
Arguments
- _ktype -> If it is present, we should use it to setup ktype.
- _mesh -> If it is present, we should use it to setup mesh.
Returns
- mesh -> Real frequency mesh. It should be a subtype of AbstractMesh.
See also: LinearMesh
, TangentMesh
, LorentzMesh
.
Kernels
ACTest.make_kernel
— Functionmake_kernel(am::AbstractMesh, ag::AbstractGrid)
Try to generate various kernel functions.
Arguments
- am -> Real frequency mesh.
- ag -> Imaginary axis grid.
Returns
- kernel -> Kernel function, a 2D array, (ntime,nmesh) or (nfreq,nmesh).
See also: AbstractMesh
, AbstractGrid
.
Postprocessing
ACTest.reprod
— Functionreprod(am::AbstractMesh, kernel::Matrix{F64}, A::Vector{F64})
Try to reproduce the input data, which can be compared with the raw data to see whether the analytic continuation is reasonable.
Arguments
- am -> Real frequency mesh.
- kernel -> The kernel function.
- A -> The calculated spectral function, A(ω).
Returns
- G -> Reconstructed correlators, G(τ) or G(iωₙ), Vector{F64}.
See also: AbstractMesh
.