TFPWA


NameTFPWA JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/jiangyi15/tf-pwa
SummaryPartial Wave Analysis program using Tensorflow
upload_time2024-11-12 02:35:29
maintainerNone
docs_urlNone
authorYi Jiang
requires_python>=3.6
licenseMIT
keywords hep pwa particle physics physics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # A Partial Wave Analysis program using Tensorflow

[![Documentation build status](https://readthedocs.org/projects/tf-pwa/badge/?version=latest)](https://tf-pwa.readthedocs.io)
[![CI status](https://github.com/jiangyi15/tf-pwa/workflows/CI/badge.svg)](https://github.com/jiangyi15/tf-pwa/actions?query=branch%3Adev+workflow%3ACI)
[![Test coverage](https://codecov.io/gh/jiangyi15/tf-pwa/branch/dev/graph/badge.svg)](https://codecov.io/gh/jiangyi15/tf-pwa)
[![conda cloud](https://anaconda.org/jiangyi15/tf-pwa/badges/version.svg)](https://anaconda.org/jiangyi15/tf-pwa)
[![pypi](https://img.shields.io/pypi/v/TFPWA)](https://pypi.org/project/TFPWA/)
[![license](https://anaconda.org/jiangyi15/tf-pwa/badges/license.svg)](https://choosealicense.com/licenses/mit/)
<br>
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jiangyi15/tf-pwa/HEAD)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen)](https://github.com/pre-commit/pre-commit)
[![Prettier](https://camo.githubusercontent.com/687a8ae8d15f9409617d2cc5a30292a884f6813a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64655f7374796c652d70726574746965722d6666363962342e7376673f7374796c653d666c61742d737175617265)](https://prettier.io/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)

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.

## Install

You can go to
[http://tf-pwa.readthedocs.io/install](http://tf-pwa.readthedocs.io/en/latest/install.html)
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`.

### conda (recommended)

When using conda, you don't need to install CUDA for TensorFlow specially.

1. Get miniconda for python3 from
   [miniconda3](https://docs.conda.io/en/latest/miniconda.html) and install it.

2. Install requirements, we recommed Ampere card users to install with
   `tensorflow_2_6_requirements.txt` (see this
   [technical FAQ](https://tf-pwa.readthedocs.io/en/latest/tensorflow_version.html)).

You can install a tensorflow gpu version in anaconda as

```
conda install tensorflow[build="gpu*"]=2.8
```

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
```

3. The following command can be used to set environment variables of Python.
   (Use `--no-deps` to make sure that no PyPI package will be installed. Using
   `-e`, so it can be updated by `git pull` directly.)

```
python -m pip install -e . --no-deps
```

4. (option) There are some option packages, such as `uproot` for reading root
   file. It can be installed as

```
conda install uproot -c conda-forge
```

<details><summary>
### conda channel (experimental)
</summary><p>

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
```

</p></details>

<details><summary>
###  pip
</summary><p>

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 :

```bash
python3 -m pip install -e .
```

To contribute to the project, please also install additional developer tools
with:

```bash
python3 -m pip install -e .[dev]
```

You can also install from pypi.org directly without cloning the repo manually.

```bash
python3 -m pip install TFPWA
```

And also for the newest version from github

```bash
python3 -m pip install git+https://github.com/jiangyi15/tf-pwa.git
```

</p></details>

## Scripts

### fit.py

simple 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/`.

### state_cache.sh

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]
```

## Documents

See [tf-pwa.rtfd.io](http://tf-pwa.readthedocs.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.

## Other resources

[面向 BESIII 用户的 TF-PWA 使用手册](https://note.ihep.ac.cn/s/xAr0zQXf8)

[HADRON 2023](https://agenda.infn.it/event/33110/contributions/198135/)

[PWA 12](https://indico.cern.ch/event/885396/timetable/#52-reach-on-the-partial-wave-a)

## Dependencies

tensorflow or tensorflow-gpu >= 2.0.0

cudatoolkit : CUDA library for GPU acceleration

sympy : symbolic expression

PyYAML : config.yml file

matplotlib : plot

scipy : fit
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jiangyi15/tf-pwa",
    "name": "TFPWA",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "HEP, PWA, particle physics, physics",
    "author": "Yi Jiang",
    "author_email": "jiangyi15@mails.ucas.ac.cn",
    "download_url": "https://files.pythonhosted.org/packages/26/27/63112b66714a4e72554ee8e390182cc1edb4e4d8849dbda134c70561e6c7/TFPWA-0.2.2.tar.gz",
    "platform": null,
    "description": "# A Partial Wave Analysis program using Tensorflow\n\n[![Documentation build status](https://readthedocs.org/projects/tf-pwa/badge/?version=latest)](https://tf-pwa.readthedocs.io)\n[![CI status](https://github.com/jiangyi15/tf-pwa/workflows/CI/badge.svg)](https://github.com/jiangyi15/tf-pwa/actions?query=branch%3Adev+workflow%3ACI)\n[![Test coverage](https://codecov.io/gh/jiangyi15/tf-pwa/branch/dev/graph/badge.svg)](https://codecov.io/gh/jiangyi15/tf-pwa)\n[![conda cloud](https://anaconda.org/jiangyi15/tf-pwa/badges/version.svg)](https://anaconda.org/jiangyi15/tf-pwa)\n[![pypi](https://img.shields.io/pypi/v/TFPWA)](https://pypi.org/project/TFPWA/)\n[![license](https://anaconda.org/jiangyi15/tf-pwa/badges/license.svg)](https://choosealicense.com/licenses/mit/)\n<br>\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jiangyi15/tf-pwa/HEAD)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen)](https://github.com/pre-commit/pre-commit)\n[![Prettier](https://camo.githubusercontent.com/687a8ae8d15f9409617d2cc5a30292a884f6813a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64655f7374796c652d70726574746965722d6666363962342e7376673f7374796c653d666c61742d737175617265)](https://prettier.io/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)\n\nThis is a package and application for partial wave analysis (PWA) using\nTensorFlow. By using simple configuration file (and some scripts), PWA can be\ndone fast and automatically.\n\n## Install\n\nYou can go to\n[http://tf-pwa.readthedocs.io/install](http://tf-pwa.readthedocs.io/en/latest/install.html)\nfor more informations. Get the packages using\n\n```\ngit clone https://github.com/jiangyi15/tf-pwa.git\n```\n\nThe dependencies can be installed by `conda` or `pip`.\n\n### conda (recommended)\n\nWhen using conda, you don't need to install CUDA for TensorFlow specially.\n\n1. Get miniconda for python3 from\n   [miniconda3](https://docs.conda.io/en/latest/miniconda.html) and install it.\n\n2. Install requirements, we recommed Ampere card users to install with\n   `tensorflow_2_6_requirements.txt` (see this\n   [technical FAQ](https://tf-pwa.readthedocs.io/en/latest/tensorflow_version.html)).\n\nYou can install a tensorflow gpu version in anaconda as\n\n```\nconda install tensorflow[build=\"gpu*\"]=2.8\n```\n\nand then install the rest dependences\n\n```\nconda install --file requirements-min.txt\n```\n\n**Or**\n\nYou can install a newer version in conda-forge as\n\n```\nconda install --file tensorflow_2_6_requirements.txt -c conda-forge\n```\n\n3. The following command can be used to set environment variables of Python.\n   (Use `--no-deps` to make sure that no PyPI package will be installed. Using\n   `-e`, so it can be updated by `git pull` directly.)\n\n```\npython -m pip install -e . --no-deps\n```\n\n4. (option) There are some option packages, such as `uproot` for reading root\n   file. It can be installed as\n\n```\nconda install uproot -c conda-forge\n```\n\n<details><summary>\n### conda channel (experimental)\n</summary><p>\n\nA pre-built conda package (Linux only) is also provided, just run following\ncommand to install it.\n\n```\nconda config --add channels jiangyi15\nconda install tf-pwa\n```\n\n</p></details>\n\n<details><summary>\n###  pip\n</summary><p>\n\nWhen using `pip`, you will need to install CUDA to use GPU (The newest\ntensorflow support install with CUDA runtime directly as\n`pip install tensorflow[and-cuda]`). Just run the following command :\n\n```bash\npython3 -m pip install -e .\n```\n\nTo contribute to the project, please also install additional developer tools\nwith:\n\n```bash\npython3 -m pip install -e .[dev]\n```\n\nYou can also install from pypi.org directly without cloning the repo manually.\n\n```bash\npython3 -m pip install TFPWA\n```\n\nAnd also for the newest version from github\n\n```bash\npython3 -m pip install git+https://github.com/jiangyi15/tf-pwa.git\n```\n\n</p></details>\n\n## Scripts\n\n### fit.py\n\nsimple fit scripts, decay structure is described in `config.yml`, here `[]`\nmeans options.\n\n```\npython fit.py [--config config.yml]  [--init_params init_params.json]\n```\n\nfit parameters will save in final_params.json, figure can be found in\n`figure/`.\n\n### state_cache.sh\n\nscript for cache state, using the latest \\*\\_params.json file as parameters and\ncache newer files in `path` (the default is `trash/`).\n\n```\n./state_cache.sh [path]\n```\n\n## Documents\n\nSee [tf-pwa.rtfd.io](http://tf-pwa.readthedocs.io) for more information.\n\nAutodoc using sphinx-doc, need sphinx-doc\n\n```\npython setup.py build_sphinx\n```\n\nThen, the documents can be found in build/sphinx/index.html.\n\nDocuments can also build with `Makefile` in `docs` as\n\n```\ncd docs && make html\n```\n\nThen, the documents can be found in docs/\\_build/html.\n\n## Other resources\n\n[\u9762\u5411 BESIII \u7528\u6237\u7684 TF-PWA \u4f7f\u7528\u624b\u518c](https://note.ihep.ac.cn/s/xAr0zQXf8)\n\n[HADRON 2023](https://agenda.infn.it/event/33110/contributions/198135/)\n\n[PWA 12](https://indico.cern.ch/event/885396/timetable/#52-reach-on-the-partial-wave-a)\n\n## Dependencies\n\ntensorflow or tensorflow-gpu >= 2.0.0\n\ncudatoolkit : CUDA library for GPU acceleration\n\nsympy : symbolic expression\n\nPyYAML : config.yml file\n\nmatplotlib : plot\n\nscipy : fit",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Partial Wave Analysis program using Tensorflow",
    "version": "0.2.2",
    "project_urls": {
        "Documentation": "https://tf-pwa.readthedocs.io/en/latest",
        "Homepage": "https://github.com/jiangyi15/tf-pwa",
        "Source": "https://github.com/jiangyi15/tf-pwa",
        "Tracker": "https://github.com/jiangyi15/tf-pwa/issues"
    },
    "split_keywords": [
        "hep",
        " pwa",
        " particle physics",
        " physics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "262763112b66714a4e72554ee8e390182cc1edb4e4d8849dbda134c70561e6c7",
                "md5": "5caf4c0459dc019af14d090b2168d340",
                "sha256": "a030f4bf791f284b11d2dfe8027c81fe5c43c6ae0368e22663ee9fee96e703ab"
            },
            "downloads": -1,
            "filename": "TFPWA-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "5caf4c0459dc019af14d090b2168d340",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 791946,
            "upload_time": "2024-11-12T02:35:29",
            "upload_time_iso_8601": "2024-11-12T02:35:29.908620Z",
            "url": "https://files.pythonhosted.org/packages/26/27/63112b66714a4e72554ee8e390182cc1edb4e4d8849dbda134c70561e6c7/TFPWA-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-12 02:35:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jiangyi15",
    "github_project": "tf-pwa",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "tfpwa"
}
        
Elapsed time: 3.32548s