{"id":19098250,"url":"https://github.com/scikit-hep/particle","last_synced_at":"2026-04-16T21:07:30.431Z","repository":{"id":34066448,"uuid":"158364052","full_name":"scikit-hep/particle","owner":"scikit-hep","description":"Package to deal with particles, the PDG particle data table, PDGIDs, etc.","archived":false,"fork":false,"pushed_at":"2026-04-13T10:39:41.000Z","size":1942,"stargazers_count":162,"open_issues_count":8,"forks_count":28,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-13T12:30:21.530Z","etag":null,"topics":["analysis","hep","high-energy-physics","particle","particle-physics","pdg","pid","scikit-hep"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scikit-hep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":".zenodo.json","notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-11-20T09:32:10.000Z","updated_at":"2026-04-13T10:39:44.000Z","dependencies_parsed_at":"2026-03-31T10:02:59.892Z","dependency_job_id":null,"html_url":"https://github.com/scikit-hep/particle","commit_stats":{"total_commits":643,"total_committers":20,"mean_commits":32.15,"dds":"0.47278382581648526","last_synced_commit":"a48c768d1c86d4df18b1214fcde38aaeb4461526"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/scikit-hep/particle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-hep%2Fparticle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-hep%2Fparticle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-hep%2Fparticle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-hep%2Fparticle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scikit-hep","download_url":"https://codeload.github.com/scikit-hep/particle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scikit-hep%2Fparticle/sbom","scorecard":{"id":804777,"data":{"date":"2025-08-11","repo":{"name":"github.com/scikit-hep/particle","commit":"54c06ccd7b028f8c60d3d215d1ec3f6b25fbd503"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.6,"checks":[{"name":"Code-Review","score":3,"reason":"Found 2/6 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"15 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/cd.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/cd.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cd.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/cd.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cd.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cd.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/cd.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cd.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/cd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:98: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:109: update your workflow using https://app.stepsecurity.io/secureworkflow/scikit-hep/particle/ci.yml/main?enable=pin","Info:   2 out of  16 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.25.0 not signed: https://api.github.com/repos/scikit-hep/particle/releases/169482347","Warn: release artifact v0.25.0 does not have provenance: https://api.github.com/repos/scikit-hep/particle/releases/169482347"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/cd.yml:51"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T11:28:29.173Z","repository_id":34066448,"created_at":"2025-08-23T11:28:29.173Z","updated_at":"2025-08-23T11:28:29.173Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31904136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","hep","high-energy-physics","particle","particle-physics","pdg","pid","scikit-hep"],"created_at":"2024-11-09T03:44:46.322Z","updated_at":"2026-04-16T21:07:30.399Z","avatar_url":"https://github.com/scikit-hep.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":["Pure physics"],"readme":"\u003cimg alt=\"Particle Logo\" src=\"https://github.com/scikit-hep/particle/raw/main/docs/ParticleLogo300.png\"/\u003e\n\n# Particle: PDG particle data and identification codes\n\n[![Scikit-HEP](https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg)](https://scikit-hep.org/)\n[![PyPI Package latest release](https://img.shields.io/pypi/v/particle.svg)](https://pypi.python.org/pypi/particle)\n[![Conda latest release](https://img.shields.io/conda/vn/conda-forge/particle.svg)](https://github.com/conda-forge/particle-feedstock)\n[![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2552429.svg)](https://doi.org/10.5281/zenodo.2552429)\n\n[![GitHub Actions Status: CI](https://github.com/scikit-hep/particle/workflows/CI/badge.svg)](https://github.com/scikit-hep/particle/actions)\n[![Code Coverage](https://codecov.io/gh/scikit-hep/particle/branch/main/graph/badge.svg)](https://app.codecov.io/gh/scikit-hep/particle/tree/main)\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/scikit-hep/particle/main?urlpath=lab/tree/notebooks/ParticleDemo.ipynb)\n\nParticle provides a pythonic interface to the [Particle Data Group](http://pdg.lbl.gov/) (PDG)\nparticle data tables and particle identification codes,\nwith extended particle information and extra goodies.\n\nThe PDG defines the standard particle identification (ID) numbering scheme.\nThe package provides the `PDGID` class implementing queries on those PDG IDs.\nThe queries are also accessible through free standing functions mimicking,\nand expanding from, the HepPID/HepPDT C++ interface.\n\nThe `Particle` class wraps the information in the PDG particle data tables and\nprovides an object-oriented interface and powerful search and look-up utilities.\n\n## Installation\n\nInstall `particle` like any other Python package:\n\n```bash\npython -m pip install particle\n```\n\nor similar (use `--user`, `virtualenv`, etc. if you wish).\n\n## Strict dependencies\n\n- [Python](http://docs.python-guide.org/en/latest/starting/installation/) (3.9)\n- [attrs](http://www.attrs.org/en/stable/) provides classes without boilerplate (similar to DataClasses in Python 3.7)\n- [hepunits](https://github.com/scikit-hep/hepunits)\\_ provides units for the Scikit-HEP packages\n\n## Changelog\n\nSee the [changelog](https://github.com/scikit-hep/particle/blob/main/docs/CHANGELOG.md) for a history of notable changes.\n\n## Getting started: PDG IDs\n\n```python\n\u003e\u003e\u003e from particle import PDGID\n\u003e\u003e\u003e\n\u003e\u003e\u003e pid = PDGID(211)\n\u003e\u003e\u003e pid\n\u003cPDGID: 211\u003e\n\u003e\u003e\u003e pid.is_meson\nTrue\n\u003e\u003e\u003e pid = PDGID(99999999)\n\u003e\u003e\u003e pid\n\u003cPDGID: 99999999 (is_valid==False)\u003e\n```\n\nFor convenience, all properties of the `PDGID` class are available as standalone functions that work on any SupportsInt (including `Particle`):\n\n```python\n\u003e\u003e\u003e from particle.pdgid import is_meson\n\u003e\u003e\u003e\n\u003e\u003e\u003e is_meson(211)\nTrue\n```\n\nThese composable functions qualifying PDG IDs make it easy to classify particles.\nFor the sake of example, quarkonia can be specified with the following user-defined functions:\n\n```python\n\u003e\u003e\u003e is_heavy_flavor = lambda x: has_charm(x) or has_bottom(x) or has_top(x)\n\u003e\u003e\u003e is_quarkonium = lambda x: is_meson(x) and is_heavy_flavor(x) and Particle.from_pdgid(x).is_self_conjugate\n```\n\nPDG ID literals provide (`PDGID` class) aliases for all particles loaded, with easily recognisable names.\nFor example:\n\n```python\n\u003e\u003e\u003e from particle.pdgid import literals as lid\n\u003e\u003e\u003e\n\u003e\u003e\u003e lid.pi_plus\n\u003cPDGID: 211\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e from particle.pdgid.literals import Lambda_b_0\n\u003e\u003e\u003e Lambda_b_0\n\u003cPDGID: 5122\u003e\n\u003e\u003e\u003e Lambda_b_0.has_bottom\nTrue\n```\n\nYou can quickly display `PDGID` info from the command line with:\n\n```bash\n$ python -m particle pdgid 323\n\u003cPDGID: 323\u003e\nA              None\nJ              1.0\nL              0\nS              1\nZ              None\nabspid         323\ncharge         1.0\nhas_bottom     False\n...\n```\n\nSimilarly, classes exist to express identification codes used by MC programs, see information on converters below.\n\n## Getting started: Particles\n\nYou can use a variety of methods to get particles. If you know the PDG ID number or, say, the name used in EvtGen, you can get a particle directly.\n\n```python\n\u003e\u003e\u003e from particle import Particle\n\u003e\u003e\u003e Particle.from_pdgid(211)\n\u003cParticle: name=\"pi+\", pdgid=211, mass=139.57039 ± 0.00018 MeV\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e Particle.from_evtgen_name(\"J/psi\")\n\u003cParticle: name=\"J/psi(1S)\", pdgid=443, mass=3096.900 ± 0.006 MeV\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e Particle.from_nucleus_info(a=12, z=6)\n\u003cParticle: name=\"C12\", pdgid=1000060120, mass=11177.9291399 MeV\u003e\n```\n\nA similar method exists to get a list of particles from a PDG style name:\n\n```python\n\u003e\u003e\u003e Particle.findall(pdg_name=\"pi\")\n```\n\nreturns the list of matching particles whose PDG name is \"pi\",\nwhich in this case comprises the three charged states of the pseudoscalar pion.\n\nElse, and more generally, you can use a search. A basic example is the following:\n\n```python\n\u003e\u003e\u003e next(Particle.finditer('pi'))  # first item in iterator of particles\n\u003cParticle: name=\"pi0\", pdgid=111, mass=134.9768 ± 0.0005 MeV\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e Particle.findall('pi')[0]  # Same as above but returning a list of particles\n\u003cParticle: name=\"pi0\", pdgid=111, mass=134.9768 ± 0.0005 MeV\u003e\n```\n\nYou can search for the properties using keyword arguments, which include\n`pdg_name`, `name`, `mass`, `width`, `charge`, `three_charge`, `anti_flag`, `rank`,\n`I`, `J`, `G`, `P`, `quarks`, `status`,\n`mass_upper`, `mass_lower`, `width_upper`, and `width_lower`.\nYou can pass a callable or an exact match for any property.\nThe argument `particle` can be set to `True`/`False`, as well,\nto limit the search to particles or antiparticles.\n\nYou can also build the search yourself with the first positional\nargument, which accepts a callable that is given the particle object itself.\nIf the first positional argument is a string, that will match against the\nparticle's `name`.\n\nHere are possible sophisticated searches, all of which work with either\n`Particle.findall` or `Particle.finditer`, where the former method provides a list\nwhereas the latter returns an iterator.\n\n```python\n\u003e\u003e\u003e # Print out all particles with asymmetric decay width uncertainties\n\u003e\u003e\u003e ps = Particle.finditer(lambda p: p.width_lower != p.width_upper)\n\u003e\u003e\u003e for p in ps:\n...     print(p.name, p.pdgid, p.width_lower, p.width_upper)\n\u003e\u003e\u003e\n\u003e\u003e\u003e # Find all antiparticles with 'Omega' in the name\n\u003e\u003e\u003e Particle.finditer('Omega', particle=False)   # several found\n\u003e\u003e\u003e\n\u003e\u003e\u003e # Find all antiparticles of name=='Omega'\n\u003e\u003e\u003e Particle.finditer(name='Omega', particle=False)  # none found\n\u003e\u003e\u003e\n\u003e\u003e\u003e # Find all antiparticles of pdg_name=='Omega'\n\u003e\u003e\u003e Particle.findall(pdg_name='Omega', particle=False)  # only 1, of course\n[\u003cParticle: name=\"Omega~+\", pdgid=-3334, mass=1672.5 ± 0.3 MeV\u003e]\n\u003e\u003e\u003e\n\u003e\u003e\u003e # Find all neutral beauty hadrons\n\u003e\u003e\u003e Particle.findall(lambda p: p.pdgid.has_bottom and p.charge==0)\n\u003e\u003e\u003e\n\u003e\u003e\u003e # Find all strange mesons with c*tau \u003e 1 meter\n\u003e\u003e\u003e from hepunits import meter\n\u003e\u003e\u003e Particle.findall(lambda p: p.pdgid.is_meson and p.pdgid.has_strange and p.ctau \u003e 1 * meter, particle=True)\n[\u003cParticle: name=\"K(L)0\", pdgid=130, mass=497.611 ± 0.013 MeV\u003e,\n    \u003cParticle: name=\"K+\", pdgid=321, mass=493.677 ± 0.016 MeV\u003e]\n```\n\nOnce you have a particle, any of the properties can be accessed, along with several methods.\nThough they are not real properties, you can access `is_name_barred`, and `spin_type`.\nYou can also `.invert()` a particle.\n\nThere are lots of printing choices for particles:\n`describe()`, `programmatic_name`, `latex_name`, `html_name`, HTML printing outs in notebooks,\nand of course `repr` and `str` support.\n\nYou can get the `.pdgid` from a particle, as well.\nSorting particles will put lowest `abs(PDGID)` first.\n\nParticle literals provide (`Particle` class) aliases for the particles loaded,\nwith easily recognisable names. For example:\n\n```python\n\u003e\u003e\u003e from particle import literals as lp\n\u003e\u003e\u003e lp.pi_plus\n\u003cParticle: name=\"pi+\", pdgid=211, mass=139.57061 ± 0.00024 MeV\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e from particle.literals import Lambda_b_0\n\u003e\u003e\u003e Lambda_b_0\n\u003cParticle: name=\"Lambda(b)0\", pdgid=5122, mass=5619.57 ± 0.16 MeV\u003e\n\u003e\u003e\u003e Lambda_b_0.J\n0.5\n```\n\nYou can quickly search for particles from the command line with\n(note: quotes may be used/needed but only double quotes work as expected on Windows):\n\n```bash\n$ python -m particle search \"K*0\"\n\u003cParticle: name=\"K*(892)0\", pdgid=313, mass=895.55 ± 0.20 MeV\u003e\n\u003cParticle: name=\"K*(1680)0\", pdgid=30313, mass=1718 ± 18 MeV\u003e\n\u003cParticle: name=\"K*(1410)0\", pdgid=100313, mass=1421 ± 9 MeV\u003e\n```\n\nIf you only select one particle, either by a search or by giving the PDG ID number,\nyou can see more information about the particle:\n\n```bash\n$ python -m particle search 311\nName: K0             ID: 311          Latex: $K^{0}$\nMass  = 497.611 ± 0.013 MeV\nWidth = -1.0 MeV\nQ (charge)        = 0       J (total angular) = 0.0      P (space parity) = -\nC (charge parity) = ?       I (isospin)       = 1/2      G (G-parity)     = ?\n    SpinType: SpinType.PseudoScalar\n    Quarks: dS\n    Antiparticle name: K~0 (antiparticle status: Barred)\n\n```\n\n### Advanced: Loading custom tables\n\nYou can control the particle data tables if you so desire. You can append a new data table using the following syntax:\n\n```python\n\u003e\u003e\u003e from particle import Particle\n\u003e\u003e\u003e Particle.load_table('new_particles.csv', append=True)\n```\n\nYou can also replace the particle table entirely with `append=False` (the default).\n\nIf you want a non-default data file distributed with the package just proceed as follows:\n\n```python\n\u003e\u003e\u003e from particle import data\n\u003e\u003e\u003e Particle.load_table(data.basepath / \"particle2025.csv\"))\n\u003e\u003e\u003e Particle.load_table(data.basepath / \"nuclei2022.csv\"), append=True)  # I still want nuclei info\n\u003e\u003e\u003e Particle.table_names()  # list the loaded tables\n```\n\n### Advanced: how to create user-defined particles\n\nThere are situations where it may be handy to create user-defined particles.\nBut do so with care and having in mind the limitations, many of which are discussed or exemplified below!\n\nThe simplest \"particle\" one may create is effectively a placeholder with no real information stored:\n\n```python\n\u003e\u003e\u003e # A Particle instance the simplest possible. Contains basically no info\n\u003e\u003e\u003e p = Particle.empty()\n\u003e\u003e\u003e p\n\u003cParticle: name=\"Unknown\", pdgid=0, mass=None\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e print(p.describe())\nName: Unknown\n```\n\nA more useful particle definition will likely involve at least a name and a PDG ID.\nIt is important to keep in mind that a meaningful PDG ID encodes by construction internal quantum numbers\nand other information. As such, the definition of a particle with a \"random\" PDG ID\nwill result in a particle with undefined and/or wrong properties such as quantum numbers or the quality of being a meson.\n\n```python\n\u003e\u003e\u003e p2 = Particle(9912345, 'MyPentaquark')\n\u003e\u003e\u003e p2\n\u003cParticle: name=\"MyPentaquark\", pdgid=9912345, mass=None\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e p2.pdgid.is_pentaquark\nFalse\n\u003e\u003e\u003e print(p2.describe())  # J=2 is an example of something effectively encoded in the PDG ID.\nName: MyPentaquark   ID: 9912345      Latex: $Unknown$\nMass  = None\nWidth = None\nQ (charge)        = None    J (total angular) = 2.0      P (space parity) = None\nC (charge parity) = None    I (isospin)       = None     G (G-parity)     = None\nAntiparticle name: MyPentaquark (antiparticle status: Same)\n```\n\nA yet more sophisticated definition:\n\n```python\n\u003e\u003e\u003e p3 = Particle(pdgid=9221132,pdg_name='Theta',three_charge=3,latex_name='\\Theta^{+}')\n\u003e\u003e\u003e p3\n\u003cParticle: name=\"Theta\", pdgid=9221132, mass=None\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e print(p3.describe())\nName: Theta          ID: 9221132      Latex: $\\Theta^{+}$\nMass  = None\nWidth = None\nQ (charge)        = +       J (total angular) = 0.5      P (space parity) = None\nC (charge parity) = None    I (isospin)       = None     G (G-parity)     = None\n    SpinType: SpinType.NonDefined\n    Antiparticle name: Theta (antiparticle status: Same)\n```\n\n### Advanced: Conversion\n\nYou can convert and update the particle tables with the utilities in `particle.particle.convert`. This requires the\n`pandas` package, and is only tested with Python 3. Run the following command for more help:\n\n```bash\n$ python3 -m particle.particle.convert --help\n```\n\n## Getting started: Converters\n\nYou can use mapping classes to convert between particle MC identification codes\nand particle names. See the `particle.converters` modules for the available\nmapping classes. For example:\n\n```python\n\u003e\u003e\u003e from particle.converters import Pythia2PDGIDBiMap\n\u003e\u003e\u003e from particle import PDGID, PythiaID\n\u003e\u003e\u003e\n\u003e\u003e\u003e pyid = Pythia2PDGIDBiMap[PDGID(9010221)]\n\u003e\u003e\u003e pyid\n\u003cPythiaID: 10221\u003e\n\n\u003e\u003e\u003e pdgid = Pythia2PDGIDBiMap[PythiaID(10221)]\n\u003e\u003e\u003e pdgid\n\u003cPDGID: 9010221\u003e\n```\n\nThis code makes use of classes similar to `PDGID`, which hold\nparticle identification codes used by MC programs.\nPossible use cases are the following:\n\n```python\n\u003e\u003e\u003e from particle import Particle\n\u003e\u003e\u003e from particle import Corsika7ID, Geant3ID, PythiaID\n\u003e\u003e\u003e\n\u003e\u003e\u003e g3id = Geant3ID(8)\n\u003e\u003e\u003e p = Particle.from_pdgid(g3id.to_pdgid())\n\u003e\u003e\u003e\n\u003e\u003e\u003e (p,) = Particle.finditer(pdgid=g3id.to_pdgid())  # syntax (p,) throws an error if \u003c 1 or \u003e 1 particle is found\n\u003e\u003e\u003e p.name\n'pi+'\n\n\u003e\u003e\u003e pythiaid = PythiaID(211)\n\u003e\u003e\u003e p = Particle.from_pdgid(pythiaid.to_pdgid())\n\n\u003e\u003e\u003e (p,) = Particle.finditer(pdgid=pythiaid.to_pdgid())\n\u003e\u003e\u003e p.name\n'pi+'\n\n\u003e\u003e\u003e cid = Corsika7ID(5)\n\u003e\u003e\u003e p = Particle.from_pdgid(cid.to_pdgid())\n\u003e\u003e\u003e p.name\n'mu+'\n```\n\n### Corsika7\n\nThe `Corsika7ID` class implements features to make it easier to work with Corsika7 output.\nFor a full feature set, please refer to the `particle.corsika` submodule.\n\n`Corsika7ID.from_particle_description(from_particle_description: int)` returns `(Corsika7ID, bool)`\nto automatically parse the `particle_description` from the Corsika7 particle data sub-block.\n\n`Corsika7ID.is_particle()` checks if the ID refers to an actual particle or something else (like additional information).\n\n`Corsika7ID.to_pdgid()` converts the `Corsika7ID` to a `PDGID` if possible.\n\n## Getting started: experiment-specific modules\n\nExperiment-specific submodules are welcome if they tie in nicely with the functionality of the package while providing\nadd-ons of particular relevance to experiments.\n\n### LHCb-specific module\n\nAvailable via\n\n```python\n\u003e\u003e\u003e from particle import lhcb\n```\n\nit contains the following converter and functions:\n\n```python\n\u003e\u003e\u003e dir(lhcb)\n['LHCbName2PDGIDBiMap', 'from_lhcb_name', 'to_lhcb_name']\n```\n\n```python\n\u003e\u003e\u003e n, e, l = Particle.from_pdgid(-531).name, Particle.from_pdgid(531).evtgen_name, lhcb.to_lhcb_name(Particle.from_pdgid(-531))\n\u003e\u003e\u003e print(f\"Name: {n}\\nEvtGen name: {e}\\nLHCb name: {l}\")\nName: B(s)~0\nEvtGen name: B_s0\nLHCb name: B_s~0\n\n\u003e\u003e\u003e p = Particle.from_pdgid(-531)\n\u003e\u003e\u003e p\n\u003cParticle: name=\"B(s)~0\", pdgid=-531, mass=5366.88 ± 0.14 MeV\u003e\n\u003e\u003e\u003eto_lhcb_name(p)\n'B_s~0'\n```\n\nConversions PDG ID \u003c-\u003e LHCb name are available via a predefined bidirectional map\nsimilarly to what is available in the standard (i.e. non-experiment-specific) converters:\n\n```python\n\n\u003e\u003e\u003e name = LHCbName2PDGIDBiMap[PDGID(-531)]\n\u003e\u003e\u003e name\n'B_s~0'\n\n\u003e\u003e\u003e pdgid = LHCbName2PDGIDBiMap['B_s~0']\n\u003e\u003e\u003e pdgid\n\u003cPDGID: -531\u003e\n```\n\n## Contributors\n\nWe hereby acknowledge the contributors that made this project possible ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://cern.ch/eduardo.rodrigues\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5013581?v=4?s=100\" width=\"100px;\" alt=\"Eduardo Rodrigues\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEduardo Rodrigues\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-eduardo-rodrigues\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/scikit-hep/particle/commits?author=eduardo-rodrigues\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/scikit-hep/particle/commits?author=eduardo-rodrigues\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://iscinumpy.dev\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4616906?v=4?s=100\" width=\"100px;\" alt=\"Henry Schreiner\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHenry Schreiner\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-henryiii\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/scikit-hep/particle/commits?author=henryiii\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/scikit-hep/particle/commits?author=henryiii\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/HDembinski\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/2631586?v=4?s=100\" width=\"100px;\" alt=\"Hans Dembinski\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHans Dembinski\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=HDembinski\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://ludwigneste.space\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/31670556?v=4?s=100\" width=\"100px;\" alt=\"Ludwig Neste\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLudwig Neste\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=The-Ludwig\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/scikit-hep/particle/commits?author=The-Ludwig\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://www.tamasgal.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1730350?v=4?s=100\" width=\"100px;\" alt=\"Tamas Gal\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTamas Gal\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=tamasgal\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://www.matthewfeickert.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5142394?v=4?s=100\" width=\"100px;\" alt=\"Matthew Feickert\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMatthew Feickert\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=matthewfeickert\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/JostMigenda\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/16189747?v=4?s=100\" width=\"100px;\" alt=\"Jost Migenda\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJost Migenda\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=JostMigenda\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/jonas-eschle\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/17454848?v=4?s=100\" width=\"100px;\" alt=\"Jonas Eschle\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJonas Eschle\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=jonas-eschle\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/chrisburr\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5220533?v=4?s=100\" width=\"100px;\" alt=\"Chris Burr\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eChris Burr\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=chrisburr\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://gitlab.cern.ch/users/admorris\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/15155249?v=4?s=100\" width=\"100px;\" alt=\"Adam Morris\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAdam Morris\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=admorris\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://doronbehar.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/10998835?v=4?s=100\" width=\"100px;\" alt=\"Doron Behar\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDoron Behar\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=doronbehar\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/APN-Pucky\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4533248?v=4?s=100\" width=\"100px;\" alt=\"Alexander Puck Neuwirth\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlexander Puck Neuwirth\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=APN-Pucky\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/scikit-hep/particle/commits?author=APN-Pucky\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/amanmdesai\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/98302868?v=4?s=100\" width=\"100px;\" alt=\"Aman Desai\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAman Desai\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=amanmdesai\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://jonathantellechea.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/49012693?v=4?s=100\" width=\"100px;\" alt=\"Jonathan Tellechea\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJonathan Tellechea\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=JOTELLECHEA\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/redeboer\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/29308176?v=4?s=100\" width=\"100px;\" alt=\"Remco de Boer\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRemco de Boer\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=redeboer\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/maxnoe\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5488440?v=4?s=100\" width=\"100px;\" alt=\"Maximilian Linhoff\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMaximilian Linhoff\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/scikit-hep/particle/commits?author=maxnoe\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.\n\n## Acknowledgements\n\nThe UK Science and Technology Facilities Council (STFC) and the University of Liverpool\nprovide funding for Eduardo Rodrigues (2020-) to work on this project part-time.\n\nSupport for this work was provided by the National Science Foundation cooperative agreement OAC-1450377 (DIANA/HEP) in 2016-2019\nand has been provided by OAC-1836650 (IRIS-HEP) since 2019.\nAny opinions, findings, conclusions or recommendations expressed in this material\nare those of the authors and do not necessarily reflect the views of the National Science Foundation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-hep%2Fparticle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscikit-hep%2Fparticle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscikit-hep%2Fparticle/lists"}