4. Calculation flow

In this chapter, the calculation flow in SpM is shown.

4.1. Overview of calculation flow

The main function for SpM is defined in G2spectrum.cpp and the calculation is done by following procedures.

blockdiag Set initial condition Solve equation Output results
  1. Set initial condition

    blockdiag Read parameters Read Gtau Make a kernel
    • Read parameters (ReadParam function in set_initial.cpp).

    • Read Gtau (read_Gtau function in G2spectrum.cpp).

    • Make a kernel (mesh_linear, mesh_log and MakeKernelLinear functions in kernel.cpp).

  2. Solve equation

    blockdiag Set parameters Solve equation by ADMM method Get results
    • Set parameters (SetParameters and SetFlags functions in spm_core.cpp).

    • Solve equation by ADMM method (SolveEquation function in spm_core.cpp).

    • Get results (GetSpectrum and GetResults functions in spm_core.cpp)

  3. Output results

    This procedure is directly implemented in G2spectrum.cpp.

4.2. Sparse modeling procedure

to be updated…