utils

This module contains some auxiliary functions

SMEFT19.utils.distrsphere(dim)[source]

Returns a random vector with norm 1.

Arguments
  • dim: Dimension of the vector

SMEFT19.utils.listpoint(x)[source]

If passed a single 2-tuple (representing one point), it returns a list containing the tuple. If passed more than 1 2-tuple (representing several points), returns the argument. TODO: Rewrite in python 3.10 using match&case syntax.

SMEFT19.utils.roundsig(x, num=4)[source]

Rounds a number to a fixed number of significative digits.

SMEFT19.utils.sign(x, y)[source]

Returns -1 if the first argument is strictly less than the second one, and 1 otherwise.

SMEFT19.utils.tex(obs)[source]

Returns the TeX representation for a given flavio observable. If the observable includes arguments (e. g. q2), they are represented as superindex.

SMEFT19.utils.texnumber(x, prec=3)[source]

Returns the TeX representation of a number in scientific notation.