eko package
Evolution Kernel Operators.
- class eko.EKO(recipes: Inventory[Evolution], recipes_matching: Inventory[Matching], parts: Inventory[Evolution], parts_matching: Inventory[Matching], operators: Inventory[Target], metadata: Metadata, access: AccessConfigs)[source]
Bases:
object
Operator interface.
This class offers an interface to an abstract operator, between memory and disk.
An actual operator might be arbitrarily huge, and in particular size limitations in memory are far more strict than on disk. Since manually managing, for each application, the burden of off-loading part of the operator might be hard and occasionally not possible (without a clear picture of the internals), the library itself offers this facility.
In particular, the data format on disk has a complete specification, and can hold a full operator independently of the loading procedure. In order to accomplish the former goal, the remaining task of partial loading is done by this class (for the Python library, other implementations are possible and encouraged).
For this reason, a core component of an
EKO
object is a path, referring to the location on disk of the corresponding operator. AnyEKO
has an associated path:for the computed object, it corresponds to the path where the actual result of the computation is already saved
for a new object, it is the path at which any result of final or intermediate computation is stored, as soon as it is produced
The computation can be stopped at any time, without the loss of any of the intermediate results.
- access: AccessConfigs
Access related configurations.
- property paths: InternalPaths
Accessor for internal paths.
- property theory_card
Provide theory card, retrieving from the dump.
- property operator_card
Provide operator card, retrieving from the dump.
- property permissions
Provide permissions information.
- operator(ep: Tuple[float, int])[source]
Retrieve an operator and discard it afterwards.
To be used as a contextmanager: the operator is automatically loaded as usual, but on the closing of the context manager it is dropped from memory.
- items()[source]
Iterate operators, with minimal load.
Pay attention, this iterator:
is not a read-only operation from the point of view of the in-memory object (since the final result after iteration is no operator loaded)
but it is a read-only operation from the point of view of the permanent object on-disk
- Yields:
tuple – couples of
(q2, operator)
, loaded immediately before, unloaded immediately after
- approx(ep: Tuple[float, int], rtol: float = 1e-06, atol: float = 1e-10) Tuple[float, int] | None [source]
Look for close enough evolution point in the
EKO
.The distance is mostly evaluated along the \(\mu^2\) dimension, while \(n_f\) is considered with a discrete distance: if two points have not the same, they are classified as far.
- Raises:
ValueError – if multiple values are found in the neighbourhood
- deepcopy(path: Path)[source]
Create a deep copy of current instance.
The managed on-disk object is copied as well, to the new
path
location. If you don’t want to copy the disk, consider using directly:copy.deepcopy(myeko)
It will perform the exact same operation, without propagating it to the disk counterpart.
- Parameters:
path – path to the permanent location of the new object (not the temporary directory)
- Returns:
the copy created
- Return type:
- classmethod read(path: Path, extract: bool = True, dest: Path | None = None, readonly: bool = True)[source]
Load an existing EKO.
If the extract attribute is True the EKO is loaded from its archived format. Otherwise, the path is interpreted as the location of an already extracted folder.
- classmethod edit(*args, **kwargs)[source]
Read from and write on existing EKO.
Alias of EKO.read(…, readonly=False), see
read()
.
- dump(archive: Path | None = None)[source]
Dump the current content to archive.
- Parameters:
archive (Path or None) – path to archive, in general you should keep the default, that will make use of the registered path (default:
None
)- Raises:
ValueError – when trying to dump on default archive in read-only mode
- eko.solve(theory_card: Dict[str, Any] | TheoryCard, operators_card: Dict[str, Any] | OperatorCard, path: Path)[source]
Solve DGLAP equations in terms of evolution kernel operators (EKO).
The EKO \(\mathbf E_{k,j}(a_s^1\leftarrow a_s^0)\) is determined in order to fullfill the following evolution
\[\mathbf f(x_k,a_s^1) = \mathbf E_{k,j}(a_s^1\leftarrow a_s^0) \mathbf f(x_j,a_s^0)\]The configuration is split between the theory settings, representing Standard Model parameters and other defining features of the theory calculation, and the operator settings, those that are more closely related to the solution of the DGLAP equation itself, and determine the resulting operator features.
Note
For further information about EKO inputs and output see Input & Output
Subpackages
- eko.evolution_operator package
select_singlet_element()
select_QEDsinglet_element()
select_QEDvalence_element()
QuadKerBase
quad_ker()
quad_ker_qcd()
quad_ker_qed()
OpMembers
Operator
Operator.log_label
Operator.full_labels
Operator.full_labels_qed
Operator.n_pools
Operator.xif2
Operator.int_disp
Operator.grid_size
Operator.mu2
Operator.compute_a()
Operator.a_s
Operator.a_em
Operator.compute_aem_list()
Operator.labels
Operator.ev_method
Operator.quad_ker()
Operator.initialize_op_members()
Operator.run_op_integration()
Operator.compute()
Operator.integrate()
Operator.copy_ns_ops()
- Submodules
- eko.evolution_operator.flavors module
- eko.evolution_operator.grid module
- eko.evolution_operator.matching_condition module
- eko.evolution_operator.operator_matrix_element module
- eko.evolution_operator.physical module
- eko.evolution_operator.quad_ker module
- eko.io package
EKO
EKO.recipes
EKO.recipes_matching
EKO.parts
EKO.parts_matching
EKO.operators
EKO.metadata
EKO.access
EKO.paths
EKO.xgrid
EKO.mu20
EKO.mu2grid
EKO.evolgrid
EKO.theory_card
EKO.operator_card
EKO.update()
EKO.assert_permissions()
EKO.permissions
EKO.load_recipes()
EKO.operator()
EKO.items()
EKO.approx()
EKO.unload()
EKO.deepcopy()
EKO.load()
EKO.read()
EKO.create()
EKO.edit()
EKO.dump()
EKO.close()
EKO.raw
Operator
- Submodules
- eko.io.access module
- eko.io.dictlike module
- eko.io.exceptions module
- eko.io.inventory module
- eko.io.items module
- eko.io.legacy module
- eko.io.manipulate module
- eko.io.metadata module
- eko.io.paths module
- eko.io.raw module
- eko.io.runcards module
- eko.io.struct module
inventories()
EKO
EKO.recipes
EKO.recipes_matching
EKO.parts
EKO.parts_matching
EKO.operators
EKO.metadata
EKO.access
EKO.paths
EKO.xgrid
EKO.mu20
EKO.mu2grid
EKO.evolgrid
EKO.theory_card
EKO.operator_card
EKO.update()
EKO.assert_permissions()
EKO.permissions
EKO.load_recipes()
EKO.operator()
EKO.items()
EKO.approx()
EKO.unload()
EKO.deepcopy()
EKO.load()
EKO.read()
EKO.create()
EKO.edit()
EKO.dump()
EKO.close()
EKO.raw
Builder
- eko.io.types module
- eko.kernels package
- eko.quantities package
- eko.runner package
- eko.scale_variations package
Submodules
eko.basis_rotation module
Contains the definitions of the Flavor Basis and Evolution Basis.
- eko.basis_rotation.flavor_basis_pids = (22, -6, -5, -4, -3, -2, -1, 21, 1, 2, 3, 4, 5, 6)
Sorted elements in Flavor Basis as PID.
Definition: here
corresponding PDF : \(\gamma, \bar t, \bar b, \bar c, \bar s, \bar u, \bar d, g, d, u, s, c, b, t\)
- eko.basis_rotation.flavor_basis_names = ('ph', 'tbar', 'bbar', 'cbar', 'sbar', 'ubar', 'dbar', 'g', 'd', 'u', 's', 'c', 'b', 't')
String representation of
flavor_basis_pids
.
- eko.basis_rotation.evol_basis = ('ph', 'S', 'g', 'V', 'V3', 'V8', 'V15', 'V24', 'V35', 'T3', 'T8', 'T15', 'T24', 'T35')
Sorted elements in Evolution Basis as
str
.Definition: here.
corresponding PDF : \(\gamma, \Sigma, g, V, V_{3}, V_{8}, V_{15}, V_{24}, V_{35}, T_{3}, T_{8}, T_{15}, T_{24}, T_{35}\)
- eko.basis_rotation.unified_evol_basis = ('g', 'ph', 'S', 'Sdelta', 'V', 'Vdelta', 'Td3', 'Vd3', 'Tu3', 'Vu3', 'Td8', 'Vd8', 'Tu8', 'Vu8')
Sorted elements in Unified Evolution Basis as
str
.Definition: here.
corresponding PDF : \(g, \gamma, \Sigma, \Sigma_\Delta, V, V_\Delta, T^d_3, V^d_3, T^u_3, V^u_3, T^d_8, V^d_8, T^u_8, V^u_8\)
- eko.basis_rotation.evol_basis_pids = (22, 100, 21, 200, 203, 208, 215, 224, 235, 103, 108, 115, 124, 135)
PID representation of
evol_basis
.
- eko.basis_rotation.unified_evol_basis_pids = (21, 22, 100, 101, 200, 201, 105, 205, 104, 204, 110, 210, 109, 209)
PID representation of
unified_evol_basis
.The notation used for the non singlet compunents is the following: pid_ns(u) = pid_ns + 1, pid_ns(d) = pid_ns + 2.
- eko.basis_rotation.anomalous_dimensions_basis = ((100, 100), (100, 21), (21, 100), (21, 21), (10201, 0), (10101, 0), (10200, 0))
Sorted elements in Anomalous Dimensions Basis as
str
.
- eko.basis_rotation.rotate_flavor_to_evolution = array([[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [ 0, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1], [ 0, 0, 0, 0, 0, -1, 1, 0, -1, 1, 0, 0, 0, 0], [ 0, 0, 0, 0, 2, -1, -1, 0, 1, 1, -2, 0, 0, 0], [ 0, 0, 0, 3, -1, -1, -1, 0, 1, 1, 1, -3, 0, 0], [ 0, 0, 4, -1, -1, -1, -1, 0, 1, 1, 1, 1, -4, 0], [ 0, 5, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, -5], [ 0, 0, 0, 0, 0, 1, -1, 0, -1, 1, 0, 0, 0, 0], [ 0, 0, 0, 0, -2, 1, 1, 0, 1, 1, -2, 0, 0, 0], [ 0, 0, 0, -3, 1, 1, 1, 0, 1, 1, 1, -3, 0, 0], [ 0, 0, -4, 1, 1, 1, 1, 0, 1, 1, 1, 1, -4, 0], [ 0, -5, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, -5]])
Flavor Basis and Evolution Basis </theory/FlavorSpace>.
- Type:
Basis rotation matrix between
- Type:
doc
- eko.basis_rotation.rotate_flavor_to_unified_evolution = array([[ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1], [ 0, 1, -1, 1, -1, 1, -1, 0, -1, 1, -1, 1, -1, 1], [ 0, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1], [ 0, -1, 1, -1, 1, -1, 1, 0, -1, 1, -1, 1, -1, 1], [ 0, 0, 0, 0, -1, 0, 1, 0, 1, 0, -1, 0, 0, 0], [ 0, 0, 0, 0, 1, 0, -1, 0, 1, 0, -1, 0, 0, 0], [ 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, 0, 0], [ 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, 0, -1, 0, 0], [ 0, 0, -2, 0, 1, 0, 1, 0, 1, 0, 1, 0, -2, 0], [ 0, 0, 2, 0, -1, 0, -1, 0, 1, 0, 1, 0, -2, 0], [ 0, -2, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, -2], [ 0, 2, 0, -1, 0, -1, 0, 0, 0, 1, 0, 1, 0, -2]])
Flavor Basis and Unified Evolution Basis </theory/FlavorSpace>.
- Type:
Basis rotation matrix between
- Type:
doc
- eko.basis_rotation.map_ad_to_evolution = {(21, 21): ['g.g'], (21, 100): ['g.S'], (100, 21): ['S.g'], (100, 100): ['S.S'], (10101, 0): ['T3.T3', 'T8.T8', 'T15.T15', 'T24.T24', 'T35.T35'], (10200, 0): ['V.V'], (10201, 0): ['V3.V3', 'V8.V8', 'V15.V15', 'V24.V24', 'V35.V35']}
Map anomalous dimension sectors’ names to their members.
- eko.basis_rotation.ad_projector(ad_lab, nf, qed)[source]
Build a projector (as a numpy array) for the given anomalous dimension sector.
- eko.basis_rotation.select_light_flavors_uni_ev(ad_lab, nf)[source]
Select light flavors for a given ad_lab.
eko.beta module
Compute the beta function coefficients.
The strong coupling \(a_s(\mu^2)\) and the electro-magnetic coupling \(a_{em}(\mu^2)\) obey separate, but coupled RGE:
See the eko.couplings
module for solutions.
When considering QED corrections the two RGE need two be solved
simultaneously.
- eko.beta.beta_qcd_as2(nf: int) float [source]
Compute the first coefficient of the QCD beta function.
Implements 3.1 of [HRU+17].
- Parameters:
nf – number of active flavors
- Returns:
first coefficient of the QCD beta function \(\beta_{QCD}^{(2,0),(n_f)}\)
- Return type:
- eko.beta.beta_qed_aem2(nf: int, nl: int) float [source]
Compute the first coefficient of the QED beta function.
Implements 7 of [Sur96].
- Parameters:
nf – number of active flavors
nl – number of leptons
- Returns:
first coefficient of the QED beta function \(\beta_{QED}^{(0,2),(n_f)}\)
- Return type:
- eko.beta.beta_qcd_as3(nf: int) float [source]
Compute the second coefficient of the QCD beta function.
Implements 3.2 of [HRU+17].
- Parameters:
nf – number of active flavors
- Returns:
second coefficient of the QCD beta function \(\beta_{QCD}^{(3,0),(n_f)}\)
- Return type:
- eko.beta.beta_qed_aem3(nf: int, nl: int) float [source]
Compute the second coefficient of the QED beta function.
Implements 7 of [Sur96].
- Parameters:
nf – number of active flavors
nl – number of leptons
- Returns:
second coefficient of the QED beta function \(\beta_{QED}^{(0,3),(n_f)}\)
- Return type:
- eko.beta.beta_qcd_as2aem1(nf: int) float [source]
Compute the first QED correction of the QCD beta function.
Implements 7 of [Sur96].
- Parameters:
nf – number of active flavors
- Returns:
first QED correction of the QCD beta function \(\beta_{QCD}^{(2,1),(n_f)}\)
- Return type:
- eko.beta.beta_qed_aem2as1(nf: int) float [source]
Compute the first QCD correction of the QED beta function.
Implements 7 of [Sur96].
- Parameters:
nf – number of active flavors
- Returns:
first QCD correction of the QED beta function \(\beta_{QED}^{(1,2),(n_f)}\)
- Return type:
- eko.beta.beta_qcd_as4(nf: int) float [source]
Compute the third coefficient of the QCD beta function.
Implements 3.3 of [HRU+17].
- Parameters:
nf – number of active flavors
- Returns:
third coefficient of the QCD beta function \(\beta_{QCD}^{(4,0),(n_f)}\)
- Return type:
- eko.beta.beta_qcd_as5(nf: int) float [source]
Compute the fourth coefficient of the QCD beta function.
Implements 3.6 of [HRU+17].
- Parameters:
nf – number of active flavors
- Returns:
fourth coefficient of the QCD beta function \(\beta_{QCD}^{(5,0),(n_f)}\)
- Return type:
- eko.beta.beta_qcd(k: Tuple[int, int], nf: int) float [source]
Compute QCD beta coefficient.
- Parameters:
k – perturbative orders
nf – number of active flavors
- Returns:
\(\beta_{QCD}^{k,(nf)}\)
- Return type:
- eko.beta.beta_qed(k: Tuple[int, int], nf: int, nl: int) float [source]
Compute QED beta coefficient.
- Parameters:
k – perturbative order
nf – number of active flavors
nl – number of leptons
- Returns:
\(\beta_{QED}^{k,(nf)}\)
- Return type:
eko.constants module
Sets the physical constants.
- eko.constants.NC = 3
The number of colors.
- eko.constants.TR = 0.5
The normalization of fundamental generators.
Defaults to \(T_R = 1/2\).
- eko.constants.CA = 3.0
Second Casimir constant in the adjoint representation.
Defaults to \(N_C = 3\).
- eko.constants.CF = 1.3333333333333333
Second Casimir constant in the fundamental representation.
Defaults to \(\frac{N_C^2-1}{2N_C} = 4/3\).
- eko.constants.MTAU = 1.777
Mass of the tau.
- eko.constants.eu2 = 0.4444444444444444
Up quarks charge squared.
- eko.constants.ed2 = 0.1111111111111111
Down quarks charge squared.
- eko.constants.zeta2 = 1.6449340668482264
\(\zeta(2)\)
- eko.constants.zeta3 = 1.2020569031595942
\(\zeta(3)\)
- eko.constants.zeta4 = 1.0823232337111381
\(\zeta(4)\)
- eko.constants.zeta5 = 1.03692775514337
\(\zeta(5)\)
- eko.constants.log2 = 0.6931471805599453
\(\ln(2)\)
- eko.constants.li4half = 0.517479
\(Li_{4}(1/2)\)
- eko.constants.update_colors(nc)[source]
Update the number of colors to \(NC = nc\).
The Casimirs for a generic value of \(NC\) are consistenly updated as well.
- Parameters:
nc (int) – Number of colors
eko.couplings module
Manage running (and fixed) couplings.
Manage QCD coupling \(\alpha_s\) and QED coupling \(\alpha\). We provide an interface to access them simultaneously and provide several strategies to solve the associated RGE.
See pQCD ingredients.
- eko.couplings.couplings_mod_ev(mod_ev: EvolutionMethod) CouplingEvolutionMethod [source]
Map ModEv key to the available strong coupling evolution methods.
- eko.couplings.expanded_nlo(ref, beta0, b1, lmu)[source]
Compute expanded solution at NLO.
Implement the default expression for NLO expanded solution, e.g. the one implemented in APFEL.
- Parameters:
- Returns:
coupling at target scale \(a(\mu_R^2)\)
- Return type:
- eko.couplings.expanded_nnlo(ref, beta0, b1, b2, lmu)[source]
Compute expanded solution at NNLO.
Implement the NNLO expanded solution from APFEL (not the default expression)
- Parameters:
- Returns:
coupling at target scale \(a(\mu_R^2)\)
- Return type:
- eko.couplings.expanded_n3lo(ref, beta0, b1, b2, b3, lmu)[source]
Compute expanded solution at N3LO.
Implement the N3LO expanded solution obtained via iterated solution of the RGE [Rot]
- Parameters:
ref (float) – reference value of the coupling
beta0 (float) – first coefficient of the beta function
b1 (float) – second coefficient of the b function
b2 (float) – third coefficient of the b function
b3 (float) – fourth coefficient of the b function
lmu (float) – logarithm of the ratio between target and reference scales
- Returns:
coupling at target scale \(a(\mu_R^2)\)
- Return type:
- eko.couplings.expanded_qcd(ref, order, beta0, b_vec, lmu)[source]
Compute QCD expanded solution at a given order.
- Parameters:
- Returns:
strong coupling at target scale \(a_s(\mu_R^2)\)
- Return type:
- eko.couplings.expanded_qed(ref, order, beta0, b_vec, lmu)[source]
Compute QED expanded solution at a given order.
- Parameters:
- Returns:
QED coupling at target scale \(a_em(\mu_R^2)\)
- Return type:
- eko.couplings.couplings_expanded_alphaem_running(order, couplings_ref, nf, nl, scale_from, scale_to, decoupled_running)[source]
Compute coupled expanded expression of the couplings for running alphaem.
Implement Eqs. (17-18) from [Sur96]
- Parameters:
couplings_ref (numpy.ndarray) – reference alpha_s and alpha
nf (int) – value of nf for computing the couplings
nl (int) – number of leptons partecipating to alphaem running
scale_from (float) – reference scale
scale_to (float) – target scale
decoupled_running (bool) – whether the running of the couplings is decoupled or not
- Returns:
couplings at target scale \(a(\mu_R^2)\)
- Return type:
- eko.couplings.couplings_expanded_fixed_alphaem(order, couplings_ref, nf, scale_from, scale_to)[source]
Compute coupled expanded expression of the couplings for fixed alphaem.
- Parameters:
- Returns:
couplings at target scale \(a(\mu_R^2)\)
- Return type:
- class eko.couplings.Couplings(couplings: CouplingsInfo, order: Tuple[int, int], method: CouplingEvolutionMethod, masses: List[float], hqm_scheme: QuarkMassScheme, thresholds_ratios: Iterable[float])[source]
Bases:
object
Compute the strong and electromagnetic coupling constants \(a_s, a_{em}\).
Note that
although, we only provide methods for \(a_i = \frac{\alpha_i(\mu^2)}{4\pi}\) the reference value has to be given in terms of \(\alpha_i(\mu_0^2)\) due to legacy reasons
the
order
refers to the perturbative order of the beta functions, i.e. the number of loops for QCD and QED respectively. QCD is always running with at least 1 loop, while QED might not run at all (so 0 loop).
Normalization is given by [HRU+17]:
\[\frac{da_s(\mu^2)}{d\ln\mu^2} = \beta(a_s) \ = - \sum\limits_{n=0} \beta_n a_s^{n+2}(\mu^2) \quad \text{with}~ a_s = \frac{\alpha_s(\mu^2)}{4\pi}\]See pQCD ingredients.
- Parameters:
couplings – reference configuration
order – Number of loops in beta functions (QCD, QED)
method – Applied method to solve the beta functions
masses – list with quark masses squared
hqm_scheme – heavy quark mass scheme
thresholds_ratios – list with ratios between the matching scales and the mass squared
- property mu2_ref
Return reference scale.
- unidimensional_exact(beta0, b_vec, u, a_ref, method, rtol)[source]
Compute single coupling via decoupled RGE.
- Parameters:
- Returns:
coupling at target scale \(a(Q^2)\)
- Return type:
- compute_exact_alphaem_running(a_ref, nf, nl, scale_from, scale_to)[source]
Compute couplings via RGE with running alphaem.
- Parameters:
a_ref (numpy.ndarray) – reference alpha_s and alpha
nf (int) – value of nf for computing alpha_i
nl (int) – number of leptons partecipating to alphaem running
scale_from (float) – reference scale
scale_to (float) – target scale
- Returns:
couplings at target scale \(a(Q^2)\)
- Return type:
- compute_exact_fixed_alphaem(a_ref, nf, scale_from, scale_to)[source]
Compute couplings via RGE with fixed alphaem.
- Parameters:
a_ref (numpy.ndarray) – reference alpha_s and alpha
nf (int) – value of nf for computing alpha_i
scale_from (float) – reference scale
scale_to (float) – target scale
- Returns:
couplings at target scale \(a(Q^2)\)
- Return type:
- compute(a_ref, nf, nl, scale_from, scale_to)[source]
Compute actual couplings.
This is a wrapper in order to pass the computation to the corresponding method (depending on the calculation method).
- Parameters:
a_ref (numpy.ndarray) – reference a
nf (int) – value of nf for computing alpha
nl (int) – number of leptons partecipating to alphaem running
scale_from (float) – reference scale
scale_to (float) – target scale
- Returns:
couplings at target scale \(a(Q^2)\)
- Return type:
- a(scale_to, nf_to=None)[source]
Compute couplings \(a_i(\mu_R^2) = \frac{\alpha_i(\mu_R^2)}{4\pi}\).
- Parameters:
- Returns:
couplings \(a_i(\mu_R^2) = \frac{\alpha_i(\mu_R^2)}{4\pi}\)
- Return type:
- a_s(scale_to, nf_to=None)[source]
Compute strong coupling.
The strong oupling uses the normalization \(a_s(\mu_R^2) = \frac{\alpha_s(\mu_R^2)}{4\pi}\).
- eko.couplings.compute_matching_coeffs_up(mass_scheme, nf)[source]
Compute the upward matching coefficients.
The matching coefficients [CKS06, SS06, Vog05] are normalized at threshold when moving to a regime with more flavors.
We follow notation of [Vog05] (eq 2.43) for POLE masses.
The inverse \(\overline{MS}\) values instead are given in [SS06] (eq 3.1) multiplied by a factor of 4 (and 4^2 …).
\[a_s^{(n_l+1)} = a_s^{(n_l)} + \sum\limits_{n=1} (a_s^{(n_l)})^n \sum\limits_{k=0}^n c_{nl} \log(\mu_R^2/\mu_F^2)\]- Parameters:
- Returns:
forward matching coefficient matrix
- Return type:
- eko.couplings.compute_matching_coeffs_down(mass_scheme, nf)[source]
Compute the downward matching coefficients.
This is the inverse function to
compute_matching_coeffs_up()
.- Parameters:
- Returns:
downward matching coefficient matrix
- Return type:
- eko.couplings.invert_matching_coeffs(c_up)[source]
Compute the perturbative inverse of the matching conditions.
They can be obtained e.g. via Mathematica by:
Module[{f, g, l, sol}, f[a_] := a + Sum[d[n, k]*L^k*a^(1 + n), {n, 3}, {k, 0, n}]; g[a_] := a + Sum[c[n, k]*L^k*a^(1 + n), {n, 3}, {k, 0, n}] /. {c[1, 0] -> 0}; l = CoefficientList[Normal@Series[f[g[a]], {a, 0, 5}], {a, L}]; sol = First@ Solve[{l[[3]] == 0, l[[4]] == 0, l[[5]] == 0}, Flatten@Table[d[n, k], {n, 3}, {k, 0, n}]]; Do[Print@r, {r, sol}]; Print@Series[f[g[a]] /. sol, {a, 0, 5}]; Print@Series[g[f[a]] /. sol, {a, 0, 5}]; ]
- Parameters:
c_up (numpy.ndarray) – forward matching coefficient matrix
- Returns:
downward matching coefficient matrix
- Return type:
eko.gamma module
The QCD gamma function coefficients.
See pQCD ingredients.
- eko.gamma.gamma_qcd_as1()[source]
Compute the first coefficient of the QCD gamma function.
Implements 15 of [VLvR97].
- Returns:
gamma_0 – first coefficient of the QCD gamma function \(\gamma_{m,0}^{n_f}\)
- Return type:
- eko.gamma.gamma_qcd_as2(nf)[source]
Compute the second coefficient of the QCD gamma function.
Implements 15 of [VLvR97].
- eko.gamma.gamma_qcd_as3(nf)[source]
Compute the third coefficient of the QCD gamma function.
Implements 15 of [VLvR97].
eko.interpolation module
Library providing all necessary tools for PDF interpolation.
This library also provides a class to generate the interpolator InterpolatorDispatcher
.
Upon construction the dispatcher generates a number of functions
to evaluate the interpolator.
- class eko.interpolation.Area(lower_index, poly_number, block, xgrid)[source]
Bases:
object
Define area of subgrid interpolators.
Upon construction an array of coefficients is generated.
- eko.interpolation.log_evaluate_Nx(N, logx, area_list)[source]
Evaluate logarithmic interpolator in N-space.
A single logarithmic Lagrange interpolator is evaluated in N-space multiplied by the Mellin-inversion factor.
\[\tilde p(N)*\exp(- N * \ln(x))\]
- eko.interpolation.evaluate_Nx(N, logx, area_list)[source]
Evaluate linear interpolator in N-space.
A single linear Lagrange interpolator is evaluated in N-space multiplied by the Mellin-inversion factor.
\[\tilde p(N)*\exp(- N * \ln(x))\]
- eko.interpolation.evaluate_grid(N, is_log, logx, area_list)[source]
Evaluate interpolator in N-space.
- eko.interpolation.evaluate_x(x, area_list)[source]
Evaluate a single linear Lagrange interpolator in x-space.
\[p(x)\]
- eko.interpolation.log_evaluate_x(x, area_list)[source]
Evaluate a single logarithmic Lagrange interpolator in x-space.
\[p(x)\]
- class eko.interpolation.BasisFunction(xgrid, poly_number, list_of_blocks, mode_log=True, mode_N=True)[source]
Bases:
object
Represent an element of the polynomial basis.
It contains a list of areas for a given polynomial number defined by (xmin-xmax) which in turn contain a list of coefficients.
Upon construction it will generate all areas and generate and compile a function to evaluate in N (or x) the interpolator
- Parameters:
xgrid (numpy.ndarray) – Grid in x-space from which the interpolators are constructed
poly_number (int) – number of polynomial
list_of_blocks (list(tuple(int, int))) – list of tuples with the (kmin, kmax) values for each area
mode_log (bool) – use logarithmic interpolation?
mode_N (bool) – if true compiles the function on N, otherwise compiles on x
- areas_to_const()[source]
Return an array containing all areas.
The area format is (xmin, xmax, numpy.array of coefficients).
- Returns:
area config
- Return type:
- compile_n()[source]
Compile the function to evaluate the interpolator in N space.
Generates a function
evaluate_Nx()
with a (N, logx) signature.\[\tilde p(N)*\exp(- N * \ln(x))\]The polynomials contain naturally factors of \(\exp(N * j * \ln(x_{min/max}))\) which can be joined with the Mellin inversion factor.
- class eko.interpolation.XGrid(xgrid: Sequence | ndarray[Any, dtype[_ScalarType_co]], log: bool = True)[source]
Bases:
object
Grid of points in \(x\)-space.
This object represents a suitable grid of momentum fractions to be used to evaluate the PDF over.
- class eko.interpolation.InterpolatorDispatcher(xgrid: XGrid | Sequence | ndarray[Any, dtype[_ScalarType_co]], polynomial_degree, mode_N=True)[source]
Bases:
object
Setup the interpolator.
Upon construction will generate a list of
BasisFunction
objects. Each of theseBasisFunction
objects expose a callable method (also accessible as the __call__ method of the class) which will be numba-compiled.- Parameters:
xgrid (numpy.ndarray) – Grid in x-space from which the interpolators are constructed
polynomial_degree (int) – degree of the interpolation polynomial
log (bool) – Whether it is a log or linear interpolator
mode_N (bool) – if true compiles the function on N, otherwise compiles x
- get_interpolation(targetgrid: ndarray[Any, dtype[_ScalarType_co]] | Sequence)[source]
Compute interpolation matrix between targetgrid and xgrid.
\[f(targetgrid) = R \cdot f(xgrid)\]- Parameters:
targetgrid (array) – grid to interpolate to
- Returns:
R – interpolation matrix $R_{ij}$, where $i$ is the index over targetgrid, and $j$ is the index on the internal basis (the one stored in the
InterpolatorDispatcher
instance)- Return type:
array
- eko.interpolation.make_grid(n_low, n_mid, n_high=0, x_min=1e-07, x_low=0.1, x_high=0.9, x_high_max=0.9999)[source]
Create a log-lin-log-spaced grid.
1.0 is always part of the grid and the final grid is unified, i.e. esp. points that might appear twice at the borders of the regions are unified.
- Parameters:
- Returns:
xgrid – generated grid
- Return type:
- eko.interpolation.lambertgrid(n_pts, x_min=1e-07, x_max=1.0)[source]
Create a smoothly spaced grid that is linear near 1 and logarithmic near 0.
It is generated by the relation:
\[x(y) = \frac{1}{5} W_{0}(5 \exp(5-y))\]where \(W_{0}\) is the principle branch of the
Lambert W function
and \(y\) is a variable which extremes are given as function of \(x\) by the direct relation:\[y(x) = 5(1-x)-\log(x)\]This method is implemented in PineAPPL, [CNSZ20] eq 2.11 and relative paragraph.
- Parameters:
- Returns:
xgrid – generated grid
- Return type:
eko.matchings module
Holds the classes that define the FNS.
- class eko.matchings.Segment(origin: float, target: float, nf: int)[source]
Bases:
object
Oriented path in the threshold landscape.
- class eko.matchings.Matching(scale: float, hq: int, inverse: bool)[source]
Bases:
object
Matching between two different segments.
The meaning of the flavor index hq is the PID of the corresponding heavy quark.
- class eko.matchings.Atlas(matching_scales: HeavyQuarks[float], origin: Tuple[float, int])[source]
Bases:
object
Holds information about the matching scales.
These scales are the \(Q^2\) has to pass in order to get there from a given \(Q^2_{ref}\).
- classmethod ffns(nf: int, mu2: float)[source]
Create a FFNS setup.
The function creates simply sufficient thresholds at
0
(in the beginning), since the number of flavors is determined by counting from below.The origin is set with that number of flavors.
- path(target: Tuple[float, int]) List[Segment] [source]
Determine the path to the target evolution point.
Essentially, the path is always monotonic in the number of flavors, increasing or decreasing the active flavors by one unit every time a matching happens at the suitable scale.
Examples
Since this can result in a counter-intuitive behavior, let’s walk through some examples.
Starting with the intuitive one: >>> Atlas([10, 20, 30], (5, 3)).path((25, 5)) [Segment(5, 10, 3), Segment(10, 20, 4), Segment(20, 25, 5)]
If the number of flavor has been reached, it will continue walking without matchin again. >>> Atlas([10, 20, 30], (5, 3)).path((25, 4)) [Segment(5, 10, 3), Segment(10, 25, 4)]
It is irrelevant the scale you start from, to step from 3 to 4 you have to cross the charm matching scale, whether this means walking upward or downward. >>> Atlas([10, 20, 30], (15, 3)).path((25, 5)) [Segment(15, 10, 3), Segment(10, 20, 4), Segment(20, 25, 5)]
An actual backward evolution is defined by lowering the number of flavors going from origin to target. >>> Atlas([10, 20, 30], (25, 5)).path((5, 3)) [Segment(25, 20, 5), Segment(20, 10, 4), Segment(10, 5, 3)]
But the only difference is in the matching between two segments, since a single segment is always happening in a fixed number of flavors, and it is completely analogue for upward or downward evolution.
Note
Since the only task required to determine a path is interleaving the correct matching scales, this is done by slicing the walls.
- eko.matchings.nf_default(mu2: float, atlas: Atlas) int [source]
Determine the number of active flavors in the default flow.
Default flow is defined by the natural sorting of the matching scales:
\[\mu_c < \mu_b < \mu_t\]So, the flow is defined starting with 3 flavors below the charm matching, and increasing by one every time a matching scale is passed while increasing the scale.
- eko.matchings.is_downward_path(path: List[Segment]) bool [source]
Determine if a path is downward.
Criterias are:
in the number of active flavors when the path list contains more than one
Segment
, note this can be different from eachSegment.is_downward
in \(\mu^2\), when just one single
Segment
is given
eko.mellin module
Tools for Mellin inversion.
We provide all necessary toold to deal with the inverse Mellin transformation.
Although this module provides three different path implementations in practice only the Talbot path [AV04]
is used, as it results in the most efficient convergence. The default values for the parameters \(r,o\) are given by \(r = 1/2, o = 0\) for the non-singlet integrals and by \(r = \frac{2}{5} \frac{16}{1 - \ln(x)}, o = 1\) for the singlet sector. Note that the non-singlet kernels evolve poles only up to \(N=0\) whereas the singlet kernels have poles up to \(N=1\).
- eko.mellin.Talbot_path(t, r, o)[source]
Compute Talbot path.
\[p_{\text{Talbot}}(t) = o + r \cdot ( \theta \cot(\theta) + i\theta ), \theta = \pi(2t-1)\]
- eko.mellin.Talbot_jac(t, r, _o)[source]
Compute Derivative of Talbot path.
\[\frac{dp_{\text{Talbot}}(t)}{dt}\]
- eko.mellin.line_path(t, m, c)[source]
Compute textbook path, i.e. a straight line parallel to the imaginary axis.
\[p_{\text{line}}(t) = c + m \cdot (2t - 1)\]
- eko.mellin.line_jac(_t, m, _c)[source]
Compute derivative of Textbook path.
\[\frac{dp_{\text{line}}(t)}{dt}\]
- eko.mellin.edge_path(t, m, c, phi)[source]
Compute edged path with a given angle.
\[p_{\text{edge}}(t) = c + m\left|t - \frac 1 2\right|\exp(i\phi)\]
eko.member module
Atomic operator member.
- class eko.member.OpMember(value, error)[source]
Bases:
object
A single operator for a specific element in evolution basis.
This class provide some basic mathematical operations such as products. It can also be applied to a pdf vector via
apply_pdf()
. This class will never be exposed to the outside, but will be an internal member of theOperator
andPhysicalOperator
instances.- Parameters:
value (np.array) – operator matrix
error (np.array) – operator error matrix
- class eko.member.MemberName(name)[source]
Bases:
object
Operator member name in operator evolution space.
- Parameters:
name (str) – operator name
- property target
Returns target flavor name (given by the first part of the name).
- property input
Returns input flavor name (given by the second part of the name).
- class eko.member.OperatorBase(op_members, q2_final)[source]
Bases:
object
Abstract base class to hold a dictionary of interpolation matrices.
- Parameters:
op_members (dict) – mapping of
MemberName
ontoOpMember
q2_final (float) – final scale
- operation(other)[source]
Choose mathematical operation by rank.
- Parameters:
other (OperatorBase) – operand
- Returns:
operation to perform (np.matmul or np.multiply)
- Return type:
callable
- static operator_multiply(left, right, operation)[source]
Multiply two operators.
- Parameters:
left (OperatorBase) – left operand
right (OperatorBase) – right operand
operation (callable) – operation to perform (np.matmul or np.multiply)
- Returns:
new operator members dictionary
- Return type:
- to_flavor_basis_tensor(qed: bool)[source]
Convert the computations into an rank 4 tensor.
A sparse tensor defined with dot-notation (e.g.
S.g
) is converted to a plain rank-4 array over flavor operator space and momentum fraction operator space.If qed is passed, the unified intrinsic basis is used.
- class eko.member.ScalarOperator(op_members, q2_final)[source]
Bases:
OperatorBase
Operator above space of real numbers.
eko.msbar_masses module
RGE for the \(\overline{MS}\) masses.
- eko.msbar_masses.ker_exact(a0, a1, order, nf)[source]
Provide exact \(\overline{MS}\) RGE kernel.
- Parameters:
- Returns:
Exact \(\overline{MS}\) kernel:
\[k_{exact} = e^{-\int_{a_s(\mu_{h,0}^2)}^{a_s(\mu^2)}\gamma_m(a_s)/ \beta(a_s)da_s}\]- Return type:
- eko.msbar_masses.ker_expanded(a0, a1, order, nf)[source]
Provide expanded \(\overline{MS}\) RGE kernel.
- Parameters:
- Returns:
Expanded \(\overline{MS}\) kernel:
\[\begin{split}k_{expanded} &= \left (\frac{a_s(\mu^2)}{a_s(\mu_{h,0}^2)} \right )^{c_0} \frac{j_{exp}(a_s(\mu^2))}{j_{exp}(a_s(\mu_{h,0}^2))} \\ j_{exp}(a_s) &= 1 + a_s \left [ c_1 - b_1 c_0 \right ] \\ & + \frac{a_s^2}{2} \left [c_2 - c_1 b_1 - b_2 c_0 + b_1^2 c_0 + (c_1 - b_1 c_0)^2 \right ] \\ & + \frac{a_s^3}{6} [ -2 b_3 c_0 - b_1^3 c_0 (1 + c_0) (2 + c_0) - 2 b_2 c_1 \\ & - 3 b_2 c_0 c_1 + b_1^2 (2 + 3 c_0 (2 + c_0)) c_1 + c_1^3 + 3 c_1 c_2 \\ & + b_1 (b_2 c_0 (4 + 3 c_0) - 3 (1 + c_0) c_1^2 - (2 + 3 c_0) c_2) + 2 c_3 ]\end{split}\]- Return type:
- eko.msbar_masses.ker_dispatcher(q2_to, q2m_ref, strong_coupling, xif2, nf)[source]
Select the \(\overline{MS}\) kernel and compute the strong coupling values.
- Parameters:
- Returns:
Expanded or exact \(\overline{MS}\) kernel
- Return type:
ker
- eko.msbar_masses.compute_matching_coeffs_up(nf: int)[source]
Upward \(\overline{MS}\) matching coefficients.
Used at threshold when moving to a regime with more flavors [LS15].
Note [LS15] (eq 5.) reports the backward relation, multiplied by a factor of 4 (and 4^2 …)
- eko.msbar_masses.compute_matching_coeffs_down(nf: int)[source]
Downward \(\overline{MS}\) matching coefficients.
Used at threshold when moving to a regime with less flavors [LS15] 5.
- eko.msbar_masses.solve(m2_ref, q2m_ref, strong_coupling, nf_ref, xif2)[source]
Compute the \(\overline{MS}\) masses.
Solves the equation \(m_{\overline{MS}}(m) = m\) for a fixed number of nf.
- Parameters:
m2_ref (float) – squared initial mass reference
q2m_ref (float) – squared initial scale
strong_coupling (eko.strong_coupling.StrongCoupling) – Instance of
StrongCoupling
able to generate a_s for any qnf_ref (int) – number of active flavours at the scale q2m_ref, where the solution is searched
xif2 (float) – \(\mu_F^2/\mu_R^2\)
- Returns:
m2 – \(m_{\overline{MS}}(\mu_2)^2\)
- Return type:
- eko.msbar_masses.evolve(m2_ref, q2m_ref, strong_coupling, thresholds_ratios, xif2, q2_to, nf_ref=None, nf_to=None)[source]
Perform the \(\overline{MS}\) mass evolution up to given scale.
It allows for different number of active flavors.
- Parameters:
m2_ref (float) – squared initial mass reference
q2m_ref (float) – squared initial scale
strong_coupling (eko.strong_coupling.StrongCoupling) – Instance of
StrongCoupling
able to generate a_s for any qxif2 (float) – \(\mu_F^2/\mu_R^2\)
q2_to (float) – scale at which the mass is computed
nf_ref (int) – number of flavor active at the reference scale
nf_to (int) – number of flavor active at the target scale
- Returns:
m2 – \(m_{\overline{MS}}(\mu_2)^2\)
- Return type:
- eko.msbar_masses.compute(masses_ref: HeavyQuarks[ReferenceRunning[float]], couplings: CouplingsInfo, order: Tuple[int, int], evmeth: CouplingEvolutionMethod, matching: List[float], xif2: float = 1.0)[source]
Compute the \(\overline{MS}\) masses.
Computation is performed solving the equation \(m_{\bar{MS}}(\mu) = \mu\) for each heavy quark and consistent boundary contitions.
- Parameters:
masses_ref – reference scale squared (a.k.a. \(Q_{ref}\))
couplings – couplings configuration
order – perturbative order
evmeth – evolution method
matching – threshold matching scale ratios
xif2 – squared ratio of factorization to central scale
- Returns:
masses – list of \(\overline{MS}\) masses squared
- Return type:
eko.version module
Define versions.
Both package and data versions are stored here.