Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Sep 19, 2021
1 parent f1593a6 commit f8d7fe6
Show file tree
Hide file tree
Showing 226 changed files with 1,294 additions and 40,005 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
47 changes: 38 additions & 9 deletions docs/manual/build/html/_sources/docs/inputfile.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,38 @@
Input files
===============================
1. Parameter file (param.in)

The variables for which default value is not given are mandatory.

- The format of the parameter file is the "name = value" pair format.

- ``#`` means a comment. In other words, a ``#`` character and the subsequent part in a line will be ignored.

- A blank line is skipped.

- The variables for which default value is not given are mandatory.

.. code-block::
# character means comment
statistics = "fermion" # stats.
beta = 100.0 # inv. temp.
### continued ###
* INPUT/OUTPUT

.. csv-table::
:header-rows: 1
:widths: 1,1,2,4

Name, Type, Default value, Description
statistics, String, ---, Choose "fermion" or "boson".
beta, Double, ---, The inverse temperature
filein_G, String, Gtau.in, The name of an input file for Green's function.
column, Integer, 1, The column number where the values of G(tau) are stored in the filein_G file.
fileout_spec, String, spectrum.out, The name of output file of spectrum.
Name, Type, Default value, Description
statistics, String, ---, Choose "fermion" or "boson".
beta, Double, ---, The inverse temperature
filein_G, String, Gtau.in, The name of an input file for Green's function.
column, Integer, 1, The column number where the values of G(tau) are stored in the ``filein_G file``.
fileout_spec, String, spectrum.out, The name of output file of spectrum.
fileout_pade, String, pade.out, The name of output file of spectrum calculated by the Pade approximant.


* OMEGA
Expand Down Expand Up @@ -66,6 +82,19 @@ The variables for which default value is not given are mandatory.
maxiteration, Integer,1000, The maximum number of iterations.
printlevel, Integer,2, "0; minimum, 1; moderate, 2; verbose."

* SpM-Pade

.. csv-table::
:header-rows: 1
:widths: 1,1,2,4

Name, Type, Default value, Description
PadeEta, Double, 0.0, The weight of the spectrum by the Pade approximant.
filein_Gsigma, String, Gtau.in, The name of input file for errors of Green's function.
column_sigma, Integer, 1, The column number where the errors of G(tau) are stored in the ``filein_Gsigma`` file.
g_sigma, Double, inf, "The errors of G(tau). If this is inf (default value), the errors will be loaded from a file specified by ``filein_Gsigma``."
NSamplePade, Integer, 30, The number of random samples (with noise) will be used to calculate the expected value and the standard deviation of the spectrum by the Pade approximant.

2. Green's function (Gtau.in)

In SPM, the values of Green's function is only used for calculation,
Expand Down
45 changes: 28 additions & 17 deletions docs/manual/build/html/_sources/docs/outputfile.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ List of files

output
├── spectrum.dat
├── pade.dat
├── lambda_dep.dat
├── find_lambda_opt.dat
├── SV.dat
Expand Down Expand Up @@ -54,7 +55,7 @@ Some comments may be given at the header of files (lines beginning with '#').
* 1st column: :math:`\omega_i`
* 2nd column: :math:`\rho(\omega_i)`

ex.) calculated results for fermion sample outputted as ``samles/fermion/spectrum.dat``.
ex.) calculated results for fermion sample outputted as ``samples/fermion/output/spectrum.dat``.

::

Expand All @@ -64,37 +65,47 @@ Some comments may be given at the header of files (lines beginning with '#').
-3.98400e+00 0.00000e+00
-3.97600e+00 0.00000e+00

* *spectrum.dat*

Real frequency spectrum :math:`\rho(\omega)` calculated by the Pade approximant.

* 1st column: :math:`\omega_i`
* 2nd column: :math:`\rho(\omega_i)` from G(tau) in ``filein_G``.
* 3rd column: The expectation value of :math:`\rho(\omega_i)` over the generated ``NSamplePade`` samples with independent noise.
* 4th column: The sample standard deviation of :math:`\rho(\omega_i)` over the generated ``NsamplePade`` samples with independent noise.

* *lambda_dep.dat*

Several quantities as a function of lambda.

* 1st column: :math:`\lambda`
* 2nd column: Square error in the SV basis, :math:`\| \bm{y}'-S\bm{x}' \|_2^2` (the first term in :math:`F`)
* 3rd column: Square error computed in the original basis, :math:`\| \bm{y}-K\bm{x} \|_2^2`
* 4th column: L1 norm of :math:`\bm{x}'`, :math:`\| \bm{x}' \|_1` (the second term in :math:`F`)
* 5th column: not used
* 4th column: L0 norm of :math:`\bm{x}'`, :math:`\| \bm{x}' \|_0` (the number of non-zero components in :math:`\bm{x}'`)
* 5th column: L1 norm of :math:`\bm{x}'`, :math:`\| \bm{x}' \|_1` (the second term in :math:`F`)
* 6th column: not used

