pineappl package

Submodules

pineappl.bin module

class pineappl.bin.BinRemapper(normalizations, limits)[source]

Bases: PyWrapper

Python wrapper object for PyBinRemapper.

Parameters:
  • normalizations (sequence(float)) – list with normalizations

  • limits (list(tuple(float,float))) – all bin limits as a flat list

pineappl.fk_table module

class pineappl.fk_table.FkAssumptions(assumption)[source]

Bases: PyWrapper

Python wrapper object to interface PyFkAssumptions.

Parameters:

assumption (str) – assumption identifier

class pineappl.fk_table.FkTable(pyfktable)[source]

Bases: PyWrapper

Python wrapper object to interface PyFkTable.

Parameters:

pyfktable (PyFkTable) – raw wrapper object

convolute_with_one(pdg_id, xfx, bin_indices=array([], dtype=uint64), lumi_mask=array([], dtype=bool))[source]

Convolute FkTable with a pdf.

Parameters:
  • pdg_id (int) – PDG Monte Carlo ID of the hadronic particle xfx is the PDF for

  • xfx (callable) – lhapdf like callable with arguments pid, x, Q2 returning x*pdf for \(x\)-grid

  • bin_indices (sequence(int)) – A list with the indices of the corresponding bins that should be calculated. An empty list means that all orders should be calculated.

  • lumi_mask (sequence(bool)) – Mask for selecting specific luminosity channels. The value True means the corresponding channel is included. An empty list corresponds to all channels being enabled.

Returns:

cross sections for all bins, for each scale-variation tuple (first all bins, then the scale variation)

Return type:

list(float)

classmethod from_grid(grid)[source]
optimize(assumptions='Nf6Ind')[source]

Optimize FK table storage.

In order to perform any relevant optimization, assumptions are needed, and they are passed as parameters to the function.

Parameters:

assumptions (FkAssumptions or str) – assumptions about the FkTable properties, declared by the user, deciding which optimizations are possible

classmethod read(path)[source]

Load an existing grid from file.

Convenience wrapper for pineappl.pineappl.PyFkTable.read().

Parameters:

path (pathlike) – file path

Returns:

grid object

Return type:

FkTable

pineappl.grid module

class pineappl.grid.Grid(pygrid)[source]

Bases: PyWrapper

Python wrapper object to interface PyGrid.

To create an object, you should call either create() or read().

Parameters:

pygrid (PyGrid) – raw wrapper object

convolute_eko(operators, mur2_grid, alphas_values, lumi_id_types='pdg_mc_ids', order_mask=(), xi=(1.0, 1.0))[source]

Create an FKTable with the EKO.

Convenience wrapper for pineappl.pineappl.PyGrid.convolute_eko().

Parameters:
  • operators (dict) – EKO Output

  • mur2_grid (list[float]) – renormalization scales

  • alphas_values (list[float]) – alpha_s values associated to the renormalization scales

  • lumi_id_types (str) – kind of lumi types (e.g. “pdg_mc_ids” for flavor basis, “evol” for evolution basis)

  • order_mask (list(bool)) – Mask for selecting specific orders. The value True means the corresponding order is included. An empty list corresponds to all orders being enabled.

  • xi ((float, float)) – A tuple with the scale variation factors that should be used. The first entry of a tuple corresponds to the variation of the renormalization scale, the second entry to the variation of the factorization scale. If only results for the central scale are need the tuple should be (1.0, 1.0).

Returns:

raw grid as an FKTable

Return type:

PyFkTable

convolute_with_one(pdg_id, xfx, alphas, order_mask=array([], dtype=bool), bin_indices=array([], dtype=uint64), lumi_mask=array([], dtype=bool), xi=((1.0, 1.0),))[source]

Convolute grid with pdf.

