antares.core package

Submodules

antares.core.bh_patch module

antares.core.bh_patch.accuracy()
antares.core.bh_patch.file_compatible_print(*args, **kwargs)

antares.core.bh_unknown module

class antares.core.bh_unknown.BHUnknown(helconf, loopid=None, amppart=None, ampindex=None)

Bases: Numerical_Methods, object

property BH_process
property BH_vectori
property ampindex
property amppart
property amppart_and_ampindex
property basis_functions
property basis_functions_invs
property call_cache_path
property count_gluons
property count_photons
property count_quarks
property easy_boxes
get_analytical_boxes()
get_call_cache()
get_topology_info()
property helconf

Helicity configuration. Accepts string or list with following words: (qp|qm|qbp|qbm|gp|gm|p|m). Returns a list.

property helconf_and_loopid
property loopid

Id of the particle in the loop. An helicity configuration needs to be set beforehand.

property multiplicity
print_graphs()
print_topology_info()
property process_name
reload_call_cache()
property res_path
save_call_cache()
property shelconf
property short_process_name
property spurious_poles
property upper_res_path
antares.core.bh_unknown.Upload_Momentum_Configuration(oParticles)

antares.core.my_warnings module

class antares.core.my_warnings.warnings

Bases: object

clear()
raise_error(message, warning=None)
property silent
warn(message, warning=None)
property warning

antares.core.numerical_methods module

class antares.core.numerical_methods.Numerical_Methods

Bases: object

property all_symmetries

Obtain the symmetries of the function, by numerical evaluation.

property collinear_data
do_double_collinear_limits(silent=False)
do_single_collinear_limits(silent=False)
static finite_field_mass_dimension(ratio, search_range, powers)
static finite_field_phase_weight(ratio, search_range, powers)
property internal_masses
property is_iterable
property is_zero
property mass_dimension

Returns the mass (a.k.a. energy) dimension. The value is expected to be a (half-)integer. Return type is float, vectorized depending on input.

static mass_dimension_and_phase_weights_lParticles(multiplicity)
static mass_dimension_lParticles(multiplicity)
static mpc_mass_dimension(ratio, z)
static mpc_phase_weight(ratio, z)
static padic_mass_dimension(ratio, z)
static padic_phase_weight(ratio, z)
property phase_weights

Returns the phase weights (a.k.a. little group scalings). Return type is a list of int’s, vectorized depending on input.

static phase_weights_lParticles(multiplicity)
property soft_weights
antares.core.numerical_methods.as_scalar_if_scalar(func)

Turns numpy arrays with zero dimensions into ‘real’ scalars.

antares.core.numerical_methods.composed(*decorators)

Apply an arbitrary number of decorators in a single line.

The following are equivalent:

Examples

Using composed:

>>> @composed(decorator1, decorator2)
... def func(...):
...     pass

Using individual decorators:

>>> @decorator1
... @decorator2
... def func(...):
...     pass

Parameters

decoratorscallable

An arbitrary number of decorator functions to be applied.

Returns

callable

A function decorated with all the provided decorators.

antares.core.numerical_methods.memoized(*decorator_args, **decorator_kwargs)

Diskcaching decorator generator.

class antares.core.numerical_methods.num_func(evaluable_function, verbose=False)

Bases: Numerical_Methods, object

antares.core.numerical_methods.numpy_vectorized(*decorator_args, **decorator_kwargs)

Similar to numpy.vectorize when used as a decorator, but retains the __name__ of the decorated function and accepts args and kwargs.

antares.core.numerical_methods.regulated_division(x, y)

Like division, but sends 0 / 0 to 1.

class antares.core.numerical_methods.tensor_function(callable_function)

Bases: Numerical_Methods, _tensor_function

antares.core.pycuda_tools module

antares.core.se_unknown module

class antares.core.se_unknown.SEUnknown(se_arguement)

Bases: object

antares.core.se_unknown.upload_mom_conf_joe(oParticles)

antares.core.settings module

class antares.core.settings.Settings

Bases: object

property BHsettings
property Cores
property PWTestingCachePath
property base_cache_path
property base_res_path
property gmp_precision
property logfile
read_from_file(file_full_path)
property run_file_name
property to_int_prec

antares.core.tools module

antares.core.tools.Compute(lBrackets, lExponents, lCoefficients, oParticles)
antares.core.tools.Generate_LaTeX_and_PDF(message, res_path, partial=False, compile_tex_to_pdf=True)
antares.core.tools.LaTeXToPython(res_path, partial_only=False)
class antares.core.tools.MyProcessPool(processes=1, initializer=None, initargs=None)

Bases: object