ex.) calculated results for fermion sample outputted as ``samles/fermion/lambda_dep.dat``.
ex.) calculated results for fermion sample outputted as ``samples/fermion/output/lambda_dep.dat``.

::

1.00000e+02 1.09110e-01 1.13080e-01 4.81361e-02 0.00000e+00
6.30957e+01 1.08854e-01 1.12824e-01 4.81376e-02 0.00000e+00
3.98107e+01 1.08752e-01 1.12722e-01 4.81386e-02 0.00000e+00
2.51189e+01 1.08710e-01 1.12679e-01 4.81394e-02 0.00000e+00
1.58489e+01 1.08609e-01 1.12578e-01 4.81459e-02 0.00000e+00
1.00000e+02 1.09110e-01 1.13080e-01 2 4.81361e-02 0.00000e+00
6.30957e+01 1.08854e-01 1.12824e-01 2 4.81376e-02 0.00000e+00
3.98107e+01 1.08752e-01 1.12722e-01 2 4.81386e-02 0.00000e+00
2.51189e+01 1.08710e-01 1.12679e-01 2 4.81394e-02 0.00000e+00
1.58489e+01 1.08609e-01 1.12578e-01 2 4.81459e-02 0.00000e+00


* *find_lambda_opt.dat*

Auxiliary data that are used to determine the optimal value of lambda. See ref.?? for details.
Auxiliary data that are used to determine the optimal value of lambda. See our original paper `Phys. Rev. E 95, 061302(R) (2017) <https://doi.org/10.1103/PhysRevE.95.061302>`_ for details.

* 1st column: :math:`\log_{10}(\lambda)`
* 2nd column: :math:`\log_{10}(f(x)/\chi^2)`
* 3rd column: :math:`\log_{10}(\chi^2)`
* 4th column: :math:`\log_{10}(f(x))`

ex.) calculated results for fermion sample outputted as ``samles/fermion/find_lambda_opt.dat``.
ex.) calculated results for fermion sample outputted as ``samples/fermion/output/find_lambda_opt.dat``.

::

Expand All @@ -111,7 +122,7 @@ Some comments may be given at the header of files (lines beginning with '#').
* 1st column: index :math:`l` (starting from 0)
* 2nd column: The singular value :math:`S_l` in descending order

ex.) calculated results for fermion sample outputted as ``samles/fermion/find_lambda_opt.dat``.
ex.) calculated results for fermion sample outputted as ``samples/fermion/output/SV.dat``.

::

Expand All @@ -138,7 +149,7 @@ Some comments may be given at the header of files (lines beginning with '#').
* 9th column: sum of spectrum, :math:`\langle V\bm{x}' \rangle`
* 10th column: negative weight in the spectrum :math:`V\bm{x}'`

ex.) calculated results for fermion sample outputted as ``samles/fermion/lambda_opt/iter.dat``.
ex.) calculated results for fermion sample outputted as ``samples/fermion/output/lambda_opt/iter.dat``.

::

Expand All @@ -157,7 +168,7 @@ Some comments may be given at the header of files (lines beginning with '#').
* 3rd column: :math:`z'_l` (**must be sparse**)
* 4th column: :math:`V^{\rm t}\bm{z}`

ex.) calculated results for fermion sample outputted as ``samles/fermion/lambda_opt/x_sv.dat``.
ex.) calculated results for fermion sample outputted as ``samples/fermion/output/lambda_opt/x_sv.dat``.

::

Expand All @@ -177,7 +188,7 @@ Some comments may be given at the header of files (lines beginning with '#').
* 3rd column: :math:`V\bm{z}'` (final result for a given lambda when non-negativity is not imposed)
* 4th column: :math:`\bm{z}` (**final result** for a given lambda when non-negativity is imposed)

ex.) calculated results for fermion sample outputted as ``samles/fermion/lambda_opt/x_tw.dat``.
ex.) calculated results for fermion sample outputted as ``samples/fermion/output/lambda_opt/x_tw.dat``.

::

Expand All @@ -197,7 +208,7 @@ Some comments may be given at the header of files (lines beginning with '#').
* 3rd column: :math:`S\bm{x}'`
* 4th column: :math:`S\bm{z}'`

ex.) calculated results for fermion sample outputted as ``samles/fermion/lambda_opt/y_sv.dat``.
ex.) calculated results for fermion sample outputted as ``samples/fermion/output/lambda_opt/y_sv.dat``.

::

Expand All @@ -216,7 +227,7 @@ Some comments may be given at the header of files (lines beginning with '#').
* 3rd column: :math:`U S \bm{x}'`
* 4th column: :math:`U S \bm{z}'`

ex.) calculated results for fermion sample outputted as ``samles/fermion/lambda_opt/y_tw.dat``.
ex.) calculated results for fermion sample outputted as ``samples/fermion/output/lambda_opt/y_tw.dat``.

::

Expand Down
49 changes: 46 additions & 3 deletions docs/manual/build/html/_sources/docs/tutorials.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ Tutorials