Parameters:
  • pdg_id (int) – PDG Monte Carlo ID of the hadronic particle xfx is the PDF for

  • xfx (callable) – lhapdf like callable with arguments pid, x, Q2 returning x*pdf for \(x\)-grid

  • alphas (callable) – lhapdf like callable with arguments Q2 returning \(\alpha_s\)

  • order_mask (sequence(bool)) – Mask for selecting specific orders. The value True means the corresponding order is included. An empty list corresponds to all orders being enabled.

  • bin_indices (sequence(int)) – A list with the indices of the corresponding bins that should be calculated. An empty list means that all orders should be calculated.

  • lumi_mask (sequence(bool)) – Mask for selecting specific luminosity channels. The value True means the corresponding channel is included. An empty list corresponds to all channels being enabled.

  • xi (list((float, float))) – A list with the scale variation factors that should be used to calculate scale-varied results. The first entry of a tuple corresponds to the variation of the renormalization scale, the second entry to the variation of the factorization scale. If only results for the central scale are need the list should contain (1.0, 1.0).

Returns:

cross sections for all bins, for each scale-variation tuple (first all bins, then the scale variation)

Return type:

list(float)

convolute_with_two(pdg_id1, xfx1, pdg_id2, xfx2, alphas, order_mask=array([], dtype=bool), bin_indices=array([], dtype=uint64), lumi_mask=array([], dtype=bool), xi=((1.0, 1.0),))[source]

Convolute grid with two pdfs.

Parameters:
  • pdg_id1 (int) – PDG Monte Carlo ID of the hadronic particle xfx1 is the PDF for

  • xfx1 (callable) – lhapdf like callable with arguments pid, x, Q2 returning x*pdf for \(x\)-grid

  • pdg_id2 (int) – PDG Monte Carlo ID of the hadronic particle xfx2 is the PDF for

  • xfx2 (callable) – lhapdf like callable with arguments pid, x, Q2 returning x*pdf for \(x\)-grid

  • alphas (callable) – lhapdf like callable with arguments Q2 returning \(\alpha_s\)

  • order_mask (sequence(bool)) – Mask for selecting specific orders. The value True means the corresponding order is included. An empty list corresponds to all orders being enabled.

  • bin_indices (sequence(int)) – A list with the indices of the corresponding bins that should be calculated. An empty list means that all orders should be calculated.

  • lumi_mask (sequence(bool)) – Mask for selecting specific luminosity channels. The value True means the corresponding channel is included. An empty list corresponds to all channels being enabled.

  • xi (list((float, float))) – A list with the scale variation factors that should be used to calculate scale-varied results. The first entry of a tuple corresponds to the variation of the renormalization scale, the second entry to the variation of the factorization scale. If only results for the central scale are need the list should contain (1.0, 1.0).

Returns:

cross sections for all bins, for each scale-variation tuple (first all bins, then the scale variation)

Return type:

list(float)

classmethod create(lumi, orders, bin_limits, subgrid_params)[source]

Create a grid object from its ingredients.

Parameters:
  • lumi (list(LumiEntry)) – List of active luminosities

  • orders (list(Order)) – List of available orders

  • bin_limits (sequence(float)) – Bin limits

  • subgrid_params (SubgridParams) – subgrid parameters

delete_bins(bin_indices)[source]

Delete bins.

Repeated bins and those exceeding length are ignored.

Parameters:

bin_indices (sequence(int)) – list of indices of bins to removed

evolve(operators, mur2_grid, alphas_values, lumi_id_types='pdg_mc_ids', order_mask=(), xi=(1.0, 1.0))[source]

Create an FKTable with the EKO.

Convenience wrapper for pineappl.pineappl.PyGrid.evolve().

Parameters:
  • operators (dict) – EKO Output

  • mur2_grid (list[float]) – renormalization scales

  • alphas_values (list[float]) – alpha_s values associated to the renormalization scales

  • lumi_id_types (str) – kind of lumi types (e.g. “pdg_mc_ids” for flavor basis, “evol” for evolution basis)

  • order_mask (list(bool)) – Mask for selecting specific orders. The value True means the corresponding order is included. An empty list corresponds to all orders being enabled.

  • xi ((float, float)) – A tuple with the scale variation factors that should be used. The first entry of a tuple corresponds to the variation of the renormalization scale, the second entry to the variation of the factorization scale. If only results for the central scale are need the tuple should be (1.0, 1.0).

