Python package for parton densities and parton luminosities
Project description
parton – a Python package for parton densities and parton luminosities
parton is a Python package providing parton density functions and parton luminosities. It uses the PDF data files provided by the LHAPDF project. Its API is partially compatible to LHAPDF's Python API, even though only a subset of its features are implemented.
parton is written in pure Python, i.e. it runs on Linux, Mac OS, and Windows.
Installation
To install the package without administrator privileges, run
python3 -m pip install parton --user
Command-line interface
parton provides a command-line interface that mimicks (and is partially compatible to) LHAPDF's lhapdf
command. In particular, it can be used to install PDF grid files. It is accessed by running the package as a script,
python3 -m parton
For instance, to install a specific PDF set, run
python3 -m parton update
python3 -m parton install 'CT10/0'
If you already have a directory with PDF sets (e.g. from LHAPDF), that can be used as well.
Python usage
The API for numerically evaluating PDFs is modeled after LHAPDF's Python API:
from parton import mkPDF
pdf = mkPDF('CT10', 0)
# up quark PDF at x=0.1, Q=1000 GeV
pdf.xfxQ(1, 0.1, 1000)
If the PDF sets are in a non-default location (on Linux, the default location is ~/.local/share/parton/
), this directory can be changed through mkPDF
's pdfdir
argument.
Parton luminosities are accessed similarly through the PLumi
class, but the factorization scale has to be fixed on instantiation,
from parton import PLumi
# pdf has been defined above
plumi = PLumi(pdf, Q2=1000)
# u-ubar parton luminosity shat/s=0.1
plumi.L(1, -1, 0.1)
License
parton is released under the MIT license.
Author
parton was written by David M. Straub.
Citation info
parton cannot be cited at present. Please do not forget to also acknowledge the LHAPDF project.
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
File details
Details for the file parton-0.1.tar.gz
.
File metadata
- Download URL: parton-0.1.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fa94a35ea1c0839de01c402984ca9a400c7d7d6f7bef6f1e73816cc340bd3fc |
|
MD5 | ebb8612f144502c6598a76184718adef |
|
BLAKE2b-256 | fa2a35bf50059168b2488d9af837eb71ff5ef7e8dab42f3efac0b7a2bf1de238 |