diff --git a/img/0eugcbgadj6yz.pdf b/img/0eugcbgadj6yz.pdf new file mode 100644 index 0000000..9a6125d Binary files /dev/null and b/img/0eugcbgadj6yz.pdf differ diff --git a/img/0fr2yhbgg9nsx.pdf b/img/0fr2yhbgg9nsx.pdf new file mode 100644 index 0000000..0bda6ee Binary files /dev/null and b/img/0fr2yhbgg9nsx.pdf differ diff --git a/img/0uw74idqq2ilw.pdf b/img/0uw74idqq2ilw.pdf new file mode 100644 index 0000000..025c71c Binary files /dev/null and b/img/0uw74idqq2ilw.pdf differ diff --git a/img/1ftg3ucp91fwc.pdf b/img/1ftg3ucp91fwc.pdf new file mode 100644 index 0000000..0bda6ee Binary files /dev/null and b/img/1ftg3ucp91fwc.pdf differ diff --git a/img/1klto42084vx8.pdf b/img/1klto42084vx8.pdf new file mode 100644 index 0000000..f5447ab Binary files /dev/null and b/img/1klto42084vx8.pdf differ diff --git a/img/1ne6vpix78l6i.pdf b/img/1ne6vpix78l6i.pdf new file mode 100644 index 0000000..f5447ab Binary files /dev/null and b/img/1ne6vpix78l6i.pdf differ diff --git a/img/1p1tg4rvundxc.pdf b/img/1p1tg4rvundxc.pdf new file mode 100644 index 0000000..f5447ab Binary files /dev/null and b/img/1p1tg4rvundxc.pdf differ diff --git a/includes.tex b/includes.tex index 4619dd6..e3c28c8 100644 --- a/includes.tex +++ b/includes.tex @@ -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} @@ -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} diff --git a/pages/DollarFeynHelpersLastCommitDateHash.tex b/pages/DollarFeynHelpersLastCommitDateHash.tex new file mode 100644 index 0000000..12ff885 --- /dev/null +++ b/pages/DollarFeynHelpersLastCommitDateHash.tex @@ -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} diff --git a/pages/FIREBinaryPath.tex b/pages/FIREBinaryPath.tex index d2c4ba6..5174416 100644 --- a/pages/FIREBinaryPath.tex +++ b/pages/FIREBinaryPath.tex @@ -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}} diff --git a/pages/FeynHelpers.tex b/pages/FeynHelpers.tex index 2013e62..de2e779 100644 --- a/pages/FeynHelpers.tex +++ b/pages/FeynHelpers.tex @@ -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 @@ -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 @@ -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} diff --git a/pages/KiraGetRS.tex b/pages/KiraGetRS.tex index d4901c1..09bc6b0 100644 --- a/pages/KiraGetRS.tex +++ b/pages/KiraGetRS.tex @@ -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}[] @@ -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{\}],} diff --git a/pages/PSDCreatePythonScripts.tex b/pages/PSDCreatePythonScripts.tex index 4778393..5280645 100644 --- a/pages/PSDCreatePythonScripts.tex +++ b/pages/PSDCreatePythonScripts.tex @@ -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}} @@ -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 diff --git a/pages/PSDLoadNumericalResults.tex b/pages/PSDLoadNumericalResults.tex new file mode 100644 index 0000000..481f2e6 --- /dev/null +++ b/pages/PSDLoadNumericalResults.tex @@ -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} diff --git a/pages/PSDUsageExamples.tex b/pages/PSDUsageExamples.tex new file mode 100644 index 0000000..bdb1500 --- /dev/null +++ b/pages/PSDUsageExamples.tex @@ -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} diff --git a/pages/PaXImplicitPrefactor.tex b/pages/PaXImplicitPrefactor.tex index f54830b..b8122ea 100644 --- a/pages/PaXImplicitPrefactor.tex +++ b/pages/PaXImplicitPrefactor.tex @@ -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}} diff --git a/pages/PaXpvD.tex b/pages/PaXpvD.tex index 6ed6fdf..f9528d8 100644 --- a/pages/PaXpvD.tex +++ b/pages/PaXpvD.tex @@ -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}}