Returns:

raw grid as an FKTable

Return type:

PyFkTable

merge(other: Grid)[source]

Merge a second grid in the current one.

orders()[source]

Extract the available perturbative orders and scale variations.

Convenience wrapper for pineappl.pineappl.PyGrid.orders().

Parameters:

list(Order) – list with perturbative orders and scale variations

classmethod read(path)[source]

Load an existing grid from file.

Convenience wrapper for pineappl.pineappl.PyGrid.read().

Parameters:

path (pathlike) – file path

Returns:

grid object

Return type:

Grid

set_remapper(remapper)[source]

Set the normalizations.

Convenience wrapper for pineappl.pineappl.PyGrid.set_remapper().

Parameters:

remapper (BinRemapper) – Remapper object

set_subgrid(order, bin_, lumi, subgrid)[source]

Set the subgrid at the given position.

Convenience wrapper for pineappl.pineappl.PyGrid.set_subgrid().

Parameters:
  • order (int) – index of order

  • bin (int) – index of bin

  • lumi (int) – index of luminosity

  • subgrid (ImportOnlySubgridV1) – subgrid content

subgrid(order, bin_, lumi)[source]

Retrieve the subgrid at the given position.

Convenience wrapper for pineappl.pineappl.PyGrid.set_subgrid().

Parameters:
  • order (int) – index of order

  • bin (int) – index of bin

  • lumi (int) – index of luminosity

Returns:

subgrid – subgrid content

Return type:

Subgrid

class pineappl.grid.Order(alphas, alpha, logxir, logxif)[source]

Bases: PyWrapper

Python wrapper object to interface PyOrder.

Parameters:
  • alphas (int) – power of \(\alpha_s\)

  • alpha (int) – power of \(\alpha\)

  • logxir (int) – power of \(\log(\xi_r)\)

  • logxif (int) – power of \(\log(\xi_f)\)

static create_mask(orders, max_as, max_al, logs)[source]

Return a mask suitable to pass as the order_mask parameter of Grid.convolute().

Parameters:
  • orders (list(Order)) – list of available orders

  • max_as (int) – maximum power of \(\alpha_s\)

  • max_al (int) – maximum power of \(\alpha\)

  • logs (bool) – whether to include log grids or not

Returns:

boolean mask

Return type:

list(bool)

pineappl.import_only_subgrid module

class pineappl.import_only_subgrid.ImportOnlySubgridV1(array, q2_grid, x1_grid, x2_grid)[source]

Bases: PyWrapper

Python wrapper object to PyImportOnlySubgridV1.

Parameters:
  • array (numpy.ndarray(float, dim=3)) – 3-dimensional subgrid content

  • q2_grid (sequence(float)) – scale grid

  • x1_grid (sequence(float)) – interpolation grid for \(x_1\)

  • x2_grid (sequence(float)) – interpolation grid for \(x_2\)

class pineappl.import_only_subgrid.ImportOnlySubgridV2(array, mu2_grid, x1_grid, x2_grid)[source]

Bases: PyWrapper

Python wrapper object to PyImportOnlySubgridV2.

Parameters:
  • array (numpy.ndarray(float, dim=3)) – 3-dimensional subgrid content

  • mu2_grid (sequence(float)) – scale grid

  • x1_grid (sequence(float)) – interpolation grid for \(x_1\)

  • x2_grid (sequence(float)) – interpolation grid for \(x_2\)

pineappl.lumi module

class pineappl.lumi.LumiEntry(lumis)[source]

Bases: PyWrapper

Python wrapper object to PyLumiEntry.

Parameters:

lumis (list(tuple(int,int,float))) – sequence describing a luminosity function.

pineappl.pineappl module

PyO3 Python module that contains all exposed classes from Rust.

NOTE: this name has to match the one in Cargo.toml ‘lib.name’

class pineappl.pineappl.PyBinRemapper(normalizations, limits)

Bases: object

PyO3 wrapper to pineappl::bin::BinRemapper

