Useful Functions

Utilities.pdg_to_latex(pdg_id)[source]

Converts a given PDG ID or a list of PDG IDs into the corresponding LaTeX formatted particle name as sts or a list of LaTeX formatted particle names as str which has the same order as the input PDG IDs

Parameters:
pdg_idint / list

PDG ID or a list of PDG IDs

Returns:
latex_namesstr / list

LaTeX formatted particle name or list of LaTeX formatted particle names in the same order as the input PDG IDs.

Examples

1>>> from sparkx.Utilities import pdg_to_latex
2>>>
3>>> pdg_ids = [2112, -3112, 4232]
4>>>
5>>> latex_names = pdg_to_latex(pdg_ids)
6>>> print(latex_names)
7
8['n', '\overline{\Sigma}^{+}', '\Xi_{c}^{+}']