Pythonic access to high energy particle data tables and ID codes.
This is a rethink in Python of the commonly used HepPDT/HepPID packages for accessing particle data tables and PDG scheme particle ID codes. Version 0.7.0 onwards should be compatible with Python 3.
Particle data table functions (cf. HepPDT)
HepPDT has no native Python interface, and it is not easy to naturally wrap its C++ interface for Python, so PyPDT is written from scratch in Python, with a lighter class count than the original: it’s just a convenience interface to a small ASCII data file, so who needs lots of classes?
Examples:
>>> import pypdt >>> pypdt.get(2212) # print out proton particle data >>> p = pypdt.get(2112) # get the neutron particle data object >>> tbl = pypdt.ParticleDataTable() # make a particle data table >>> # or tbl = pypdt.ParticleDataTable() # to read from AFS default db >>> # or tbl = pypdt.PDT() # if you prefer minimal keystrokes to clarity :) >>> print tbl[13] # print a summary of muon information >>> tbl[6].mass # access the top mass in GeV >>> tbl[23].width # access the Z width in GeV >>> tbl[310].lifetime # access the K0S lifetime in ps >>> tbl[310].ctau # access the K0S lifetime in mm >>> tbl[310].mean_disp(10.) # get the mean flight distance of a 10 GeV K0S in mm >>> for p in tbl: print p # print summaries for all known particles >>> # print info for all particles in asc lifetime order: >>> for t, p in sorted((p.ctau, p) for p in tbl): print p
The world is your bivalve of choice.
For maximum convenience, you can even use PyPDT from the command line:
$ python -m pypdt 13 310 mu^-: ID=13, m=1.06e-01 GeV, 3*q=-3, width=9.99e-19 GeV, tau=6.59e+05 ps, ctau=1.97e+05 mm K_S^0: ID=310, m=4.98e-01 GeV, 3*q=0, width=2.46e-14 GeV, tau=2.68e+01 ps, ctau=8.02e+00 mm
Particle ID functions (cf. HepPID)
PyPDT also contains Python versions of the HepPID library of functions for interpreting particle ID codes in the PDG scheme. The code of these functions has been directly translated to Python from HepPID’s ParticleIdMethods – please notify the author of this package in case of inaccuracies or evolution of the PID scheme.
Examples:
>>> pypdt.isSUSY(2010011) True
- TODO:
Use doctest
Metadata
Release files for PyPDT 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| PyPDT-0.8.0.tar.gz | 18.2 kB | Without provenance | Details |
Release files / PyPDT-0.8.0.tar.gz
| Download URL | PyPDT-0.8.0.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92dc26389e61f7527e9ca296e58e4d58f979b2fd0a9ce40e9eeccf356c60ac13
|
|
BLAKE2b-256 checksum How to use checksums |
a2913b60f1da161dfe8e244fce40b83debba8b1405370824f889e795792d1ac3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for PyPDT 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.