Usage: yadism

class pineappl.pineappl.PyEvolveInfo

Bases: object

PyO3 wrapper to pineappl::evolution::EvolveInfo

fac1

Squared factorization scales of the Grid.

pids1

Particle identifiers of the Grid.

ren1

Renormalization scales of the Grid.

x1

x-grid coordinates of the Grid.

class pineappl.pineappl.PyFkAssumptions(assumption)

Bases: object

class pineappl.pineappl.PyFkTable(grid)

Bases: object

PyO3 wrapper to pineappl::fk_table::FkTable

Usage: pineko, yadism

bin_dimensions()

Extract the number of dimensions for bins.

E.g.: two differential cross-sections will return 2.

Returns:

bin dimension

Return type:

int

bin_left(dimension)

Extract the left edges of a specific bin dimension.

Parameters:

dimension (int) – bin dimension

Returns:

left edges of bins

Return type:

numpy.ndarray(float)

bin_normalizations()

Extract the normalizations for each bin.

Returns:

bin normalizations

Return type:

numpy.ndarray

bin_right(dimension)

Extract the right edges of a specific bin dimension.

Parameters:

dimension (int) – bin dimension

Returns:

right edges of bins

Return type:

numpy.ndarray(float)

bins()

Get number of bins.

Returns:

number of bins

Return type:

int

convolute_with_one(pdg_id, xfx, bin_indices=None, lumi_mask=None)

Convolute grid with pdf.

Usage: pineko

Parameters:
  • pdg_id (integer) – PDG Monte Carlo ID of the hadronic particle xfx is the PDF for

  • xfx (callable) – lhapdf like callable with arguments pid, x, Q2 returning x*pdf for \(x\)-grid

Returns:

cross sections for all bins

Return type:

numpy.ndarray(float)

key_values()

Get metadata values stored in the grid.

Returns:

key, value map

Return type:

dict

lumi()

Get luminsosity functions.

Returns:

luminosity functions as pid tuples

Return type:

list(tuple(float,float))

muf2()

Get reference (fitting) scale.

Returns:

reference scale

Return type:

float

optimize(assumptions)

Optimize FK table storage

In order to perform any relevant optimization, assumptions are needed, and they are passed as parameters to the function.

Parameters:

assumptions (FkAssumptions) – assumptions about the FkTable properties, declared by the user, deciding which optimizations are possible

static read(path)
set_key_value(key, value)

Set a metadata key-value pair in the FK table.

Parameters:
  • key (str) – key

  • value (str) – value

table()

Get cross section tensor.

Returns:

4-dimensional tensor with indixes: bin, lumi, x1, x2

Return type:

numpy.ndarray

write(path)

Write grid to file.

Usage: pineko

Parameters:

path (str) – file path

write_lz4(path)

Write grid to file using lz4.

Usage: pineko

Parameters:

path (str) – file path

x_grid()

Get (unique) interpolation grid.

Returns:

x_grid – interpolation grid

Return type:

numpy.ndarray(float)

class pineappl.pineappl.PyGrid(lumi, orders, bin_limits, subgrid_params)

Bases: object

PyO3 wrapper to pineappl::grid::Grid

Usage: yadism, pineko, FKTable interface

axes()

Extract the necessary informations for EKO.

Usage: pineko

Returns:

  • x_grid (numpy.ndarray(float)) – interpolation grid

  • pids (numpy.ndarray(int)) – particle ids

  • mur2_grid (numpy.ndarray(float)) – factorization scale list

  • muf2_grid (numpy.ndarray(float)) – factorization scale list

bin_dimensions()

Extract the number of dimensions for bins.

Usage: pineko

E.g.: two differential cross-sections will return 2.

Returns:

bin dimension

Return type:

int

bin_left(dimension)

Extract the left edges of a specific bin dimension.

Usage: pineko

Parameters:

dimension (int) – bin dimension

Returns:

left edges of bins

Return type:

numpy.ndarray(float)

bin_normalizations()

Extract the normalizations for each bin.

Usage: runcards

Returns:

