Command-line tool to get the name of a particle given its PDGID (and vice versa).
Project description
pdgid
A command-line tool to quickly get a particle's name from its PDGID and vice versa.
All elementary SM particles are included as well as some (hopefully) relevant hadrons and BSM particles. The data was sourced from a combination of the PDG 2020 review, the CERN twiki, and rivet.
If you want additional particles added, extra features or find a bug, please submit an MR or create a issue! I am waiting to see if this package gains traction.
Installation
pip install pdgid
pdgid has no dependencies so you are free to install it outside of a virtual
environment and not worry about package conflicts.
Requires python3.6 or higher.
Usage
Pass the command an id to get the associated particle name:
> pdgid 14
ν_μ
Or pass a particle name to get the associated id:
> pdgid ν_μ
14 [ν_μ]
Note the particle name can often be written in many forms and unicode is accepted (e.g. "nu_mu", "Vμ", "ν_μ", "muon neutrino", etc...). The name that's been matched is displayed in the square brackets to help with cases of ambiguity.
Finally, when ran without arguments the tool will print a table of all the particles it knows (along with their id).
Limitations
Searching by name doesn't support using "bar" to represent antiparticle.
Order matters for particles with multiple super/subscripts. This could be fixed with even more regex.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdgid-0.1.2.tar.gz.
File metadata
- Download URL: pdgid-0.1.2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
247a2831fb1ef22a4b412f45928fc14d3fd5fdfb15006dae2be43bafca25ad98
|
|
| MD5 |
31f3117038526a82c97d2bad4a2c3a04
|
|
| BLAKE2b-256 |
321c0030a986f56f60c6d6415bb52f0a1fdc3083956fd76a2a07d197d3a91075
|
File details
Details for the file pdgid-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pdgid-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f397123ab6b9ef70a8dce20a50fe95e84df5f6d60f3caab1e8a4a954635a5e06
|
|
| MD5 |
0caef5bbbb41a49fe56ab4d4da83d34e
|
|
| BLAKE2b-256 |
00b93ecd2c18d93457d2b3440885b2a153b55404e3c6318d7dc1ca3d0ae16f8c
|