Controller module reference#

exception analytical.controller.LagrangianError(message, lterm, lineno, other)[source]#

This is a class to have a custom error message when we check the Lagragian and find a Lagrangian term without a :=

Parameters:
  • message (str) – Apparently required for an Exception object.

  • lterm (str) – The problematic Lagrangian term, or rather the first line on which it is

  • lineno (int) – Line number of the problematic term

  • other (str) – Additional text

analytical.controller.analytical_pipeline(confname)[source]#

Function corresponding to the analytical pipeline.

The function goes through the following steps:

  1. Validate the configuration

  2. Generate two .m files containing the configuration information for later steps (if chosen)

  3. Generate the Feynman rules by running frules.wl (if chosen)

  4. Generate all processes, compute the total matrix element squared and the thermal masses of mediators by running processes.wl (if chosen)

  5. Parse the result into a form that can be used as parameters for numerical.manipulate.NumRate

The function can be used as follows:

mat2,masses,couplings = analytical_pipeline('thefile.cfg')
Parameters:

confname (str) – The name of the configuration file. It is expected to be a .cfg file

Returns:

Same as do_the_dict

Return type:

dict, dict, tuple

analytical.controller.check_for_equal(filename)[source]#

Read the model file and check the Lagrangian terms. For now, it is assumed that all terms in the Lagrangian begin with a “L”.

Parameters:

filename (str) – The path to the model file, as defined by the user in the configuration

Return type:

NoneType

Raises:

LagrangianError – if a Lagrangian term without a := is found

analytical.controller.check_particle(thepart)[source]#

Checks if a particle name of the form X[n] is correct.

It considers the following particles incorrect:

  • Weyl fields

  • Rarita-Schwinger fields (FeynRules can generate the associated Feynman rules but they can’t be inserted into FeynArts topologies AFAIK)

  • Ghost fields

The function only checks the “X” part, not the number n

Parameters:

thepart (str) – Name of the particle to check

Returns:

Whether the particle name is valid or not

Return type:

bool

analytical.controller.do_the_dict(thefile)[source]#

Compute the dictionary that the class NumRate requires.

Parameters:

thefile (str) – .json file containing the result. Generated by processes.wl

Returns:

Parsed matrix element squared, couplings and thermal masses (in this order)

Return type:

dict, dict, tuple

Raises:
  • RuntimeError – if the result file can’t be found for whatever reason

  • json.JSONDecodeError – if the .json file is not formatted correctly

  • AssertionError – if the nature of the particles are incorrect

analytical.controller.do_the_thermal_bath(thebath)[source]#

Construct the thermal bath.

The outputs are either:

  1. The SM thermal bath if thebath is empty

  2. The SM thermal bath plus and/or minus a few particles if the correct syntax is used

  3. Just thebath as a list if the previous 2 cases are not met

Parameters:

thebath (str) – The thermal bath as configured by the user in the configuration file

Returns:

The thermal bath, as list, correctly parsed by AutoTherm

Return type:

list[str]