bin normalizations

Return type:

np.ndarray

bin_right(dimension)

Extract the right edges of a specific bin dimension.

Usage: pineko

Parameters:

dimension (int) – bin dimension

Returns:

right edges of bins

Return type:

numpy.ndarray(float)

bins()

Return the number of bins.

Returns:

Number of bins

Return type:

int

convolute_eko(muf2_0, alphas, pids, x_grid, target_pids, target_x_grid, mur2_grid, muf2_grid, operator, lumi_id_types, order_mask, xi)

Convolute with with an evolution operator.

Usage: pineko

Parameters:
Returns:

produced FK table

Return type:

PyFkTable

convolute_with_one(pdg_id, xfx, alphas, order_mask, bin_indices, lumi_mask, xi)

Convolute grid with pdf.

Usage: pineko

Parameters:
  • pdg_id (int) – PDG Monte Carlo ID of the hadronic particle xfx is the PDF for

  • xfx (callable) – lhapdf like callable with arguments pid, x, Q2 returning x*pdf for \(x\)-grid

  • alphas (callable) – lhapdf like callable with arguments Q2 returning \(\alpha_s\)

  • order_mask (numpy.ndarray(bool)) – Mask for selecting specific orders. The value True means the corresponding order is included. An empty list corresponds to all orders being enabled.

  • bin_indices (numpy.ndarray(int)) – A list with the indices of the corresponding bins that should be calculated. An empty list means that all orders should be calculated.

  • lumi_mask (numpy.ndarray(bool)) – Mask for selecting specific luminosity channels. The value True means the corresponding channel is included. An empty list corresponds to all channels being enabled.

  • xi (list((float, float))) – A list with the scale variation factors that should be used to calculate scale-varied results. The first entry of a tuple corresponds to the variation of the renormalization scale, the second entry to the variation of the factorization scale. If only results for the central scale are need the list should contain (1.0, 1.0).

Returns:

cross sections for all bins, for each scale-variation tuple (first all bins, then the scale variation)

Return type:

numpy.ndarray(float)

convolute_with_two(pdg_id1, xfx1, pdg_id2, xfx2, alphas, order_mask, bin_indices, lumi_mask, xi)

Convolute grid with two pdfs.

Usage: pineko

Parameters:
  • pdg_id1 (int) – PDG Monte Carlo ID of the hadronic particle xfx1 is the PDF for

  • xfx1 (callable) – lhapdf like callable with arguments pid, x, Q2 returning x*pdf for \(x\)-grid

  • pdg_id2 (int) – PDG Monte Carlo ID of the hadronic particle xfx2 is the PDF for

  • xfx2 (callable) – lhapdf like callable with arguments pid, x, Q2 returning x*pdf for \(x\)-grid

  • alphas (callable) – lhapdf like callable with arguments Q2 returning \(\alpha_s\)

  • order_mask (numpy.ndarray(bool)) – Mask for selecting specific orders. The value True means the corresponding order is included. An empty list corresponds to all orders being enabled.

  • bin_indices (numpy.ndarray(int)) – A list with the indices of the corresponding bins that should be calculated. An empty list means that all orders should be calculated.

  • lumi_mask (numpy.ndarray(bool)) – Mask for selecting specific luminosity channels. The value True means the corresponding channel is included. An empty list corresponds to all channels being enabled.

  • xi (list((float, float))) – A list with the scale variation factors that should be used to calculate scale-varied results. The first entry of a tuple corresponds to the variation of the renormalization scale, the second entry to the variation of the factorization scale. If only results for the central scale are need the list should contain (1.0, 1.0).

Returns:

cross sections for all bins, for each scale-variation tuple (first all bins, then the scale variation)

Return type:

numpy.ndarray(float)

delete_bins(bin_indices)

Delete bins.

Repeated bins and those exceeding length are ignored.

Parameters:

bin_indices (numpy.ndarray[int]) – list of indices of bins to removed

evolve(operator, fac0, pids0, x0, fac1, pids1, x1, ren1, alphas, xi, lumi_id_types, order_mask)

