Skip to content

Commit

Permalink
Docu updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsht committed Jul 14, 2023
1 parent 0ef7ad4 commit 06a91dd
Show file tree
Hide file tree
Showing 17 changed files with 291 additions and 4 deletions.
Binary file added img/0eugcbgadj6yz.pdf
Binary file not shown.
Binary file added img/0fr2yhbgg9nsx.pdf
Binary file not shown.
Binary file added img/0uw74idqq2ilw.pdf
Binary file not shown.
Binary file added img/1ftg3ucp91fwc.pdf
Binary file not shown.
Binary file added img/1klto42084vx8.pdf
Binary file not shown.
Binary file added img/1ne6vpix78l6i.pdf
Binary file not shown.
Binary file added img/1p1tg4rvundxc.pdf
Binary file not shown.
5 changes: 4 additions & 1 deletion includes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ \chapter{Useful information}
\subfile{pages/Cite.tex}
\subfile{pages/Install.tex}
\subfile{pages/TensorReductionWithFermat.tex}
\subfile{pages/PSDUsageExamples.tex}

\chapter{Generic functions}
\chapter{Generic functions and symbols}

\subfile{pages/FeynHelpersHowToCite.tex}
\subfile{pages/DollarFeynHelpersDirectory.tex}
\subfile{pages/DollarFeynHelpersLastCommitDateHash.tex}
\subfile{pages/DollarFeynHelpersLoadInterfaces.tex}
\subfile{pages/DollarFeynHelpersVersion.tex}

Expand Down Expand Up @@ -188,6 +190,7 @@ \chapter{pySecDec interface}
\subfile{pages/PSDCreatePythonScripts.tex}
\subfile{pages/PSDIntegrate.tex}
\subfile{pages/PSDLoopIntegralFromPropagators.tex}
\subfile{pages/PSDLoadNumericalResults.tex}
\subfile{pages/PSDLoopPackage.tex}
\subfile{pages/PSDLoopRegions.tex}
\subfile{pages/PSDSumPackage.tex}
Expand Down
31 changes: 31 additions & 0 deletions pages/DollarFeynHelpersLastCommitDateHash.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
% !TeX program = pdflatex
% !TeX root = DollarFeynHelpersLastCommitDateHash.tex

\documentclass[../FeynHelpersManual.tex]{subfiles}
\begin{document}
\FloatBarrier
\begin{figure}[!ht]
\centering
\includegraphics[width=0.6\linewidth]{img/0fr2yhbgg9nsx.pdf}
\end{figure}
\FloatBarrier

\begin{Shaded}
\begin{Highlighting}[]

\end{Highlighting}
\end{Shaded}

\hypertarget{dollarfeynhelperslastcommitdatehash}{
\section{\$FeynHelpersLastCommitDateHash}\label{dollarfeynhelperslastcommitdatehash}\index{\$FeynHelpersLastCommitDateHash}}

The setting of \texttt{\$FeynHelpersLastCommitDateHash} provides the
date and the hash of the last commit in the branch from which the
current FeynHelpers version originates.

\subsection{See also}

\hyperlink{toc}{Overview}

\subsection{Examples}
\end{document}
13 changes: 13 additions & 0 deletions pages/FIREBinaryPath.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@

\documentclass[../FeynHelpersManual.tex]{subfiles}
\begin{document}
\FloatBarrier
\begin{figure}[!ht]
\centering
\includegraphics[width=0.6\linewidth]{img/1klto42084vx8.pdf}
\end{figure}
\FloatBarrier

\begin{Shaded}
\begin{Highlighting}[]

\end{Highlighting}
\end{Shaded}

\hypertarget{firebinarypath}{
\section{FIREBinaryPath}\label{firebinarypath}\index{FIREBinaryPath}}

Expand Down
11 changes: 9 additions & 2 deletions pages/FeynHelpers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ \section{Useful information}\label{useful information}\index{Useful information}
\hyperlink{install}{Install}
\item
\hyperlink{tensorreductionwithfermat}{TensorReductionWithFermat}
\item
\hyperlink{psdusageexamples}{PSDUsageExamples} - a small tutorial on
using the pySecDec interface
\end{itemize}

\hypertarget{generic functions}{
\section{Generic functions}\label{generic functions}\index{Generic functions}}
\hypertarget{generic functions and symbols}{
\section{Generic functions and symbols}\label{generic functions and symbols}\index{Generic functions and symbols}}

