This is a package and application for partial wave analysis (PWA) using TensorFlow. By using simple configuration file (and some scripts), PWA can be done fast and automatically.
You can go to http://tf-pwa.readthedocs.io/install for more informations. Get the packages using
git clone https://github.com/jiangyi15/tf-pwa.git
The dependencies can be installed by conda or pip.
When using conda, you don't need to install CUDA for TensorFlow specially.
-
Get miniconda for python3 from miniconda3 and install it.
-
Install requirements, some users with Ampere card can install with
tensorflow_2_6_requirements.txt(see this technical FAQ).
You can install a tensorflow gpu version in anaconda as
conda install tensorflow
You can choose the version of tensorflow by adding some wildcard character such as tensorflow[build=gpu*]=2.12. Build tag with gpu or cuda (such as gpu_py311h65739b5_0) include GPU support. You can see all version with conda search tensorflow.
And then install the rest dependences
conda install --file requirements-min.txt
Or
You can install a newer version in conda-forge as
conda install --file tensorflow_2_6_requirements.txt -c conda-forge
- The following command can be used to set environment variables of Python.
(Use
--no-depsto make sure that no PyPI package will be installed. Using-e, so it can be updated bygit pulldirectly.)
python -m pip install -e . --no-deps
- (option) There are some option packages, such as
uprootfor reading root file. It can be installed as
conda install uproot -c conda-forge
### conda channel (experimental)
A pre-built conda package (Linux only) is also provided, just run following command to install it.
conda config --add channels jiangyi15
conda install tf-pwa
### pip
When using pip, you will need to install CUDA to use GPU (The newest
tensorflow support install with CUDA runtime directly as
pip install tensorflow[and-cuda]). Just run the following command :
python3 -m pip install -e .To contribute to the project, please also install additional developer tools with:
python3 -m pip install -e .[dev]You can also install from pypi.org directly without cloning the repo manually.
python3 -m pip install TFPWAAnd also for the newest version from github
python3 -m pip install git+https://github.com/jiangyi15/tf-pwa.gitsimple fit scripts, decay structure is described in config.yml, here []
means options.
python fit.py [--config config.yml] [--init_params init_params.json]
fit parameters will save in final_params.json, figure can be found in
figure/.
script for cache state, using the latest *_params.json file as parameters and
cache newer files in path (the default is trash/).
./state_cache.sh [path]
See tf-pwa.rtfd.io for more information.
Autodoc using sphinx-doc, need sphinx-doc
python setup.py build_sphinx
Then, the documents can be found in build/sphinx/index.html.
Documents can also build with Makefile in docs as
cd docs && make html
Then, the documents can be found in docs/_build/html.
tensorflow or tensorflow-gpu >= 2.0.0
cudatoolkit : CUDA library for GPU acceleration
sympy : symbolic expression
PyYAML : config.yml file
matplotlib : plot
scipy : fit