Convolute with grid with an evolution operator.

Parameters:
Returns:

produced FK table

Return type:

PyFkTable

evolve_info(order_mask)

Convolute with grid with an evolution operator.

Parameters:

order_mask (numpy.ndarray(bool)) – boolean mask to activate orders

Returns:

produced FK table

Return type:

PyEvolveInfo

evolve_with_slice_iter(slices, order_mask, xi, ren1, alphas)

TODO

Parameters:
  • slices (TODO)

  • order_mask (TODO)

Return type:

TODO

fill(x1, x2, q2, order, observable, lumi, weight)

Add a point to the grid.

Parameters:
  • x1 (float) – first momentum fraction

  • x2 (float) – second momentum fraction

  • q2 (float) – process scale

  • order (int) – order index

  • observable (float) – reference point (to be binned)

  • lumi (int) – luminosity index

  • weight (float) – cross section weight

fill_all(x1, x2, q2, order, observable, weights)

Add a point to the grid for all lumis.

Parameters:
  • x1 (float) – first momentum fraction

  • x2 (float) – second momentum fraction

  • q2 (float) – process scale

  • order (int) – order index

  • observable (float) – reference point (to be binned)

  • weights (np.array(float)) – cross section weights, one for each lumi

fill_array(x1s, x2s, q2s, order, observables, lumi, weights)

Add an array to the grid.

Useful to avoid multiple python calls, leading to performance improvement.

Parameters:
  • ntuples (np.array(float)) – 2 dimensional (4, N) array, made of (x1, x2, q2, weight) “ntuples”

  • order (int) – order index

  • observable (float) – reference point (to be binned)

  • lumi (int) – luminosity index

key_values()

Get metadata values stored in the grid.

Returns:

key, value map

Return type:

dict

lumi()

Get luminsosity functions.

Returns:

luminosity functions as pid tuples (multiple tuples can bee associated to the same contribution)

Return type:

list(list(tuple(float,float)))

merge(other)

Merge grid with another one

merge_from_file(path)

Merge grid with another one, loaded from file

Note

For a current limitation with the implementation of the bound object Grid is not possible to operate with two Grid`s in memory, since is not possible to pass a `Grid by argument

optimize()

Optimize grid content.

Usage: yadism

orders()

Extract the available perturbative orders and scale variations.

Returns:

list with perturbative orders and scale variations

Return type:

list(PyOrder)

static read(path)

Load grid from file.

Usage: pineko, FKTable generation

Parameters:

path (str) – file path

Returns:

grid

Return type:

PyGrid

scale(factor)

Scale all subgrids.

Parameters:

factor (float) – scalar factor by which scaling

scale_by_bin(factors)

Scale subgrids bin by bin.

Parameters:

factors (numpy.ndarray[float]) – bin-dependent factors by which scaling

set_key_value(key, value)

Set a metadata key-value pair in the grid.

Usage: yadism

Parameters:
  • key (str) – key

  • value (str) – value

set_remapper(remapper)

Set the normalizations.

Usage: yadism

Parameters:

remapper (BinRemapper) – Remapper object

set_subgrid(order, bin, lumi, subgrid)

Set a subgrid.

Usage: yadism

subgrid(order, bin, lumi)

Retrieve a subgrid.

Usage: yadism

write(path)

Write grid to file.

Usage: yadism

Parameters:

path (str) – file path

write_lz4(path)

Write grid to compressed file.

Parameters:

path (str) – file path

class pineappl.pineappl.PyImportOnlySubgridV1(array, q2_grid, x1_grid, x2_grid)

Bases: object

PyO3 wrapper to pineappl::import_only_subgrid::ImportOnlySubgridV1

Usage: yadism

into()

Wrapper to match pineappl.pineappl.PyGrid.set_subgrid()

Returns:

casted object

Return type:

PySubgridEnum

class pineappl.pineappl.PyImportOnlySubgridV2(array, mu2_grid, x1_grid, x2_grid)

Bases: object

PyO3 wrapper to pineappl::import_only_subgrid::ImportOnlySubgridV2

