From 41621eb388847eed783d94972c6d1de4a321679b Mon Sep 17 00:00:00 2001 From: Jonas Eschle 'Mayou36 Date: Thu, 14 Apr 2022 17:24:21 +0200 Subject: [PATCH 1/2] chore: update changelog, tutorials, readme --- AUTHORS.rst | 6 ++++-- CHANGELOG.rst | 19 +++++-------------- README.rst | 21 ++++++++------------- docs/GenMultiDecay_Tutorial.ipynb | 2 +- setup.cfg | 5 ++--- 5 files changed, 20 insertions(+), 33 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 11a8d85e..df4d31b2 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -7,10 +7,12 @@ Development Lead * Albert Puig Navarro -Core Developers ---------------- +Developers +----------- * Jonas Eschle +* Simon Thor +* Eduardo Rodrigues Contributors ------------ diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b8aed1dc..60988897 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,20 +8,11 @@ Develop Major Features and Improvements ------------------------------- - -Behavioral changes ------------------- - - -Bug fixes and small changes ---------------------------- - -Requirement changes -------------------- - - -Thanks ------- +- Improved GenMultiDecay to have better control on the decay mass of non-stable particles. +- Added a `particle_model_map` argument to the `GenMultiDecay` class. This is a + dict where the key is a particle name and the value is a mass function name. + The feature can be seen in the + `GenMultiDecay Tutorial `_. 1.5.0 (27 Nov 2021) diff --git a/README.rst b/README.rst index 1079a8e8..feb052e0 100644 --- a/README.rst +++ b/README.rst @@ -79,15 +79,6 @@ broad peak). Installing ========== -``phasespace`` is available on conda-forge and pip. - -To install ``phasespace`` with conda, run: - - -.. code-block:: console - - $ conda install phasespace -c conda-forge - To install with pip: .. code-block:: console @@ -95,20 +86,24 @@ To install with pip: $ pip install phasespace This is the preferred method to install ``phasespace``, as it will always install the most recent stable release. - -For the newest development version, which may be unstable, you can install the version from git with +To install the necessary dependencies to be used with +`DecayLanguage `_, use .. code-block:: console - $ pip install git+https://github.com/zfit/phasespace + $ pip install phasespace[fromdecay] How to use ========== +Phasespace can directly be used to generate from a DecayChain using the +`DecayLanguage `_ package as +`explained in the tutorial `_. + The generation of simple `n`-body decays can be done using the ``nbody_decay`` shortcut to create a decay chain with a very simple interface: one needs to pass the mass of the top particle and the masses of the children particle as -a list, optionally giving the names of the particles. Then, the `generate` method can be used to produce the desired sample. +a list, optionally giving the names of the particles. Then, the ``generate`` method can be used to produce the desired sample. For example, to generate :math:`B^0\to K\pi`, we would do: .. code-block:: python diff --git a/docs/GenMultiDecay_Tutorial.ipynb b/docs/GenMultiDecay_Tutorial.ipynb index 8d88b6ed..57b8edb8 100644 --- a/docs/GenMultiDecay_Tutorial.ipynb +++ b/docs/GenMultiDecay_Tutorial.ipynb @@ -417,4 +417,4 @@ }, "nbformat": 4, "nbformat_minor": 1 -} +} \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 7f5a0bec..4c5ec270 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,9 +30,8 @@ packages = find: setup_requires = setuptools_scm install_requires = - tensorflow>=2.5,<2.8 # tensorflow.experimental.numpy - tensorflow_probability>=0.11 - keras <2.7 # temp fix, not matching version with TF + tensorflow>=2.6,<2.8 # tensorflow.experimental.numpy + tensorflow_probability>=0.11,<0.14 python_requires = >=3.7 include_package_data = True testpaths = tests From a908e81b71b3074ee0804c6835ef8d8b69f6bae7 Mon Sep 17 00:00:00 2001 From: Jonas Eschle 'Mayou36 Date: Thu, 14 Apr 2022 17:32:56 +0200 Subject: [PATCH 2/2] chore: reinstate keras fix --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 4c5ec270..3c0e2e1c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,6 +32,7 @@ setup_requires = install_requires = tensorflow>=2.6,<2.8 # tensorflow.experimental.numpy tensorflow_probability>=0.11,<0.14 + keras <2.7 # temp fix, not matching version with TF python_requires = >=3.7 include_package_data = True testpaths = tests