3. Algorithm¶
SpM
program solves the linear equation with respect to for given .
Because of ill-conditioned nature of the matrix , a simple treatment of this equation is numerically unstable.
@@ -50,7 +50,7 @@
diff --git a/docs/manual/build/html/_sources/docs/tutorials.rst.txt b/docs/manual/build/html/_sources/docs/tutorials.rst.txt index 90bc55a..ad50101 100644 --- a/docs/manual/build/html/_sources/docs/tutorials.rst.txt +++ b/docs/manual/build/html/_sources/docs/tutorials.rst.txt @@ -206,6 +206,10 @@ The strength of the Gaussian noise is specified by ``g_sigma`` or the pair of `` The coefficient of the Pade weight, :math:`eta`, is specified by the ``PadeEta`` parameter. If ``PadeEta = 0``, the original SpM method will be used. +``param_spm.in`` and ``param_spmpade.in`` are input files for the SpM (:math:`\eta=0`) and SpM-Pade (:math:`\eta=1`) method, respectively. +Note that optimal :math:`\lambda` for the SpM and SpM-Pade differ, and hence users may need to change the range of :math:`lambda` (``lambdalogbegin`` and ``lambdalogend``). +The following figure shows the result: + .. 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. diff --git a/docs/manual/build/html/_static/basic.css b/docs/manual/build/html/_static/basic.css index aa9df31..24bc73e 100644 --- a/docs/manual/build/html/_static/basic.css +++ b/docs/manual/build/html/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -130,7 +130,7 @@ ul.search li a { font-weight: bold; } -ul.search li p.context { +ul.search li div.context { color: #888; margin: 2px 0 0 30px; text-align: left; @@ -277,25 +277,25 @@ p.rubric { font-weight: bold; } -img.align-left, figure.align-left, .figure.align-left, object.align-left { +img.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } -img.align-right, figure.align-right, .figure.align-right, object.align-right { +img.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } -img.align-center, figure.align-center, .figure.align-center, object.align-center { +img.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } -img.align-default, figure.align-default, .figure.align-default { +img.align-default, .figure.align-default { display: block; margin-left: auto; margin-right: auto; @@ -319,8 +319,7 @@ img.align-default, figure.align-default, .figure.align-default { /* -- sidebars -------------------------------------------------------------- */ -div.sidebar, -aside.sidebar { +div.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px; @@ -378,14 +377,12 @@ div.body p.centered { /* -- content of sidebars/topics/admonitions -------------------------------- */ div.sidebar > :last-child, -aside.sidebar > :last-child, div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; } div.sidebar::after, -aside.sidebar::after, div.topic::after, div.admonition::after, blockquote::after { @@ -458,22 +455,20 @@ td > :last-child { /* -- figures --------------------------------------------------------------- */ -div.figure, figure { +div.figure { margin: 0.5em; padding: 0.5em; } -div.figure p.caption, figcaption { +div.figure p.caption { padding: 0.3em; } -div.figure p.caption span.caption-number, -figcaption span.caption-number { +div.figure p.caption span.caption-number { font-style: italic; } -div.figure p.caption span.caption-text, -figcaption span.caption-text { +div.figure p.caption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ @@ -508,63 +503,6 @@ table.hlist td { vertical-align: top; } -/* -- object description styles --------------------------------------------- */ - -.sig { - font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; -} - -.sig-name, code.descname { - background-color: transparent; - font-weight: bold; -} - -.sig-name { - font-size: 1.1em; -} - -code.descname { - font-size: 1.2em; -} - -.sig-prename, code.descclassname { - background-color: transparent; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.sig-param.n { - font-style: italic; -} - -/* C++ specific styling */ - -.sig-inline.c-texpr, -.sig-inline.cpp-texpr { - font-family: unset; -} - -.sig.c .k, .sig.c .kt, -.sig.cpp .k, .sig.cpp .kt { - color: #0033B3; -} - -.sig.c .m, -.sig.cpp .m { - color: #1750EB; -} - -.sig.c .s, .sig.c .sc, -.sig.cpp .s, .sig.cpp .sc { - color: #067D17; -} - /* -- other body styles ----------------------------------------------------- */ @@ -691,6 +629,14 @@ dl.glossary dt { font-size: 1.1em; } +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + .versionmodified { font-style: italic; } @@ -818,13 +764,8 @@ div.code-block-caption code { } table.highlighttable td.linenos, -span.linenos, div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ - user-select: none; - -webkit-user-select: text; /* Safari fallback only */ - -webkit-user-select: none; /* Chrome/Safari */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* IE10+ */ + user-select: none; } div.code-block-caption span.caption-number { @@ -839,6 +780,16 @@ div.literal-block-wrapper { margin: 1em 0; } +code.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +code.descclassname { + background-color: transparent; +} + code.xref, a code { background-color: transparent; font-weight: bold; diff --git a/docs/manual/build/html/_static/doctools.js b/docs/manual/build/html/_static/doctools.js index 61ac9d2..daccd20 100644 --- a/docs/manual/build/html/_static/doctools.js +++ b/docs/manual/build/html/_static/doctools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for all documentation. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -29,14 +29,9 @@ if (!window.console || !console.firebug) { /** * small helper function to urldecode strings - * - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL */ jQuery.urldecode = function(x) { - if (!x) { - return x - } - return decodeURIComponent(x.replace(/\+/g, ' ')); + return decodeURIComponent(x).replace(/\+/g, ' '); }; /** @@ -290,10 +285,9 @@ var Documentation = { initOnKeyListeners: function() { $(document).keydown(function(event) { var activeElementType = document.activeElement.tagName; - // don't navigate when in search box, textarea, dropdown or button + // don't navigate when in search box or textarea if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' - && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey - && !event.shiftKey) { + && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) { switch (event.keyCode) { case 37: // left var prevHref = $('link[rel="prev"]').prop('href'); diff --git a/docs/manual/build/html/_static/pygments.css b/docs/manual/build/html/_static/pygments.css index 691aeb8..de7af26 100644 --- a/docs/manual/build/html/_static/pygments.css +++ b/docs/manual/build/html/_static/pygments.css @@ -1,7 +1,7 @@ pre { line-height: 125%; } -td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } +span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } +td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #eeffcc; } diff --git a/docs/manual/build/html/_static/searchtools.js b/docs/manual/build/html/_static/searchtools.js index e09f926..970d0d9 100644 --- a/docs/manual/build/html/_static/searchtools.js +++ b/docs/manual/build/html/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -59,10 +59,10 @@ var Search = { _pulse_status : -1, htmlToText : function(htmlString) { - var virtualDocument = document.implementation.createHTMLDocument('virtual'); - var htmlElement = $(htmlString, virtualDocument); - htmlElement.find('.headerlink').remove(); - docContent = htmlElement.find('[role=main]')[0]; + var htmlElement = document.createElement('span'); + htmlElement.innerHTML = htmlString; + $(htmlElement).find('.headerlink').remove(); + docContent = $(htmlElement).find('[role=main]')[0]; if(docContent === undefined) { console.warn("Content block not found. Sphinx search tries to obtain it " + "via '[role=main]'. Could you check your theme or template."); @@ -248,7 +248,7 @@ var Search = { // results left, load the summary and display it if (results.length) { var item = results.pop(); - var listItem = $('
'); + var listItem = $(''); var requestUrl = ""; var linkUrl = ""; if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') { @@ -273,9 +273,9 @@ var Search = { if (item[3]) { listItem.append($(' (' + item[3] + ')')); Search.output.append(listItem); - setTimeout(function() { + listItem.slideDown(5, function() { displayNextItem(); - }, 5); + }); } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { $.ajax({url: requestUrl, dataType: "text", @@ -285,16 +285,16 @@ var Search = { listItem.append(Search.makeSearchSummary(data, searchterms, hlterms)); } Search.output.append(listItem); - setTimeout(function() { + listItem.slideDown(5, function() { displayNextItem(); - }, 5); + }); }}); } else { // no source available, just display title Search.output.append(listItem); - setTimeout(function() { + listItem.slideDown(5, function() { displayNextItem(); - }, 5); + }); } } // search finished, update title and status message @@ -379,13 +379,6 @@ var Search = { return results; }, - /** - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions - */ - escapeRegExp : function(string) { - return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string - }, - /** * search for full-text terms in the index */ @@ -409,14 +402,13 @@ var Search = { ]; // add support for partial matches if (word.length > 2) { - var word_regex = this.escapeRegExp(word); for (var w in terms) { - if (w.match(word_regex) && !terms[word]) { + if (w.match(word) && !terms[word]) { _o.push({files: terms[w], score: Scorer.partialTerm}) } } for (var w in titleterms) { - if (w.match(word_regex) && !titleterms[word]) { + if (w.match(word) && !titleterms[word]) { _o.push({files: titleterms[w], score: Scorer.partialTitle}) } } @@ -509,7 +501,7 @@ var Search = { var excerpt = ((start > 0) ? '...' : '') + $.trim(text.substr(start, 240)) + ((start + 240 - text.length) ? '...' : ''); - var rv = $('').text(excerpt); + var rv = $('').text(excerpt); $.each(hlwords, function() { rv = rv.highlightText(this, 'highlighted'); }); diff --git a/docs/manual/build/html/_static/underscore.js b/docs/manual/build/html/_static/underscore.js index cf177d4..5b55f32 100644 --- a/docs/manual/build/html/_static/underscore.js +++ b/docs/manual/build/html/_static/underscore.js @@ -1,6 +1,31 @@ -!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){ -// Underscore.js 1.13.1 -// https://underscorejs.org -// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;uSpM
program solves the linear equation with respect to for given .
Because of ill-conditioned nature of the matrix , a simple treatment of this equation is numerically unstable.
@@ -50,7 +50,7 @@
In this chapter, the calculation flow in SpM is shown.
-The main function for SpM is defined in G2spectrum.cpp and the calculation is done by following procedures.
@@ -134,12 +134,12 @@to be updated…
- - +Parameter file (param.in)
Stable version
@@ -59,8 +59,8 @@spm.src
.
First, create an empty directory and move into it:
spm.build/src
directory.
Some sample data are provided for test calculations.
Just enter into samples/fermion
directory and execute it by
SpM.out
) according to your environment.
If succeeded, results including graphs in EPS format are generated in output
directory.
For details of the sample script, see Tutorials.
-
-
+After computation is done, numerical results are stored in directory output
.
output
├── spectrum.dat
@@ -65,8 +65,8 @@ 6.1. List of filesThe four files just below the output directory summarize the results.
More detailed results for a given value lambda are stored in directory lambda_*
In particular, the directory lambda_opt
is for the optimal values of lambda, and the other directories ending with numbers, e.g. lambda_1.00e+00
, contain results for the specific value of lambda.
-
-
+
Each files stores list of real numbers separated with a white space. Some comments may be given at the header of files (lines beginning with ‘#’).
@@ -270,8 +270,8 @@Sample data are provided both for fermionic and bosonic cases:
@@ -43,10 +43,10 @@
samples/boson
# a sample for bosonic spectrum
Here, an explanation is given for the fermionic case (samples/fermion
).
User can execute all the steps explained below using a single script file run.sh
.
Edit some variables in the top of the script (explained later) and then run the script by
The fist one must be modified, at least, before running.
-In the directory samples/fermion/
, just type the command
$ build_directory/src/SpM.out param.in
Results are stored as ordinary text format in output
directory.
See Output files for details of each file.
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.
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.
@@ -200,11 +200,14 @@filein_Gsigma
and column_sigma
parameters (see Input files for details).
The coefficient of the Pade weight, , is specified by the PadeEta
parameter.
If PadeEta = 0
, the original SpM method will be used.
+param_spm.in
and param_spmpade.in
are input files for the SpM () and SpM-Pade () method, respectively.
+Note that optimal for the SpM and SpM-Pade differ, and hence users may need to change the range of (lambdalogbegin
and lambdalogend
).
+The following figure shows the result:
The blue curve and red curve show the spectrum reconstructed by the SpM method () and the SpM-Pade method (), respectively. The black dashed curve shows the exact spectrum.
- - +This is a documentation of Sparse Modeling (SpM) tool for analytical continuation.
-A sparse-modeling tool for computing the spectral function from the imaginary-time Green function. It removes statistical errors in quantum Monte Carlo data, and performs a stable analytical continuation. The obtained spectral function fulfills the non-negativity and the sum rule. The computation is fast and free from tuning parameters.
- -This package is distributed under GNU General Public License version 3 (GPL v3).
When you publish a publication that includes results obtained using this package, @@ -67,8 +67,8 @@
@@ -45,26 +44,19 @@
Searching for multiple words only shows matches that contain all words.
- - - -