class antares.core.tools.MyShelf(filename, flag)

Bases: object

class antares.core.tools.MyThreadPool(processes=1, initializer=None, initargs=None)

Bases: object

antares.core.tools.Negative_Entries(lIntegers)
class antares.core.tools.NoDaemonProcess(group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None)

Bases: Process

property daemon

Return whether process is a daemon

class antares.core.tools.NoDaemonProcessPool(processes=None, initializer=None, initargs=(), maxtasksperchild=None, context=None)

Bases: Pool

Process(*args, **kwargs)
class antares.core.tools.OutputGrabber(stream=None, threaded=False)

Bases: object

Class used to grab standard output or another stream.

escape_char = '\x08'
readOutput()

Read the stream data (one byte at a time) and save the text in capturedtext.

start()

Start capturing the stream data.

stop()

Stop capturing the stream data and save the text in capturedtext.

antares.core.tools.PartialCompute(lBrackets, lExponents=[], lCoefficients=[1])
antares.core.tools.Positive_Entries(lIntegers)
class antares.core.tools.Progress(maximum, UseParallelisation)

Bases: object

decrement()
increment()
write()
antares.core.tools.Sum_Abs(lIntegers)
antares.core.tools.Write(lBrackets, lExponents=[], lCoefficients=[])
antares.core.tools.all_non_empty_subsets(iterable)
antares.core.tools.cgmp_to_mpc(cgmp_nbr)
antares.core.tools.chained_gcd(array, outlier_fraction=0)

GCD of array, exluding outliers from both ends of the sorted array.

antares.core.tools.chunks(l, n)

Yield successive n-sized chunks from l.

antares.core.tools.configuration_unpacker(sys_argv)
class antares.core.tools.fakeManager

Bases: object

static Value(type_, init_value)
class antares.core.tools.fakeValue(type_, init_value)

Bases: object

antares.core.tools.filterThreads(lambda_func, iterable)
antares.core.tools.flatten(temp_list, recursion_level=0, treat_list_subclasses_as_list=True, treat_tuples_as_lists=False, max_recursion=None)
antares.core.tools.forbidden_ordering(list_one, list_two, oUnknown)
antares.core.tools.fraction_to_proper_fraction(match)
antares.core.tools.generate_BH_cpp_files(shelconf, PWRespath, convert_cut=True, convert_rational=True)
antares.core.tools.get_common_Q_factor(array, outlier_fraction=0)
antares.core.tools.get_max_abs_numerator(iterable)
antares.core.tools.get_max_denominator(iterable)
antares.core.tools.log_linear_fit(xaxis, yaxis)

Fit slope of straight line in a log-log scatter plot. Slope has to be integer or half integer.

exception antares.core.tools.log_linear_fit_Exception

Bases: Exception

antares.core.tools.mapThreads(func, *args, **kwargs)
antares.core.tools.mpc_to_cgmp(mpc_nbr)
class antares.core.tools.nullcontext(enter_result=None)

Bases: object

antares.core.tools.output_needs_grabbing()
antares.core.tools.printBHcpp(oTerms, NameAmpl, coef_index=None, size_limit=20)
antares.core.tools.printBHcpp_inner(BHcpp)
antares.core.tools.progress_wrapper(func, *args, **kwargs)
antares.core.tools.rand_frac()
antares.core.tools.retry(ExceptionsToCheck, max_tries=2, silent=False)
antares.core.tools.worker(x)

antares.core.unknown module

class antares.core.unknown.Unknown(original_unknown, load_partial_results=False, silent=True)

Bases: Numerical_Methods, object

add_partial_piece(partial_piece)
property ampindex
property amppart
property amppart_and_ampindex
property basis_functions
property basis_functions_invs
does_not_require_partial_fractioning()
property easy_boxes
fit_single_scalings_result(split_pole_orders=True)
get_partial_fractioned_terms(invariant, max_nbr_terms=1)
property helconf
property helconf_and_loopid
property internal_masses
property loopid
property mass_dimension

Returns the mass (a.k.a. energy) dimension. The value is expected to be a (half-)integer. Return type is float, vectorized depending on input.

property multiplicity
property phase_weights

Returns the phase weights (a.k.a. little group scalings). Return type is a list of int’s, vectorized depending on input.

property poles_to_be_eliminated
print_partial_result(partial=True, compile_tex_to_pdf=False)
recursively_extract_original_unknown()
recursively_extract_terms()
remove_last_partial_piece()
reorder_invariants_for_partial_fractioning()
property res_path
reset()
save_original_unknown_call_cache()
property soft_weights
property spurious_poles
property what_am_I
antares.core.unknown.caching_decorator(func)

Module contents