Usage: pineko

into()

Wrapper to match pineappl.pineappl.PyGrid.set_subgrid()

Returns:

casted object

Return type:

PySubgridEnum

class pineappl.pineappl.PyLumiEntry(entry)

Bases: object

PyO3 wrapper to pineappl::lumi::LumiEntry

Usage: yadism, FKTable interface

Each entry consists of a tuple, which contains, in the following order:

  1. the PDG id of the first incoming parton

  2. the PDG id of the second parton

  3. a numerical factor that will multiply the result for this specific combination.

into_array()

Get list representation.

Usage: FKTable interface

Returns:

list representation

Return type:

list(tuple(int,int,float))

class pineappl.pineappl.PyMu2(ren, fac)

Bases: object

PyO3 wrapper to pineappl::subgrid::Mu2

fac
ren
class pineappl.pineappl.PyOrder(alphas, alpha, logxir, logxif)

Bases: object

PyO3 wrapper to pineappl::grid::Order

Usage: yadism

as_tuple()

Tuple representation.

Returns:

  • alphas (int) – power of \(\alpha_s\)

  • alpha (int) – power of \(\alpha\)

  • logxir (int) – power of :math:` ln(xi_r)`

  • logxif (int) – power of :math:` ln(xi_f)`

static create_mask(orders, max_as, max_al, logs)

Return a mask suitable to pass as the order_mask parameter of [Grid::convolute]. The selection of orders is controlled using the max_as and max_al parameters, for instance setting max_as = 1 and max_al = 0 selects the LO QCD only, max_as = 2 and max_al = 0 the NLO QCD; setting max_as = 3 and max_al = 2 would select all NLOs, and the NNLO QCD.

See pineappl crate docs for relevant examples

Returns:

boolean array, to be used as orders’ mask

Return type:

numpy.ndarray(bool)

class pineappl.pineappl.PySubgridEnum

Bases: object

PyO3 wrapper to pineappl::subgrid::SubgridEnum

into()
mu2_grid()

Return the array of mu2 objects of a subgrid

scale(factor)

Scale the subgrid by factor.

Parameters:

factor (float) – scaling factor

to_array3()

Return the dense array of the subgrid.

x1_grid()

Return the array of x1 of a subgrid

x2_grid()

Return the array of x2 of a subgrid

class pineappl.pineappl.PySubgridParams

Bases: object

PyO3 wrapper to pineappl::subgrid::SubgridParams

Usage: yadism

set_q2_bins(q2_bins)

Set number of \(Q^2\) bins.

Parameters:

q2_bins (int) – number of bins

set_q2_max(q2_max)

Set the upper limit for \(Q^2\).

Parameters:

q2_max (float) – new q2_max

set_q2_min(q2_min)

Set the lower limit for \(Q^2\).

Parameters:

q2_min (float) – new q2_min

set_q2_order(q2_order)

Set interpolation order for \(Q^2_{grid}\).

Parameters:

q2_order (float) – new q2_order

set_reweight(reweight)

Set reweighting.

Usage: yadism

Parameters:

reweight (bool) – apply reweighting?

set_x_bins(x_bins)

Set number of x bins.

Usage: yadism

Parameters:

x_bins (int) – number of bins

set_x_max(x_max)

Set \(x_{max}\).

Usage: yadism

Parameters:

x_max (float) – new x_max

set_x_min(x_min)

Set \(x_{min}\).

Usage: yadism

Parameters:

x_min (float) – new x_min

set_x_order(x_order)

Set interpolation order for \(x_{grid}\).

Usage: yadism

Parameters:

x_order (float) – new x_order

pineappl.subgrid module

class pineappl.subgrid.Mu2(ren, fac)[source]

Bases: PyWrapper

class pineappl.subgrid.SubgridParams[source]

Bases: PyWrapper

Python wrapper object to PySubgridParams.

pineappl.utils module

class pineappl.utils.PyWrapper[source]

Bases: object

Python wrapper helper to delegate function calls to the underlying raw object.

property raw

Raw PyO3 object