\begin{itemize}
\tightlist
Expand All @@ -30,6 +33,7 @@ \section{Generic functions}\label{generic functions}\index{Generic functions}}
references to be cited when using FeynHelpers
\item
\hyperlink{../dollarfeynhelpersdirectory}{../\$FeynHelpersDirectory},
\hyperlink{../dollarfeynhelperslastcommitdatehash}{../\$FeynHelpersLastCommitDateHash},
\hyperlink{../dollarfeynhelpersloadinterfaces}{../\$FeynHelpersLoadInterfaces},
\hyperlink{../dollarfeynhelpersversion}{../\$FeynHelpersVersion} -
global variables needed for the proper functioning of FeynHelpers
Expand Down Expand Up @@ -313,6 +317,9 @@ \section{pySecDec interface}\label{pysecdec interface}\index{pySecDec interface}
\hyperlink{../psdloopintegralfrompropagators}{../PSDLoopIntegralFromPropagators}
- converts the given loop integral into input for pySecDec's
\texttt{LoopIntegralFromPropagators}
\item
\hyperlink{../psdloadnumericalresults}{../PSDLoadNumericalResults} -
loads the numerical result from pySecDec
\item
\hyperlink{../psdlooppackage}{../PSDLoopPackage} - creates input for
pySecDec's \texttt{loop_package}
Expand Down
9 changes: 9 additions & 0 deletions pages/KiraGetRS.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

\documentclass[../FeynHelpersManual.tex]{subfiles}
\begin{document}
\FloatBarrier
\begin{figure}[!ht]
\centering
\includegraphics[width=0.6\linewidth]{img/0eugcbgadj6yz.pdf}
\end{figure}
\FloatBarrier

\begin{Shaded}
\begin{Highlighting}[]

Expand Down Expand Up @@ -40,6 +47,8 @@ \subsection{See also}
\hyperlink{toc}{Overview}, \hyperlink{kiralabelsector}{KiraLabelSector},
\hyperlink{kiracreatejobfile}{KiraCreateJobFile}.

\subsection{Examples}