Sample data are provided both for fermionic and bosonic cases:

- ``samples/fermion`` # a sample for fermionic spectrum (data in the article)
- ``samples/fermion`` # a sample for fermionic spectrum (data in the SpM article)
- ``samples/fermion_twopeak`` # another sample for fermionic spectrum (data in the SpM-Pade article)
- ``samples/boson`` # a sample for bosonic spectrum

Here, an explanation is given for the fermionic case.

Fermionic system
~~~~~~~~~~~~~~~~~

Here, an explanation is given for the fermionic case (``samples/fermion``).

Script
----------------------------------
Expand Down Expand Up @@ -103,7 +108,7 @@ In the directory ``samples/fermion/``, just type the command

::

$ build_directory/src/SpM.out -i param.in
$ build_directory/src/SpM.out param.in

Results
-------
Expand Down Expand Up @@ -167,3 +172,41 @@ Let us look at some graphs below.

The light blue points show the input data :math:`G'_l` transformed into the SVD basis, and red circles are data used in computing :math:`\rho(\omega)` above.
The blue points show, for comparison, the exact :math:`G'_l` without noise, which is provided in the file ``Gtau.in.sv_basis`` (not output of the ``SpM`` program).


Bosonic system
~~~~~~~~~~~~~~~~~~~

Sample files are available at ``samples/boson``.

Users can deal with a bosonic system by only changing ``statistics`` parameter to ``"boson"`` from ``"fermion"`` in the parameter file.


SpM-Pade method
~~~~~~~~~~~~~~~~~

Sample files are available at ``samples/fermion_twopeak``.

The SpM-Pade method is another SpM AC method, where unphysical oscillation in the SpM spectrum is reduced by using spectra reconstructed by the Pade AC method.

The cost function is

.. math::
L_\text{SpM-Pade}(\boldsymbol{\rho}) = L_\text{SpM}(\boldsymbol{\rho}) + \frac{\eta}{2} \sum_i w_i \left(\rho(\omega_i) - \rho^\text{Pade}(\omega_i)\right)^2,
where

.. math::
w_i = \left(1.0 + \left(\frac{\sigma^\text{Pade}(\omega_i)}{\rho^\text{Pade}(\omega_i)}\right)^2\right)^{-1}
and :math:`\rho^\text{Pade}(\omega_i)` and :math:`\sigma^\text{Pade}(\omega_i)` are the expectation value and standard deviation of the spectrum reconstructed by the Pade AC method from ``NSamplePade`` Green's functions with independent Gaussian noise.
The strength of the Gaussian noise is specified by ``g_sigma`` or the pair of ``filein_Gsigma`` and ``column_sigma`` parameters (see :ref:`inputfiles` for details).
The coefficient of the Pade weight, :math:`eta`, is specified by the ``PadeEta`` parameter.
If ``PadeEta = 0``, the original SpM method will be used.

.. image:: figs/spectrum_spmpade.png

The blue curve and red curve show the spectrum reconstructed by the SpM method (:math:`\eta=0`) and the SpM-Pade method (:math:`\eta=1`), respectively.
The black dashed curve shows the exact spectrum.
23 changes: 18 additions & 5 deletions docs/manual/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,26 @@ License
--------------
This package is distributed under GNU General Public License version 3 (GPL v3).

We kindly ask you to cite the article
When you publish a publication that includes results obtained using this package,
we kindly ask you to cite the following articles

J. Otsuki, M. Ohzeki, H. Shinaoka, K. Yoshimi,
"*Sparse modeling approach to analytical continuation of imaginary-time quantum Monte Carlo data*"
`Phys. Rev. E 95, 061302(R) (2017) <https://doi.org/10.1103/PhysRevE.95.061302>`_.
- SpM method

in publications that includes results obtained using this package.
J. Otsuki, M. Ohzeki, H. Shinaoka, K. Yoshimi,
"*Sparse modeling approach to analytical continuation of imaginary-time quantum Monte Carlo data*"
`Phys. Rev. E 95, 061302(R) (2017) <https://doi.org/10.1103/PhysRevE.95.061302>`_.

- SpM package

K. Yoshimi, J. Otsuki, Y. Motoyama, M. Ohzeki, and H. Shinaoka,
"*SpM: Sparse modeling tool for analytic continuation of imaginary-time Green’s function*"
`Comput. Phys. Commun. 244, 319-323 (2019) <https://www.sciencedirect.com/science/article/abs/pii/S0010465519302103>`_.

- SpM-Pade method (if you use)

Y. Motoyama, K. Yoshimi, and J. Otsuki,
"*Robust analytic continuation combining the advantages of the sparse modeling approach and Pade approximation*",
arXiv:2109.XXXXX.


Contents
Expand Down
Binary file removed docs/manual/build/html/_static/ajax-loader.gif
Diff not rendered.
Loading

0 comments on commit f8d7fe6

Please sign in to comment.