Skip to content

Commit

Permalink
[doc] add instructions for sign_check_error
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Jahn committed Feb 21, 2019
1 parent 06db6f9 commit d786716
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion doc/source/generated_cpp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ A program demonstrating the use of the C++ library is generated for each integra
of integration variables upon which they depend.
The real and complex parameters are bound to the values passed in `real_parameters` and `complex_parameters`.
If enabled, contour deformation is controlled by the parameters `number_of_presamples`, `deformation_parameters_maximum`, `deformation_parameters_minimum`, `deformation_parameters_decrease_factor`
which are documented in :class:`pySecDec.integral_interface.IntegralLibrary`.
which are documented in :class:`pySecDec.integral_interface.IntegralLibrary`. In case of a sign check error (sign_check_error), manually set `number_of_presamples`, `deformation_parameters_maximum`,
and `deformation_parameters_minimum`.

Passing the `integrand_t` to the :cpp:func:`secdecutil::Integrator::integrate` function of an instance of a particular :cpp:class:`secdecutil::Integrator` will return the numerically evaluated integral.
To integrate all orders of all sectors :cpp:func:`secdecutil::deep_apply` can be used.
Expand Down
5 changes: 4 additions & 1 deletion doc/source/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ can be added to the integrator argument list:
# integrate
str_integral_without_prefactor, str_prefactor, str_integral_with_prefactor = box1L(real_parameters=[4.0, -0.75, 1.25, 1.0])
In case of a sign check error (sign_check_error), the arguments ``number_of_presamples``, ``deformation_parameters_maximum``, and ``deformation_parameters_minimum`` as described in
:class:`IntegralLibrary <pySecDec.integral_interface.IntegralLibrary>` can be used to modify the contour.
At this point the string ``str_integral_with_prefactor`` contains the full result of the integral and can be manipulated as required.
In the ``integrate_box1L.py`` an example is shown how to parse the expression with `sympy` and access individual orders of the regulator.

Expand Down Expand Up @@ -319,7 +321,8 @@ The :cpp:func:`name::make_integrands` function returns an :cpp:class:`secdecutil
// Generate the integrands (optimization of the contour if applicable)
const std::vector<box1L::nested_series_t<box1L::integrand_t>> sector_integrands = box1L::make_integrands(real_parameters, complex_parameters);

The contour deformation can be adjusted via additional arguments to :cpp:func:`name::make_integrands`. The sectors can be added before integration::
The contour deformation has to be adjusted in case of a sign check error (sign_check_error). This can be done via additional arguments to :cpp:func:`name::make_integrands`.
The sectors can be added before integration::

// Add integrands of sectors (together flag)
const box1L::nested_series_t<box1L::integrand_t> all_sectors = std::accumulate(++sector_integrands.begin(), sector_integrands.end(), *sector_integrands.begin() );
Expand Down
17 changes: 14 additions & 3 deletions pySecDec/integral_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ class IntegralLibrary(object):
unsigned int, optional;
The number of samples used for the
contour optimization.
A larger value here may resolve a sign
check error (sign_check_error).
This option is ignored if the integral
library was created without deformation.
Default: ``100000``.
Expand All @@ -529,6 +531,8 @@ class IntegralLibrary(object):
float, optional;
The maximal value the deformation parameters
:math:`\lambda_i` can obtain.
Lower this value if you get a sign check
error (sign_check_error).
If ``number_of_presamples=0``, all
:math:`\lambda_i` are set to this value.
This option is ignored if the integral
Expand All @@ -539,6 +543,8 @@ class IntegralLibrary(object):
float, optional;
The minimal value the deformation parameters
:math:`\lambda_i` can obtain.
Lower this value if you get a sign check
error (sign_check_error).
If ``number_of_presamples=0``, all
:math:`\lambda_i` are set to this value.
This option is ignored if the integral
Expand All @@ -548,9 +554,14 @@ class IntegralLibrary(object):
:param deformation_parameters_decrease_factor:
float, optional;
If the sign check with the optimized
:math:`\lambda_i` fails, all :math:`\lambda_i`
are multiplied by this value until the sign
check passes.
:math:`\lambda_i` fails during the presampling
stage, all :math:`\lambda_i` are multiplied
by this value until the sign check passes.
We recommend to rather change
``number_of_presamples``,
``deformation_parameters_maximum``,
and ``deformation_parameters_minimum``
in case of a sign check error.
This option is ignored if the integral
library was created without deformation.
Default: ``0.9``.
Expand Down

0 comments on commit d786716

Please sign in to comment.