\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{KiraGetRS}\OperatorTok{[\{}\NormalTok{GLI}\OperatorTok{[}\NormalTok{topo1}\OperatorTok{,} \OperatorTok{\{}\DecValTok{1}\OperatorTok{,} \DecValTok{1}\OperatorTok{,} \DecValTok{1}\OperatorTok{,} \DecValTok{1}\OperatorTok{\}],}\NormalTok{ GLI}\OperatorTok{[}\NormalTok{topo1}\OperatorTok{,} \OperatorTok{\{}\DecValTok{2}\OperatorTok{,} \DecValTok{1}\OperatorTok{,} \DecValTok{2}\OperatorTok{,} \DecValTok{1}\OperatorTok{\}],}
Expand Down
15 changes: 14 additions & 1 deletion pages/PSDCreatePythonScripts.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@

\documentclass[../FeynHelpersManual.tex]{subfiles}
\begin{document}
\FloatBarrier
\begin{figure}[!ht]
\centering
\includegraphics[width=0.6\linewidth]{img/0uw74idqq2ilw.pdf}
\end{figure}
\FloatBarrier

\begin{Shaded}
\begin{Highlighting}[]

\end{Highlighting}
\end{Shaded}

\hypertarget{psdcreatepythonscripts}{
\section{PSDCreatePythonScripts}\label{psdcreatepythonscripts}\index{PSDCreatePythonScripts}}

Expand Down Expand Up @@ -47,7 +60,7 @@ \section{PSDCreatePythonScripts}\label{psdcreatepythonscripts}\index{PSDCreatePy
use \texttt{qq}, \texttt{m}, \texttt{m2}, \texttt{M} etc. but not
something like
\texttt{Pair[\allowbreak{}Momentum[\allowbreak{}q],\ \allowbreak{}Momentum[\allowbreak{}q]]},
\texttt{mass[\allowbreak{}2]}, or\texttt{sp[\allowbreak{}"p.q"]}. This
\texttt{mass[\allowbreak{}2]}, or \texttt{sp[\allowbreak{}"p.q"]}. This
means that you need to replace scalar products of external momenta that
appear in your integrals with some simple symbols. If this has not been
done on the level of replacement rules attached to your
Expand Down
69 changes: 69 additions & 0 deletions pages/PSDLoadNumericalResults.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
% !TeX program = pdflatex
% !TeX root = PSDLoadNumericalResults.tex

\documentclass[../FeynHelpersManual.tex]{subfiles}
\begin{document}
\FloatBarrier
\begin{figure}[!ht]
\centering
\includegraphics[width=0.6\linewidth]{img/1ftg3ucp91fwc.pdf}
\end{figure}
\FloatBarrier

\begin{Shaded}
\begin{Highlighting}[]

\end{Highlighting}
\end{Shaded}

\hypertarget{psdloadnumericalresults}{
\section{PSDLoadNumericalResults}\label{psdloadnumericalresults}\index{PSDLoadNumericalResults}}

\texttt{PSDLoadNumericalResults[\allowbreak{}files]} is a simple
function that loads numerical results generated by the pySecDec script
\texttt{integrate__int.py} into Mathematica. The argument \texttt{files}
is the output of \texttt{PSDCreatePythonScripts} that contains the full
paths to \texttt{generate_int.py} and \texttt{integrate_int.py}.

Furthermore, the function requires the options
\texttt{PSDComplexParameterRules} and \texttt{PSDRealParameterRules}
that must be assigned exactly the same values that were used when
evaluating PSDCreatePythonScripts. From this information the function
will recover the full path to the \texttt{numres_*_mma.m} file and load
it.

The options \texttt{Normal} (set to \texttt{True} by default) and
\texttt{Chop} (set to \texttt{10^(-10)} by default) tell the function to
convert the expression from \texttt{SeriesData} to a polynomial and to
remove numerical artefacts.

The output for each integral is a list containing two entries. The first
entry is the numerical result, while the second one provides numerical
errors.

\subsection{See also}

\hyperlink{toc}{Overview},
\hyperlink{psdcreatepythonscripts}{PSDCreatePythonScripts}.

\subsection{Examples}

\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{files }\ExtensionTok{=} \OperatorTok{\{}
\FunctionTok{FileNameJoin}\OperatorTok{[\{}\NormalTok{$FeynHelpersDirectory}\OperatorTok{,} \StringTok{"Documentation"}\OperatorTok{,} \StringTok{"Examples"}\OperatorTok{,} \StringTok{"prop1LX11"}\OperatorTok{,} \StringTok{"integrate\_int.py"}\OperatorTok{\}],}
\FunctionTok{FileNameJoin}\OperatorTok{[\{}\NormalTok{$FeynHelpersDirectory}\OperatorTok{,} \StringTok{"Documentation"}\OperatorTok{,} \StringTok{"Examples"}\OperatorTok{,} \StringTok{"prop1LX11"}\OperatorTok{,} \StringTok{"generate\_int.py"}\OperatorTok{\}]\}}\NormalTok{;}
\end{Highlighting}
\end{Shaded}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{FCCompareNumbers}\OperatorTok{[}\NormalTok{PSDLoadNumericalResults}\OperatorTok{[}\NormalTok{files}\OperatorTok{,}\NormalTok{ PSDRealParameterRules }\OtherTok{{-}\textgreater{}} \OperatorTok{\{}\NormalTok{qq }\OtherTok{{-}\textgreater{}} \FloatTok{1.} \OperatorTok{,}\NormalTok{ m1 }\OtherTok{{-}\textgreater{}} \FloatTok{2.} \OperatorTok{,}\NormalTok{ m2 }\OtherTok{{-}\textgreater{}} \FloatTok{3.}\OperatorTok{\}],}
\OperatorTok{\{}\SpecialCharTok{{-}}\FloatTok{1.819085009768877} \SpecialCharTok{+}\NormalTok{ eps}\SpecialCharTok{\^{}}\NormalTok{(}\SpecialCharTok{{-}}\DecValTok{1}\NormalTok{)}\OperatorTok{,} \DecValTok{0}\OperatorTok{\},}\NormalTok{ FCVerbose }\OtherTok{{-}\textgreater{}} \SpecialCharTok{{-}}\DecValTok{1}\OperatorTok{]}
\end{Highlighting}
\end{Shaded}
\begin{dmath*}\breakingcomma
\{0,0\}
\end{dmath*}
\end{document}
116 changes: 116 additions & 0 deletions pages/PSDUsageExamples.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
% !TeX program = pdflatex
% !TeX root = PSDUsageExamples.tex

\documentclass[../FeynHelpersManual.tex]{subfiles}
\begin{document}
\hypertarget{pysecdec usage examples}{
\section{pySecDec usage examples}\label{pysecdec usage examples}\index{pySecDec usage examples}}

The main idea behind the FeynHelpers interface to pySecDec is to
facilitate the generation of pySecDec scripts for integrals written in
the FeynCalc notation (i.e.~as \texttt{GLI}s with the corresponding
lists of \texttt{FCTopology} symbols).

The main high-level function of this interface is called
\texttt{PSDCreatePythonScripts}. In the simplest case we need two
provide following arguments and options

\begin{itemize}
\tightlist
\item
the 1st argument is some \texttt{GLI}
\item
the 2nd argument is the \texttt{FCTopology} to which this \texttt{GLI}
belongs
\item
the 3rd argument is where to put the directory with pySecDec. For
quick tests one can simply use
\texttt{NotebookDirectory[\allowbreak{}]}
\item
the option \texttt{PSDRequestedOrder} specifies the order in
\(\varepsilon\) to which the integral should be evaluated (default is
\texttt{0})
\item
the option \texttt{PSDRealParameterRules} is a list of rules for
replacing kinematica invariants with numerical values which are real
numbers. For complex numbers you need to use
\texttt{PSDComplexParameterRules}
\item
if the script directory already exists, the function will by default
refuse to overwrite it. Setting the option \texttt{OverwriteTarget} to
\texttt{True} you can tell the code that you do not care about that
\end{itemize}

Here is a simple 1-loop example that incorporates all of the above

\begin{verbatim}
int = GLI[prop1L, {1, 1}]
topo = FCTopology[prop1L, {FAD[{p1, m1}], FAD[{p1 + q, m2}]}, {p1}, {q}, {Hold[SPD][q] -> qq}, {}]
files = PSDCreatePythonScripts[int, topo, NotebookDirectory[],
PSDRealParameterRules -> {qq -> 1., m1 -> 2., m2 -> 3.}, OverwriteTarget -> True]
\end{verbatim}

The output is a list containing two element which are full paths to the
two pySecDec script files \texttt{generate_int.py} and
\texttt{integrate_int.py}. You can now switch to the terminal, enter the
corresponding directory and perform the integral evaluation by first
running

\begin{verbatim}
python generate_int.py
\end{verbatim}

Here is a sample output of this script

\begin{verbatim}
running "sum_package" for loopint
running "make_package" for "loopint_integral"
computing Jacobian determinant for primary sector 0
total number sectors before symmetry finding: 2
total number sectors after symmetry finding (iterative): 2
total number sectors after symmetry finding (light Pak): 2
total number sectors after symmetry finding (full Pak): 2
writing FORM files for sector 1
writing FORM files for sector 2
expanding the prefactor exp(EulerGamma*eps)*gamma(eps) (regulators: [eps] , orders: [0] )
+ (1)*eps**-1 + (0)
"loopint_integral" done
\end{verbatim}

Now you need to compile the generated library files. This can be done
via

\begin{verbatim}
make -j8 -C loopint
\end{verbatim}

where 8 stands for the number threads to be run simultaneously. It
depends on how powerful the CPU in your machine is.

Finally, entering

\begin{verbatim}
python integrate_int.py
\end{verbatim}

will perform the actual numerical evaluation and save the obtained
results to \texttt{numres_*_psd.txt}, \texttt{numres_*_mma.m} and
\texttt{numres_*_maple.mpl}. Here \texttt{*} stands for the numerical
values of kinematic invariants present in the integral. You can modify
those values without the need to recompile the libraries by simply
editing the arrays \texttt{num_params_real} and
\texttt{num_params_complex} in \texttt{integrate_int.py}.

For Mathematica users the file \texttt{numres_*_mma.m} is probably the
most useful one. You can load the content of this file into your
Mathematica session using the function \texttt{PSDLoadNumericalResults}.
To that aim you just need to give it the output of
\texttt{PSDCreatePythonScripts} and set the options
\texttt{PSDRealParameterRules} and \texttt{PSDComplexParameterRules} to
the same values that were used when invoking
\texttt{PSDCreatePythonScripts}

\begin{verbatim}
PSDLoadNumericalResults[files, PSDRealParameterRules -> {qq -> 1., m1 -> 2., m2 -> 3.}]
\end{verbatim}
\end{document}
13 changes: 13 additions & 0 deletions pages/PaXImplicitPrefactor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@

\documentclass[../FeynHelpersManual.tex]{subfiles}
\begin{document}
\FloatBarrier
\begin{figure}[!ht]
\centering
\includegraphics[width=0.6\linewidth]{img/1ne6vpix78l6i.pdf}
\end{figure}
\FloatBarrier

\begin{Shaded}
\begin{Highlighting}[]

\end{Highlighting}
\end{Shaded}

\hypertarget{paximplicitprefactor}{
\section{PaXImplicitPrefactor}\label{paximplicitprefactor}\index{PaXImplicitPrefactor}}

Expand Down
13 changes: 13 additions & 0 deletions pages/PaXpvD.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@

\documentclass[../FeynHelpersManual.tex]{subfiles}
\begin{document}
\FloatBarrier
\begin{figure}[!ht]
\centering
\includegraphics[width=0.6\linewidth]{img/1p1tg4rvundxc.pdf}
\end{figure}
\FloatBarrier

\begin{Shaded}
\begin{Highlighting}[]

\end{Highlighting}
\end{Shaded}

\hypertarget{paxpvd}{
\section{PaXpvD}\label{paxpvd}\index{PaXpvD}}

Expand Down

0 comments on commit 06a91dd

Please sign in to comment.