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
antares.core.numerical_methods module
- class antares.core.numerical_methods.Numerical_Methods
Bases:
object- all_symmetries(possible_symmetries=None, field=Field('mpc', 0, 300), verbose=False)
Obtain the symmetries of the function, by numerical evaluation.
- property collinear_data
- do_double_collinear_limits(invariants=None, silent=False)
- do_single_collinear_limits(invariants=None, verbose=True)
- static finite_field_mass_dimension(ratio, search_range, powers)
- static finite_field_phase_weight(ratio, search_range, powers)
- get_lcd(oSlice, oSlice_for_invariants=None, assert_factors=True, degree_bounds={}, keep_all_non_unique=False, verbose=False)
- 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- get_lcds(oSlice, oSlice_for_invariants=None, verbose=False)
- univariate_Thiele_on_slice(oSlice, verbose=False)
- univariate_Thiele_on_slice_given_LCDs(lTerms, oSlice, verbose=False)
- antares.core.numerical_methods.update_shape(func)
Decorator to update shape/size metadata after function call.
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
antares.core.tools module
- antares.core.tools.Compute(lBrackets, lExponents, lCoefficients, oParticles)
- antares.core.tools.LaTeXToPython(res_path, partial_only=False, multiplicity=None)
- class antares.core.tools.MyShelf(filename, flag)
Bases:
object
- antares.core.tools.Negative_Entries(lIntegers)
- class antares.core.tools.OutputGrabber(stream=None, threaded=False)
Bases:
objectClass 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)
- antares.core.tools.Sum_Abs(lIntegers)
- antares.core.tools.Write(lBrackets, lExponents=[], lCoefficients=[])
- 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.configuration_unpacker(sys_argv)
- 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.generate_latex_and_pdf(message, res_path, partial: bool = False, compile_tex_to_pdf: bool = True, verbose: bool = True)
Write a standalone LaTeX file (optionally tagged as partial) and, if requested, compile it to a PDF with the provided SpinorLatexCompiler command line utility.
If partial is False, write <res_path>.tex.
If partial is True, write <res_path>_partial.tex.
If an identical file already exists, skip rewriting and recompiling.
- 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.mpc_to_cgmp(mpc_nbr)
- class antares.core.tools.nullcontext(enter_result=None)
Bases:
object
- antares.core.tools.output_needs_grabbing()
- antares.core.tools.patch_old_format(python_result, multiplicity)
Replaces Ω_ijk, Π_ijk, Δ_ijk with explicit expressions or new Gram format
- antares.core.tools.printBHcpp(oTerms, NameAmpl, coef_index=None, size_limit=20)
- antares.core.tools.printBHcpp_inner(BHcpp)
- antares.core.tools.rand_frac()
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)