evolven3fit package

Submodules

evolven3fit.cli module

evolven3fit.cli.cli_evolven3fit(configuration_folder, q_fin, q_points, op_card_info, theory_card_info, force, load, dump)[source]

Evolves the fitted PDFs.

The q_grid starts at the Q0 given by the theory but the last point is q_fin and its number of points can be specified by q_points. If just one of the two is not specified by the user, the default grid will be used.

If a path is given for the dump option, the eko will be dumped in that path after the computation.

If a path is given for the load option, the eko to be used for the evolution will be loaded from that path.

The two options are mutually exclusive.

evolven3fit.eko_utils module

evolven3fit.eko_utils.build_opcard(op_card_dict, theory, x_grid, mu0, mugrid)[source]

Build the operator card. The user provided options should be given as part of op_card_dict

evolven3fit.eko_utils.construct_eko_cards(nnpdf_theory, q_fin, q_points, x_grid, op_card_dict: Optional[Dict[str, Any]] = None, theory_card_dict: Optional[Dict[str, Any]] = None, legacy40: bool = False)[source]

Return the theory and operator cards used to construct the eko. nnpdf_theory is a NNPDF theory card for which we are computing the operator card and eko q_fin is the final point of the q grid while q_points is the number of points of the grid. x_grid is the x grid to be used. op_card_dict and theory_card_dict are optional updates that can be provided respectively to the operator card and to the theory card.

evolven3fit.eko_utils.construct_eko_photon_cards(nnpdf_theory, q_fin, x_grid, q_gamma, op_card_dict: Optional[Dict[str, Any]] = None, theory_card_dict: Optional[Dict[str, Any]] = None)[source]

Return the theory and operator cards used to construct the eko_photon. nnpdf_theory is a NNPDF theory card for which we are computing the operator card and eko q_fin is the final point of the q grid while q_points is the number of points of the grid. x_grid is the x grid to be used. op_card_dict and theory_card_dict are optional updates that can be provided respectively to the operator card and to the theory card.

evolven3fit.eko_utils.load_theory(nnpdf_theory, theory_card_dict)[source]

loads and returns the theory dictionary and the thresholds

evolven3fit.evolve module

evolven3fit.evolve.dump_evolved_replica(evolved_blocks, usr_path, replica_num)[source]

Dump the evolved replica given by evolved_block as the replica num “replica_num” in the folder usr_path/nnfit/replica_<replica_num>/usr_path.stem.dat

Parameters
  • evolved_block (list(numpy.array)) – list of blocks of an evolved PDF

  • usr_path (pathlib.Path) – path of the fit folder

  • replica_num (int) – replica number

evolven3fit.evolve.dump_info_file(usr_path, info)[source]

Dump the info file given by info in the folder usr_path/nnfit/usr_path.stem.info.

Parameters
  • usr_path (pathlib.Path) – path of the fit folder

  • info (dict) – info of the fit

evolven3fit.evolve.evolve_fit(fit_folder, q_fin, q_points, op_card_dict, theory_card_dict, force, eko_path, dump_eko=None)[source]

Evolves all the fitted replica in fit_folder/nnfit

Parameters
  • fit_folder (str or pathlib.Path) – path to the folder containing the fit

  • q_fin (float) – final point of the q_grid

  • q_points (int) – number of points in the q_grid

  • op_card_dict (dict) – user settings for the op_card

  • theory_card_dict (dict) – user settings for the t_card

  • force (bool) – whether to force the evolution to be done again

  • eko_path (str or pathlib.Path) – path where the eko is stored (if None the eko will be recomputed)

  • dump_eko (str or pathlib.Path) – path where the eko is dumped (necessary only if the eko is computed)

evolven3fit.evolve.load_fit(usr_path)[source]

Loads all the replica pdfs at fitting scale in usr_path and return the exportgrids

Parameters

usr_path (pathlib.Path) – path to the folder containing the fit

Returns

  • dict

  • exportgrids info

evolven3fit.q2grids module

Definition of default Q2 grids

This file includes:

  • Q2GRID_DEFAULT: default NNPDF Q2 grid for evolution (55 points, starts at Q=1GeV)

  • Q2GRID_NNPDF40: q2 grid used in the fits for the NNPDF4.0 release (49 points, starts at Q=1.65 GeV)

  • Q2GRID_Nf03: q2 grid used in the perturvative charm fits for the NNPDF4.0 release (48 points, starts at Q=1GeV)

evolven3fit.utils module

evolven3fit.utils.check_is_a_fit(config_folder)[source]

Check if config_folder is a fit folder, i.e. if it contains the filter.yml file and the nnfit folder.

evolven3fit.utils.fix_info_path(usr_path)[source]

Fix the location of the info file from the folder nnfit/usr_path to just nnfit

Examples

Starting from the info path

initial_info_file_path = “/myfolder/myfit/nnfit/myfit/myfit.info”

and using this function with usr_path = “/myfolder/myfit”, one gets

final_info_file_path = “/myfolder/myfit/nnfit/myfit.info”

evolven3fit.utils.fix_replica_path(usr_path, replica_num)[source]

Fix the location of the dat file of the replica <replica_num> from the folder nnfit/usr_path to just nnfit/replica_<replica_num>

Examples

Starting from the replica 5 path

initial_replica_file_path = “/myfolder/myfit/nnfit/myfit/myfit_5.dat”

and using this function with usr_path = “/myfolder/myfit”, one gets

final_replica_file_path = “/myfolder/myfit/nnfit/replica_5/myfit.dat”

evolven3fit.utils.generate_q2grid(Q0, Qfin, Q_points, match_dict, nf0=None, legacy40=False)[source]

Generate the q2grid used in the final evolved pdfs or use the default grid if Qfin or Q_points is not provided.

match_dict contains the couples (mass : factor) where factor is the number to be multiplied to mass in order to obtain the relative matching scale.

evolven3fit.utils.get_theoryID_from_runcard(usr_path)[source]

Return the theoryID from the runcard

evolven3fit.utils.read_runcard(usr_path)[source]

Read the runcard and return the relevant information for evolven3fit

Module contents