Recent Releases of ampform
ampform - AmpForm 0.15.9
See all documentation for this version here.
π Bug fixes
- Insert dynamics into symmetrized amplitudes (#476)
π±οΈ Developer Experience
- Switch to
poeas task runner (#473)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] 7 months ago
ampform - AmpForm 0.15.8
See all documentation for this version here.
π Bug fixes
- Make values in mapping hashable in
cache_to_disk()(#470)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] 12 months ago
ampform - AmpForm 0.15.7
See all documentation for this version here.
This version introduces major improvements to the caching functions π All of them are available through:
python
from ampform.sympy import cached
β¨ New features
- Implement
partial_doit()function (#456) - Collect cached SymPy functions in
cachedmodule (#457) - Implement
cached.unfoldfor amplitude models (#458) - Implement
cached.simplifyetc (#467)
β οΈ Enhancements and optimizations
- Improve cache invalidation of
@cache_to_disk(#459) - Use memoization on functions in
cachedmodule (#464) - Memoize
get_readable_hash()(#466)
π±οΈ Developer Experience
- Benchmark results are now stored in a separate repository (#460, #461, and #462)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] 12 months ago
ampform - AmpForm 0.15.6
See all documentation for this version here.
β¨ New features
- Switch of expression caches with
NO_CACHEenvironment variable (#454) - Implement
perform_cached_substitution()for cached substitution of symbolic expressions (#454) - Set cache directory with
COMPWA_CACHE_DIR(#454)
π Bug fixes
- Fix
is_integer()bug for QRules v0.10.4 (#450)
π¨ Maintenance
- Update lock files (#447)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] about 1 year ago
ampform - AmpForm 0.15.5
See all documentation for this version here.
β οΈ Enhancements and optimizations
- Compute stable hash without need for
PYTHONHASHSED(#444)
β οΈ API changes
- Change to Apache license (#432)
- Drop Python 3.7 & 3.8 support due to EOL (#440)
- Define dev dependencies as dependency groups (#441)
π¨ Maintenance
- Upgrade implementation to SymPy v1.13 (#435)
π±οΈ Developer Experience
- Define developer environment with
uv(#439)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] about 1 year ago
ampform - AmpForm 0.15.4
See all documentation for this version here.
β οΈ Enhancements and optimizations
- cache BlattβWeisskopf polynomials (#428)
π±οΈ Developer Experience
- implement benchmark monitoring (#427)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] almost 2 years ago
ampform - AmpForm 0.15.3
See all documentation for this version here.
π Bug fixes
- Use squared
FormFactorinEnergyDependentWidth(#425)
π Documentation
- Hide sympified attributes from expression classes (#424)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] almost 2 years ago
ampform - AmpForm 0.15.2
See all documentation for this version here.
β οΈ Enhancements and optimizations
- BlattβWeisskopf is now formulated with spherical Hankel function for arbitrary angular momentum (#418)
- Split latex expressions with
terms_per_lineargument inaslatex()(#414)
β¨ New features
- Implemented
FormFactorexpression class (#422)
β οΈ API changes
- URLs of the API page (ampform.rtfd.io) now end in
.htmlagain (#421)
π Bug fixes
**kwargsare now passed toaslatexiterable implementation (#420)
π Documentation
_latex_repr_()as method implementation to@unevaluatedis now explained with examples (#416)- Switched to author-year citation style (#419)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] almost 2 years ago
ampform - AmpForm 0.15.1
See all documentation for this version here.
β οΈ Enhancements and optimizations
- SymPy caches are now written to the user cache directory (#407)
- SymPy caches are written to a different path for different versions of SymPy (#409)
ampform.io.aslatex()now accepts custom keywords arguments for downstream dispatch overwrites (#413)
π Documentation
- Added
versionaddedto function descriptions (#410) - Set correct widths and gammas in K-matrix widget (#408)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] almost 2 years ago
ampform - AmpForm 0.15.0
See all documentation for this version here.
β οΈ API changes
- Implement
SpinAlignmentinterface (#306) - Deprecate
set_dynamics()method (#305 and #400) - Remove
HelicityModel.sum_components()(#304) - Extract
BuilderConfigurationclass (#303) - Rename isobar Wigner-D and CG functions (#302)
- Split
helicityandkinematicsmodule (#301)
β οΈ Changes that may affect behavior
- Remove factor 16 pi from phsp factor (#403)
β¨ New features
Implemented Dalitz-Plot Decomposition (#307)
[!WARNING] Experimental: see https://github.com/ComPWA/ampform/issues/309
π Documentation
- Show unaligned amplitudes in spin alignment page (#321)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] almost 2 years ago
ampform - AmpForm 0.14.11
See all documentation for this version here.
β οΈ Enhancements and optimizations
- Adapt implementation to QRules v0.10 (#362 and #347)
π¨ Maintenance
- Import v0.15 refactorings into v0.14 (#399)
π±οΈ Developer Experience
- Switch to Ruff formatter (#398)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] almost 2 years ago
ampform - AmpForm 0.14.10
See all documentation for this version here.
β¨ New features
- Added
UnevaluatableIntegralclass for numerical integration (#394)
β οΈ Enhancements and optimizations
- A warning is now raised if an
@unevaluatedclass defines_latex_reprinstead of_latex_repr_(#396)
π Bug fixes
- Fixed latex rendering of certain
@unvevaluatedexpression classes (#389)
π Documentation
- Updated links to the new compwa.github.io website (#387)
- Remove
.htmlfrom page URLs on ampform.rtfd.io (#388) - Usage of the
argument()function is now better documented (#396)
π¨ Maintenance
- Methods that are supposed to override methods of the base class are now marked with
@override(#397) - Applied new Ruff preview linting and new
blackformatting (#395)
The full changelog as commits can be found here.
- Python
Published by redeboer about 2 years ago
ampform - AmpForm 0.14.8
See all documentation for this version here.
β οΈ API changes
- Renamed
@unevaluated_expression()decorator to@unevaluated()(#379) - Arguments
zandangular_momentumhave swapped inBlattWeisskopfSquared--zcomes first (#375) n_eventsargument is required inBoostZMatrix,RotationYMatrix, andRotationZMatrixclasses (#381)UnevaluatedExpressiontemplate and related functions are now deprecated (#383)
β οΈ Enhancements and optimizations
- Add support for class attributes in
@unevaluatedexpression classes (#375) - Add support for default arguments in
@unevaluatedexpression classes (#376) - Add support to mark specific arguments to
@unevaluatedclasses as non-sympiable (#380)
π Bug fixes
- Sympify
@unevaluatedinstance attributes (#374)
π¨ Maintenance
- Organize
@unevaluatedtest functions (#377) - Implement all expression classes of the AmpForm library with
@unevaluated(#382)
π±οΈ Developer Experience
- Show reasons for skipping tests when running
pytest(#378)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] about 2 years ago
ampform - AmpForm 0.14.7
See all documentation for this version here.
β¨ New features
- Implement
@unevaluated_expression()decorator (#365)
π Documentation
- Add
CITATION.cff(#356) - Add Lorentz boost example (#352)
- Illustrate how to use
BoostMatrix(#353) - Link to source code on GitHub with
linkcode(#371)
π¨ Maintenance
- Switch to Ruff as linter (#354)
- Test AmpForm on Python 3.12 (#366)
π±οΈ Developer Experience
- Clean up Sphinx configuration (#370)
- Define
docnblivejob intox.ini(#373) - Enable language navigation and linting on Jupyter Lab (#357 and #369)
- Link to source code on GitHub with
linkcode(#371) - Remove
figure_formats = ["svg"]statement (#368)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] about 2 years ago
ampform - AmpForm 0.14.6
See all documentation for this version here.
π¨ Maintenance
- Installation is now verified on Python 3.11 (#339)
- Version limit has been removed from SymPy dependency (#341)
π Documentation
- Improve sidebar of the website (#344)
Fix typos in
README.md(#348)π±οΈ Developer Experience
GitHub workflows is now outsourced to ComPWA/actions (#340)
Log output of
sphinx-buildis now colored (#343)
The full changelog as commits can be found here.
- Python
Published by github-actions[bot] almost 3 years ago
ampform - AmpForm 0.14.5
See all documentation for this version here.
π Bug fixes
sympy.Indexedis now accepted as key inParameterValues(#336)
π±οΈ Developer Experience
- Implemented caching for GitHub Actions workflows (#335)
- Python
Published by github-actions[bot] about 3 years ago
ampform - AmpForm 0.14.4
See all documentation for this version here.
β¨ New features
- Implemented
perform_cached_doit()(#333)
π±οΈ Developer Experience
- Fixed release drafter (#331)
- Python
Published by github-actions[bot] over 3 years ago
ampform - AmpForm 0.14.3
Release 0.14.3
π Bug fixes
HelicityModel.rename_symbols()now works with scalar final state masses (#328)EnergyDependentWidth.subs()/.xreplace()now works correctly takes care of thephsp_factorchoice (#330)
- Python
Published by github-actions[bot] over 3 years ago
ampform - AmpForm 0.14.2
See all documentation for this version here.
β¨ New features
- Implemented
improve_latex_rendering()(#300) - Implemented
logginghierarchy (#320) - SymPy v1.11 is now supported (#325)
β οΈ Changes that may affect behavior
- Insert parity prefactor as
sympy.Rational(#322)
π Documentation
- Documentation on
formulate_wigner_d()has been improved (#312)
π¨ Maintenance
- Switched from
sphinx-panelstosphinx-design(#299) - Switch to
black's default 88 line width (#298)
π±οΈ Developer Experience
- New ComPWA commit types and PR labels are now enforced (#323)
- Python
Published by github-actions[bot] over 3 years ago
ampform - AmpForm 0.14.1
See all documentation for this version here.
π‘ New features
- Implemented first version of
ampform.iosub-module (#280) - Implemented Kibble and KΓ€llΓ©n functions (#292)
β οΈ Interface
- Spin alignment is now deactivated by default (#295)
π±οΈ Developer Experience
- All dependencies on are now pinned on Read the Docs as well (#276)
- Documentation is now built with
sphinx-build(throughtox) only, not through withmake(#286)
- Python
Published by redeboer over 3 years ago
ampform - AmpForm 0.14.0
See all documentation for this version here.
π‘ New features
- Extracted
formulate_form_factor()function (#262) - Implemented
PhaseSpaceFactorSWave, which uses the Chew-Mandelstam S-wave as a phase space factor (#265)
β οΈ Interface
- Renamed PhaseSpaceFactorAnalytic to
EqualMassPhaseSpaceFactor(#264) - Moved phase space factor definitions to
ampform.dynamics.phasespace(#266) - Naming functions return a sympy.Symbol instead of
str(#269) ComplexSqrtis now blocked from 'unfolding' (#270)- Assumptions on some parameter and variable symbols have changed (#271)
π Bug fixes
- Implemented hash method for
EnergyDependentWidth(#274)
π Documentation
- Updated references to PDG2021 (#262)
- Fixed comparison visualization widget for analytic continuation (#272)
- Fixed 2D complex plane widget for K-matrix (#273)
- Python
Published by github-actions[bot] almost 4 years ago
ampform - AmpForm 0.13.3
See all documentation for this version here.
π‘ New features
- It's now possible to generate helicity couplings instead of amplitude coefficients (#256)
π¨ Internal maintenance
- It's now possible to install AmpForm with patches of SymPy v1.10 (#258)
- Python
Published by github-actions[bot] almost 4 years ago
ampform - AmpForm 0.13.2
See all documentation for this version here.
π‘ New features
- Implemented coefficient naming switch (#252)
β οΈ Interface
- Dropped support for Python 3.6 (#249)
- Adapted implementations to SymPy v1.10 (#249)
π¨ Internal maintenance
- Simplified type hints with PEP 563 (#250)
π Documentation
- Added simple code examples to main usage page (#255)
- Python
Published by github-actions[bot] almost 4 years ago
ampform - AmpForm 0.13.1
See all documentation for this version here.
π‘ New features
Implemented spin alignment for mismatching decay topologies (#6 and #245)
See problem description in [TR-015](https://compwa-org.readthedocs.io/report/015.html) and usage example [here](https://ampform--245.org.readthedocs.build/en/245/usage/helicity/spin-alignment.html). For an example with generated data, see [TR-013](https://compwa-org.readthedocs.io/report/013.html).β οΈ Interface
Helicity angle notation is now more concise (#208 and #209)
Compare [old notation](https://ampform.readthedocs.io/en/0.12.2/api/ampform.kinematics.html#ampform.kinematics.get_helicity_angle_label) and [new notation](https://ampform--209.org.readthedocs.build/en/209/api/ampform.kinematics.html#ampform.kinematics.get_helicity_angle_label).Removed decay/naming functions from kinematics (#227)
Cleaned up the `kinemetics` module by moving `determine_attached_final_state()` to `helicity.decay` and `get_helicity_angle_label()` to `helicity.naming`. Also extracted `get_boost_chain_suffix()` from `get_helicity_angle_label()` in preparation of #212.Particle LaTeX names are now used in parameters names (#228)
Parameter names that include particle (resonance) names now render more nicely as LaTeX. Compare [old](https://ampform--227.org.readthedocs.build/en/227/usage/amplitude.html#mathematical-formula) rendering with [new](https://ampform--228.org.readthedocs.build/en/228/usage/amplitude.html#mathematical-formula). **WARNING**: You may have to modify your scripts if they get parameters by name from `HelicityModel.parameter_defaults`! Other improvements: - Particle LaTeX names in coefficient names are wrapped in curly braces so that they render correctly if there are also helicities as subscripts. - Right sidebar (TOC) is unfolded unto the second level. - `attrs` is rendered as an API link in code snippets as well.π Bug fixes
AmpForm can only be installed with SymPy v1.8 or v1.9 (#247)
See #248
- Python
Published by redeboer almost 4 years ago
ampform - AmpForm 0.12.6
See all documentation for this version here.
π Bug fixes
AmpForm can only be installed with SymPy v1.8 or v1.9 (#247)
See #248
- Python
Published by redeboer almost 4 years ago
ampform - AmpForm 0.13.0
See all documentation for this version here.
π‘ New features
Implemented spin alignment for mismatching decay topologies (#6 and #245)
See problem description in [TR-015](https://compwa-org.readthedocs.io/report/015.html) and usage example [here](https://ampform--245.org.readthedocs.build/en/245/usage/helicity/spin-alignment.html). For an example with generated data, see [TR-013](https://compwa-org.readthedocs.io/report/013.html).β οΈ Interface
Helicity angle notation is now more concise (#208 and #209)
Compare [old notation](https://ampform.readthedocs.io/en/0.12.2/api/ampform.kinematics.html#ampform.kinematics.get_helicity_angle_label) and [new notation](https://ampform--209.org.readthedocs.build/en/209/api/ampform.kinematics.html#ampform.kinematics.get_helicity_angle_label).Removed decay/naming functions from kinematics (#227)
Cleaned up the `kinemetics` module by moving `determine_attached_final_state()` to `helicity.decay` and `get_helicity_angle_label()` to `helicity.naming`. Also extracted `get_boost_chain_suffix()` from `get_helicity_angle_label()` in preparation of #212.Particle LaTeX names are now used in parameters names (#228)
Parameter names that include particle (resonance) names now render more nicely as LaTeX. Compare [old](https://ampform--227.org.readthedocs.build/en/227/usage/amplitude.html#mathematical-formula) rendering with [new](https://ampform--228.org.readthedocs.build/en/228/usage/amplitude.html#mathematical-formula). **WARNING**: You may have to modify your scripts if they get parameters by name from `HelicityModel.parameter_defaults`! Other improvements: - Particle LaTeX names in coefficient names are wrapped in curly braces so that they render correctly if there are also helicities as subscripts. - Right sidebar (TOC) is unfolded unto the second level. - `attrs` is rendered as an API link in code snippets as well.
- Python
Published by github-actions[bot] almost 4 years ago
ampform - AmpForm 0.12.4
See all documentation for this version here.
π‘ New features
HelicityModel.parameter_defaults has been wrapped in a ParameterValues class (#229 and #234)
#228 has made some parameter names even longer and harder to get with `dict.__getitem__()`. This PR wraps the `parameter_defaults` in a [`ParameterValues`](https://ampform--229.org.readthedocs.build/en/229/api/ampform.helicity.html#ampform.helicity.ParameterValues) class that allows doing stuff like: ```python >>> import sympy as sp >>> a, b, c = sp.symbols("a b c") >>> from ampform.helicity import ParameterValues >>> parameters = ParameterValues({a: 0.0, b: 1+1j, c: -2}) >>> parameters[a] # get by sympy.Symbol 0.0 >>> parameters["b"] # get by str name (1+1j) >>> parameters["b"] = 3 # get by position in OrderedDict >>> parameters[1] 3 >>> parameters[2] -2 >>> parameters[2] = 3.14 # set by position in OrderedDict >>> parameters[c] 3.14 ``` Note that, as opposed to the previously used `OrderedDict`, this class prevents users from adding more parameters to the `parameter_defaults`.Added switch for energy-dependent width (#236)
It's now possible to independently activate energy-dependent width and a form factor in the [`RelativisticBreitWignerBuilder`](https://ampform--236.org.readthedocs.build/en/236/api/ampform.dynamics.builder.html#ampform.dynamics.builder.RelativisticBreitWignerBuilder). Usage example [here](https://ampform--236.org.readthedocs.build/en/236/usage/amplitude.html#set-dynamics). See also #235.Extracted DynamicsSelector class (#240)
`HelicityAmplitudeBuilder.__dynamics_choices` has been extracted to a new `DynamicsSelector` class. This reduces the responsibilities of the `HelicityAmplitudeBuilder` and makes it easier to implement new implementations for selection of dynamics. Something similar has been done for 'collector' attributes like `HelicityAmplitudeBuilder.__parameter_defaults` and `__components`. This will be useful when implementing [TR-014](https://compwa-org.readthedocs.io/report/014.html), which will require keeping track of amplitude definitions. Note: once QRules v0.10 is out, https://github.com/ComPWA/qrules/pull/156 and https://github.com/ComPWA/qrules/pull/157 make it possible to define the dynamics choices as a mapping over topologies and visualize them as graphviz.Implemented HelicityModel.rename_symbols() (#244)
See use case example [here]() (couple parameters). The method is makes it easier to address [this error](https://github.com/ComPWA/ampform/runs/5320069236?check_suite_focus=true) in #243.π Bug fixes
Moved angular momentum check to form factor (#230)
Removed the check for integral angular momentum. Instead, AmpForm now checks for angular momentum when formulating a form factor. This allows formulating Breit-Wigner dynamics _without_ form factor on an amplitude model formulated with `formalism="helicity"` if it has with half-spin resonances.π¨ Internal maintenance
Simplified numpy code of matrix expressions (#232)
Closes #231 Extracted [`NumPyPrintable`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.sympy.html#ampform.sympy.NumPyPrintable) implementation classes from [`BoostZMatrix`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.kinematics.html#ampform.kinematics.BoostZMatrix), [`RotationYMatrix`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.kinematics.html#ampform.kinematics.RotationYMatrix) and [`RotationZMatrix`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.kinematics.html#ampform.kinematics.RotationZMatrix), so that the code generated with [`sympy.lambdify()`](https://docs.sympy.org/latest/modules/utilities/lambdify.html#sympy.utilities.lambdify.lambdify) decreases and has a smaller memory footprint (if using `cse=True`). This can best be seen by comparing the [new docstring for `BoostZMatrix`](https://ampform--232.org.readthedocs.build/en/232/api/ampform.kinematics.html#ampform.kinematics.BoostZMatrix) with [the old one](https://ampform--230.org.readthedocs.build/en/230/api/ampform.kinematics.html#ampform.kinematics.BoostZMatrix).Switched to new import attrs API (#237)
See [`import attrs`](https://hynek.me/articles/import-attrs/#the-last-step-import-attrs) and [`attrs` TNG](https://www.attrs.org/en/21.4.0/names.html#attrs-tng).Simplified HelicityAdapter class (#241)
Implementation of the [`HelicityAdapter`](https://ampform.readthedocs.io/en/0.12.3/api/ampform.kinematics.html#ampform.kinematics.HelicityAdapter) class was a bit too complicated. This PR makes the class into a simple manager of Topology instances that can create expressions from these topologies. Interface hasn't changed though.implement_doit_method() can only decorate UnevaluatedExpression classes (#224)
π Documentation
Second level in left sidebar is shown by default (#221)
Links to NumPy API are now also embedded correctly in the code examples. Follow-up to #217.Added Hypothesis and utterances overlay (#225)
Closes https://github.com/ComPWA/compwa-org/issues/109Added IPython.display import to notebooks (#226)
See "New features" under https://github.com/ComPWA/repo-maintenance/pull/49Added explanation how to pin dependencies with Conda (#233)
Preview [here](https://ampform--233.org.readthedocs.build/en/233/install.html). See also https://github.com/ComPWA/tensorwaves/pull/411.Improved signatures in helicity module (#242)
Note: it's not yet possible to abbreviate type aliases in nested type hints. Sphinx will fix this (https://github.com/sphinx-doc/sphinx/pull/10183) in [v4.5.0](https://www.sphinx-doc.org/en/master/changes.html#release-4-5-0-in-development). This will also make it possible to improve the order of definitions in the `helicity` module (makes more sense to define `HelicityModel` first). See also https://github.com/ComPWA/compwa-org/issues/116.π±οΈ Developer Experience
Doctests are now also included in test coverage (#222)
Will increase test coverage.Upgrade cron job is now run even weeks only (#223)
See https://github.com/ComPWA/repo-maintenance/pull/48GitHub Actions are now also run on version branches (#239)
This makes it safer to commit or PR patches to older versions.
- Python
Published by github-actions[bot] almost 4 years ago
ampform - AmpForm 0.12.3
See all documentation for this version here.
π‘ New features
Implemented scalar initial state mass switch (#214)
Follow-up to #197. See usage [here](https://ampform--214.org.readthedocs.build/en/214/usage/amplitude.html#scalar-masses).π¨ Internal maintenance
Simplified numpy.einsum in ArrayMultiplication numpification (#218)
`ArrayMultiplication` lambdified to a recursive call to [`einsum()`](https://numpy.org/doc/stable/reference/generated/numpy.einsum.html), which results in larger lambdified code. This PR lambdifies the code to an einsum path, e.g. `...ij,...jk->...i`.Upgraded to QRules v0.9.6 (#219)
See release notes [QRules v0.9.6](https://github.com/ComPWA/qrules/releases/tag/0.9.6). Required for a consistent determination of opposite helicity states, see #212. _Note that this can change helicity angle labels! See a324c9e_π Documentation
Cleaned up kinematics module API (#211)
Preview [here](https://ampform--211.org.readthedocs.build/en/211/api/ampform.kinematics.html). Compare to [v0.12.2](https://ampform.readthedocs.org/en/0.12.2/api/ampform.kinematics.html). - Definitions in the API are follow the sorting of the source code. - Hidden the classes for SymPy ArraySymbols by moving them to `ampform.sympy._array_expresssions`. - Added docstrings to all remaining classes, like `BoostZ`. - Improved the `docs/_extend_docstrings.py` script. - Hidden several methods and attributes that come from `sympy.Basic`. - See [commit history]() for other changes.Documentation on RTD is now built on Python 3.8 (#215)
[`sphinx-apidoc`](https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html) does not render the docstring for the `FourMomentumSymbol` type alias (#211) when running on Python 3.7. See for instance the [API preview of the latest PR](https://ampform--214.org.readthedocs.build/en/214/api/ampform.kinematics.html#ampform.kinematics.FourMomentumSymbol). The docstring is correctly rendered when building with Python 3.8, see preview [here](https://ampform--215.org.readthedocs.build/en/215/api/ampform.kinematics.html#ampform.kinematics.FourMomentumSymbol). Note: RTD for QRules also switched to Python 3.8 in https://github.com/ComPWA/qrules/pull/136.Code example are now automatically clickable with links to reference documentation (#217 and #220)
- All code examples are now clickable with links to corresponding reference documentation (also external links APIs) with [`sphinx-codeautolink`](https://sphinx-codeautolink.readthedocs.io). Closes https://github.com/ComPWA/compwa-org/issues/106 [](https://ampform--217.org.readthedocs.build/en/217/usage/amplitude.html#scalar-masses) - Updated to the first non-beta black release [22.1.0](https://github.com/psf/black/releases/tag/22.1.0). Most important style effect: [no space around power operator `**`](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-breaks-binary-operators).π±οΈ Developer Experience
Installed jupyterlab-myst for MyST editing in notebooks (#217)
Installed [`jupyterlab-myst`](https://github.com/executablebooks/jupyterlab-myst)
- Python
Published by github-actions[bot] about 4 years ago
ampform - AmpForm 0.12.2
See all documentation for this version here.
π‘ New features
Implemented RelativisticBreitWignerBuilder (#206)
Closes #205 This adds a new class, [`RelativisticBreitWignerBuilder`](https://ampform--206.org.readthedocs.build/en/206/api/ampform.dynamics.builder.html#ampform.dynamics.builder.RelativisticBreitWignerBuilder), which makes it possible to insert different kinds of [`PhaseSpaceFactorProtocol`](https://ampform.readthedocs.io/en/0.12.1/api/ampform.dynamics.html#ampform.dynamics.PhaseSpaceFactorProtocol)s into [`set_dynamics()`](https://ampform.readthedocs.io/en/0.12.x/api/ampform.helicity.html#ampform.helicity.HelicityAmplitudeBuilder.set_dynamics). See [here](https://ampform--206.org.readthedocs.build/en/206/usage/amplitude.html#set-dynamics) how to use. Essentially, this class is an extension of builder functions such as [`create_relativistic_breit_wigner_with_ff()`](https://ampform.readthedocs.io/en/0.12.x/api/ampform.dynamics.builder.html#ampform.dynamics.builder.create_relativistic_breit_wigner_with_ff) that were used previously. Note that this builder class will become more important in #151, which introduces yet another phase space factor.π Documentation
Add Deepnote buttons on example noteboook pages (#204)
Closes https://github.com/ComPWA/repo-maintenance/issues/43 [](https://ampform--204.org.readthedocs.build/en/204/usage/amplitude.html)Type aliases in API are now abbreviated (#207)
See https://github.com/ComPWA/compwa-org/issues/104 | Old | New | | --- | --- | | [](https://ampform.readthedocs.io/en/0.12.1/api/ampform.dynamics.builder.html#ampform.dynamics.builder.ResonanceDynamicsBuilder.__call__) | [](https://ampform--207.org.readthedocs.build/en/207/api/ampform.dynamics.builder.html#ampform.dynamics.builder.ResonanceDynamicsBuilder.__call__) | Also addresses https://github.com/ComPWA/compwa-org/issues/103. Note, though, that `abbreviate_signature.py` (now `_relink_references.py`) is rather complex. This is in order to maintain compatibility with Sphinx <4.4, which is [installed in Python <3.8](https://github.com/ComPWA/ampform/blob/60b256dc5377ab7fe7b4c482062644ddb55f12ea/setup.cfg#L71).π±οΈ Developer Experience
Changed reqruiements upgrade cron job to bi-weekly (#201)
- Python
Published by github-actions[bot] about 4 years ago
ampform - AmpForm 0.12.1
See all documentation for this version here.
π‘ New features
Implemented stable final state switch for inserting scalar mass values (#197)
Usage example [here](https://ampform.readthedocs.io/en/0.12.1/usage/amplitude.html#stable-final-states).Implemented HelicityAdapter.permutate_registered_topologies() (#198)
Usage example [here](https://ampform.readthedocs.io/en/0.12.1/usage/amplitude.html#extend-kinematic-variables).π Bug fixes
Switched Re and Im labels in K-matrix demo (#192)
- Python
Published by redeboer about 4 years ago
ampform - AmpForm 0.11.7
Release 0.11.7
Back-ported fixes that were introduced in the lead-up to v0.12.0
See all documentation for this version here.
π Bug fixes
Allow installing any version of typing-extensions (#191)
`TypeGuard` requires `typing-extensions` v3.10, which is not available to TensorFlow <2.7. With this PR, it is only required when doing style checks.Minimum SymPy version set to v1.8 (#185)
Google Colab comes with SymPy v1.7, which doesn't have the module `sympy.printing.numpy`. So at least SymPy v1.8 is required.π¨ Internal maintenance
Importing ampform is about twice as fast now (#189)
With https://github.com/ComPWA/qrules/pull/130 and f08f1f0, `import ampform` is about 2x as fastFixed ComplexSqrt __new__() method signature (#187)
π Documentation
Links to Binder and Google Colab are now pinned for each version (#179)
Branch name in `conf.py` is now extracted [from Read the Docs](https://docs.readthedocs.io/en/stable/builds.html) if possible. This way, all Binder/Colab links lead to the corresponding branch or tag of the repo.
- Python
Published by redeboer about 4 years ago
ampform - AmpForm 0.12.0
Release 0.12.0
See all documentation for this version here.
Major interface changes: kinematic variables are not computed with NumPy anymore. Instead, AmpForm provides an expression for those conversions, so that the conversion can be done with different back-ends. See #177 for more info.
π‘ New features
Kinematic variables are now expressed symbolically (#177)
Closes #174 This PR implements [TR-011](https://compwa-org.readthedocs.io/en/stable/report/011.html). It merges the `ampform.data` module into `ampform.kinematics`. Most notably, the recursive helicity angles are now expressed as SymPy expressions, so that they can be computed with different computational back-ends.AmpForm supports Python 3.10 (#172)
β οΈ Interface
implement_doit_method decorator does not take arguments anymore (#178)
The `@implement_doit_method` decorator was using one inline function layer too many. So now you have to write ```python @implement_doit_method class MyExpr(UnevaluatedExpression): ... ``` instead of ```python @implement_doit_method() class MyExpr(UnevaluatedExpression): ... ```Renamed CoupledWidth to EnergyDependentWidth (#150)
The `CoupledWidth` class has been renamed to `EnergyDependentWidth`. `CoupledWidth` was a bit confusing. More common terms are mass/energy dependent width or running width.Added HelicityModel.kinematics, removed HelicityModel.adapter (#177)
Several changes to `HelicityModel` due to #177. Most notably, its `adapter` attribute has been removed in favour of `kinematics`, which is a `dict` of helicity angle `Symbol`s to `Expr`s in terms of four-momentum symbolsπ Bug fixes
Minimum SymPy version set to v1.8 (#185)
Google Colab comes with SymPy v1.7, which doesn't have the module `sympy.printing.numpy`. So at least SymPy v1.8 is required.π¨ Internal maintenance
Importing ampform is about twice as fast now (#189)
With https://github.com/ComPWA/qrules/pull/130 and f08f1f0, `import ampform` is about 2x as fast_numpycode() printer methods now use SymPy's module_imports (#187)
Classes like `ArrayAxisSum` were specifically using statements like ```python printer.module_imports["numpy"].add("sum") ``` This is problematic in TensorWaves, which would like to see `"jnp"` and `"tnp"` there (the NumPy interfaces of JAX and TensorFlow). This PR makes this possible. Another major improvements: `einsum` in `ArrayMultiplication` is used in such a way that `transpose` is not necessary anymore. In addition, an ellipsis return statement is specificied (`"...ij,...j->...i"` instead of `"...ij,...j"`), which [`tf.einsum`](https://www.tensorflow.org/api_docs/python/tf/einsum) requires.π Documentation
Links to Binder and Google Colab are now pinned for each version (#179)
Branch name in `conf.py` is now extracted [from Read the Docs](https://docs.readthedocs.io/en/stable/builds.html) if possible. This way, all Binder/Colab links lead to the corresponding branch or tag of the repo.π±οΈ Developer Experience
Notebooks can now be run with pytest (#186)
See https://github.com/ComPWA/compwa-org/issues/90
- Python
Published by github-actions[bot] about 4 years ago
ampform - AmpForm 0.12.0a1
Release 0.12.0a1
See all documentation for this version here.
π‘ New features
_numpycode() printer methods now use SymPy's module_imports (#187)
Classes like `ArrayAxisSum` were specifically using statements like ```python printer.module_imports["numpy"].add("sum") ``` This is problematic in TensorWaves, which would like to see `"jnp"` and `"tnp"` there (the NumPy interfaces of JAX and TensorFlow). This PR makes this possible. Another major improvements: `einsum` in `ArrayMultiplication` is used in such a way that `transpose` is not necessary anymore. In addition, an ellipsis return statement is specificied (`"...ij,...j->...i"` instead of `"...ij,...j"`), which [`tf.einsum`](https://www.tensorflow.org/api_docs/python/tf/einsum) requires.π Bug fixes
Minimum SymPy version set to v1.8 (#185)
Google Colab comes with SymPy v1.7, which doesn't have the module `sympy.printing.numpy`. So at least SymPy v1.8 is required.π±οΈ Developer Experience
Notebooks can now be run with pytest (#186)
See https://github.com/ComPWA/compwa-org/issues/90
- Python
Published by github-actions[bot] about 4 years ago
ampform - AmpForm 0.12.0a0
Pre-release 0.12.0a0
See all documentation for this version here.
π‘ New features
Kinematic variables are now expressed symbolically (#177)
Closes #174 This PR implements [TR-011](https://compwa-org.readthedocs.io/en/stable/report/011.html). It merges the `ampform.data` module into `ampform.kinematics`. Most notably, the recursive helicity angles are now expressed as SymPy expressions, so that they can be computed with different computational back-ends.Python 3.10 is now supported (#172)
β οΈ Interface
implement_doit_method decorator does not take arguments anymore (#178)
The `@implement_doit_method` decorator was using one inline function layer too many. So now you have to write ```python @implement_doit_method class MyExpr(UnevaluatedExpression): ... ``` instead of ```python @implement_doit_method() class MyExpr(UnevaluatedExpression): ... ```Renamed CoupledWidth to EnergyDependentWidth (#150)
The `CoupledWidth` class has been renamed to `EnergyDependentWidth`. `CoupledWidth` was a bit confusing. More common terms are mass/energy dependent width or running width.Added HelicityModel.kinematics, removed HelicityModel.adapter (#177)
Several changes to `HelicityModel` due to #177. Most notably, its `adapter` attribute has been removed in favour of `kinematics`, which is a `dict` of helicity angle `Symbol`s to `Expr`s in terms of four-momentum symbolsπ Documentation
Links to Binder and Google Colab are now pinned for each version (#179)
Branch name in `conf.py` is now extracted [from Read the Docs](https://docs.readthedocs.io/en/stable/builds.html) if possible. This way, all Binder/Colab links lead to the corresponding branch or tag of the repo.
- Python
Published by redeboer over 4 years ago
ampform - AmpForm 0.11.5
Release 0.11.5
Final release before AmpForm v0.12.
See all documentation for this version here.
π¨ Internal maintenance
Narrowed down type hints (#168)
* Improved some of the type hints * Enforcing the use of [mypy error codes](https://mypy.readthedocs.io/en/stable/error_codes.html#silencing-errors-based-on-error-codes) (`# type: ignore[error-code]`) with [flake8-type-ignore](https://gitlab.com/jonafato/flake8-type-ignore). --- See also https://github.com/ComPWA/qrules/pull/114 and https://github.com/ComPWA/tensorwaves/pull/332Removed CG latex fix (#176)
This inline fix is not required anymore since https://github.com/sympy/sympy/pull/21769. This fix was released with [SymPy v1.9](https://github.com/sympy/sympy/wiki/release-notes-for-1.9). Note that a minimum version for SymPy is not specified in `setup.cfg`. This is done on purpose because the fix is not crucial for performance of the helicity model building. https://github.com/ComPWA/ampform/blob/5abe1f/setup.cfg#L48π Documentation
Added Conda badge (#169)
π±οΈ Developer Experience
Error logs from myst-nb are now printed on GitHub Actions (#170)
- The uploaded error logs are a bit of a pain to read and you have to download them first. This makes it a bit easier to inspect any errors. - Fixes this problem: https://github.com/ComPWA/ampform/pull/170/checks?check_run_id=3950232038Fixed comment syntax in .flake8 config (#171)
The `.flake8` config file was using not using the same comment style as described in https://flake8.pycqa.org/en/latest/user/configuration.html#project-configuration Consequence not all errors were identified anymore.
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.11.4
Release 0.11.4
See all documentation for this version here.
π Bug fixes
Support pickling with SymPy v1.9 (#164)
π Documentation
Embedded Zenodo metadata (#165)
See https://github.com/ComPWA/compwa-org/issues/64
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.11.3
Release 0.11.3
See all documentation for this version here.
π Bug fixes
import OrderedDict from collections instead of typing-extensions (#162)
Previously, `OrderedDict` was imported from `typing-extensions`. This seems to work better for typing than `collections.OrderedDict`, but is only available in `typing-extensions==3.10.*`, see e.g. https://github.com/ComPWA/tensorwaves/pull/327/checks?check_run_id=3717304158 Setting `typing-extensions>=3.10` as a lower limit however causes problems downstream for packages that use TensorFlow, see e.g. https://github.com/ComPWA/tensorwaves/pull/317 For now, it's therefore better to use collections.OrderedDict instead, so that there is no need to restrict typing-extensions.π Documentation
Added Zenodo DOI badge (#160)
Closes https://github.com/ComPWA/compwa-org/issues/55 [](https://doi.org/10.5281/zenodo.5526648)
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.11.2
Release 0.11.2
See all documentation for this version here.
π‘ New features
Set CoupledWidth name through constructor (#141)
`CoupledWidth._name` can now be set through the constructor, just like other classes that derive from `UnevaluatedExpression`.Use multiple plot symbols in prepare_sliders (#145)
Sometimes, you want to plot an expression with respect to several variables (like an _XY_-plot). This commit facilitates that.Ordered components and parameter defaults in HelicityModel (#146)
`HelicityModel.components` and `HelicityModel.parameter_defaults` are now ordered alphabetically, so that you can also get them by index. ([Not entirely straight-forward](https://stackoverflow.com/a/10058239/13219025), but at least now it's guaranteed that the items are orderd.)Warning is emitted when resonance is not available in HelicityModel (#148)
π Bug fixes
Correctly set custom phsp_factor CoupledWidth (#140)
`CoupledWidth` class did not set its `phsp_factor` attribute if it was specified in the constructor.Determine phase space factor subscript from s (#144)
Just like with `CoupledWidth`, the (optional) subscript in the latex rendering for this function should come from the decaying parameter (input argument `s`), not the decay products (input argument `m_a`).Removed mdit-py-plugins version limit (#147)
Dependency conflicts have been resolved by `myst-nb`.π Documentation
Removed 0-below-threshold note for rel BW (#143 and 371572e)
The docstring for `relativistic_breit_wigner_with_ff` still included a note about setting the damping factor to zero below threshold in case of zero angular momentum.Embeded GPLv3+ license file (#154)
Some platforms like Zenodo and conda-forge require the license file to be packaged.Extended package description in README and removed tick-boxed (#155)
Removed the tick-boxes, as they do not render correctly on PyPIAdded package description for PyPI (#158)
Closes https://github.com/ComPWA/compwa-org/issues/61π¨ Internal maintenance
Simplify doit implementation (#142)
The `implement_doit_method` decorator would re-construct the class from its own arguments. It's better to directly call the `evaluate()` method though, because the class is already constructed once the method is called.Removed mdit-py-plugins version limit (#147)
Dependency conflicts have been resolved by `myst-nb`.
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.11.1
Release 0.11.1
See all documentation for this version here.
π Bug fixes
Classes deriving from UnevaluatedExpression are now pickled correctly (#139)
A pickled `HelicityModel` could not be unpickled again, because the `UnevaluatedExpression._name` attribute was stored as a positional (i.e. required) argument in [`__getnewargs__`](https://docs.python.org/3/library/pickle.html#object.__getnewargs__).
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.11.0
Release 0.11.0
Two major new changes:
- Added a module for symbolic K-matrix and P-vector expressions
- Dynamics functions are now classes, so that they can be more easily identified in the expression tree
See all documentation for this version here.
π‘ New features
Added a module for symbolic, non-relativistic K-matrix computations for an arbitrary number of channels (#117, #120, #121, #122, #127, #128, and #129)
Implemented [TR-005](https://compwa-org.rtfd.io/en/stable/report/005.html) and [TR-009](https://compwa-org.readthedocs.io/en/latest/report/009.html). Notable difference: this implementation provides **caching of the matrix multiplication** so that one can more easily switch between a different number of channels.Implemented (non-)relativistic P-vector (#123, #127, #131, and #132)
Implementation of [TR-010](https://compwa-org.readthedocs.io/en/stable/report/010.html). Closes #118Added symbol_to_arg and arg_to_symbol attribute to symplot.SliderKwargs (#124)
Added a `symbol_to_arg` and `arg_to_symbol` property to `symplot.SliderKwargs`, as it is often needed in the visualization applets.Maximum angular momentum in BlattWeisskopfSquared can now be limited (#134)
Specifically for speeding up the widgets, see e.g. ad65784β οΈ Interface
Dynamics functions are now wrapped in Expr classes (#115, #119, and #138)
Inspired by https://github.com/ComPWA/compwa-org/pull/37 and https://github.com/ComPWA/compwa-org/pull/43, which required to re-define coupled width and other dynamics in terms of a class to make them render nicely, all expression nodes of dynamics functions are formulated in terms of `sympy.Expr` classes. This has been made possible with #114. Note some major interface changes: - `coupled_width` -> `CoupledWidth` - `breakup_momentum_squared` -> `BreakupMomentumSquared` - `phase_space_factor` -> `PhaseSpaceFactor` (for this, the `PhaseSpaceFactor` had to be renamed to `PhaseSpaceFactorProtocol`) - etc... The `breakup_momentum` function has been removed. Also added a (hidden) instance attribute `UnevaluatedExpr._name`, so that it can be used in the LaTeX rendering. In addition, the LaTeX rendering of of classes like `PhaseSpaceFactor` is affected by the name of their arguments (if they have any). This comes in handy in the relativistic K-matrix, when we want to distinguish between different `CoupledWidth`s and `PhaseSpaceFactor`s in the LaTeX rendering.Renamed decorator sub-module to "sympy" (#116)
The `ampform.dynamics.decorator` sub-module does more than just providing decorators. It generally contains functions that help building `sympy.Expr` classes (and instances), so it is better moved and renamed to a more general place: `ampform.sympy`.π Documentation
Added comparison visualization of P-vector vs K-matrix (#125)
Imported and improved K-matrix theory section from compwa-org (#126 and #130)
Imported and bundled the theory sections from [TR-005](https://compwa-org.readthedocs.io/en/stable/report/005.html), [TR-009](https://compwa-org.readthedocs.io/en/stable/report/009.html), and [TR-010](https://compwa-org.readthedocs.io/en/stable/report/010.html). Many more notes were added and some problems have been pointed out as well. Sphinx preview [here](https://ampform--126.org.readthedocs.build/en/126/usage/dynamics/k-matrix.html).Switched to compwa-org for the develop page (#137)
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.10.5
Release 0.10.5
See all documentation for this version here.
Final release before v0.11.0.
π Bug fixes
Implemented deep argument in doit instead of the new method (#114)
Fixes a small bug that was introduced by the new function `create_expression`, which was introduced in #113. That function allowed handling the `deep` argument in `doit`, so that expressions containing a `BlattWeisskopfSquared` can be called with `doit(deep=False)`. The fix was faulty though; this PR is the correct implementation.Slider descriptions now use HTML math mode (cafddea)
Math mode in ipywidgets doesn't render well when using LaTeX dollar signs for math mode. HTML math mode `\(...\)` works well both in Jupyter notebook and in HTML.
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.10.4
Release 0.10.4
See all documentation for this version here.
π‘ New features
Improved symplot.SliderKwargs class (#109)
Some minor changes that improve usage of `symplot`, but don't affect interface. Required for https://github.com/ComPWA/compwa-org/pull/37. - [x] Set step size (not number of steps) if `n_steps` is `float` in `set_ranges` - [x] Un-hide `_sliders` and `_arg_to_symbol` attributes of `SliderKwargs`Implemented symplot.substitute_indexed_symbols() function (#111)
Implementation of [[TR-008] `Indexed` free symbols](https://compwa-org.readthedocs.io/en/stable/report/008.html)Implemented symplot.partial_doit() function (#112)
Helper function for https://github.com/ComPWA/compwa-org/pull/37β οΈ Interface
Remove angular momentum projection from formulate_clebsch_gordan_coefficients (#102)
See https://github.com/ComPWA/ampform/pull/100#issuecomment-886250406π Bug fixes
DOT is now wrapped in a figure (#106)
Fixes #105 Bit of a clumsy solution, using the `figure` directive, but I don't see another way around it...Remove verify_signature function (#110)
This check makes the framework less flexible and the additional code is not worth the 'friendly' exception. It is required for https://github.com/ComPWA/compwa-org/pull/37, where a special class `PhaseSpaceFactor` is inserted into `coupled_width`.UnevaluatedExpr can now be instantiated with a doit argument (#113)
Previously, there something like `BlattWeisskopfSquared(...).doit(deep=False)` would crash. This fixes that behavior. See also https://github.com/ComPWA/compwa-org/pull/37π Documentation
Extended docstrings of helicity and kinematics modules (#100)
Added several examples that explain the implementations in the `helicity` and `kinematics` modules. A preview of the API can be viewed here: https://ampform--100.org.readthedocs.build/en/100/api/ampform.htmlWiden cell output where needed (#103)
Widen cells where their input and/or output is so wide that a horizontal scrollbar appears. This can be done with the `full-width` tag: https://sphinx-book-theme.readthedocs.io/en/latest/layout.html#full-width-content For instance:  versus ([v0.10.3](https://ampform.readthedocs.io/en/0.10.3/usage/amplitude.html#build-sympy-expression)): Documentation pages are wider now (#104)
Ignored panel css to increase main content width. Otherwise the main content ends up being weirdly small. See: - https://github.com/executablebooks/sphinx-book-theme/blob/547cc95674623345124d9bbea9e15e5b5fa34d0e/docs/conf.py#L62 - https://sphinx-panels.readthedocs.io/en/latest/index.html?highlight=panels_add_bootstrap_css#sphinx-configuration Old:  New:  Many thanks to @ianhi!π±οΈ Developer Experience
Switched to pre-commit.ci where possible (#107)
See ComPWA/qrules#87
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.10.3
Release 0.10.3
See all documentation for this version here.
π‘ New features
Define breakup_momentum function (#97)
It makes more sense to use `breakup_momentum` as an argument to `phsp_factor` in [`relativistic_breit_wigner_with_ff`](https://ampform.readthedocs.io/en/0.10.2/api/ampform.dynamics.html#ampform.dynamics.relativistic_breit_wigner) etc than [`breakup_momentum_squard`](https://ampform.readthedocs.io/en/0.10.2/api/ampform.dynamics.html#ampform.dynamics.breakup_momentum_squared).β οΈ Interface
Removed sympy.Piecewise from rrelativistic_breit_wigner_with_ff (#98)
The function [`relativistic_breit_wigner_with_ff`](https://ampform.readthedocs.io/en/0.10.2/api/ampform.dynamics.html#ampform.dynamics.relativistic_breit_wigner_with_ff) now produces
instead of
The latter was mistakenly introduced because of a wrong parameterization in [`phase_space_factor_analytic`](https://ampform.readthedocs.io/en/0.10.2/api/ampform.dynamics.html#ampform.dynamics.phase_space_factor_analytic) (this one is valid only for equal masses).
π Documentation
Colorized extracted amplitudes in formalism notebook (0f913d6)
Added links to ComPWA organization (a6dd74d)
π±οΈ Developer Experience
Allow π Physics issue label (56cb749)
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.10.2
Release 0.10.2
See all documentation for this version here.
π Documentation
Added helicity-vs-canonical basis comparison (#95)
Added a notebook that describes the difference between the **helicity basis** and **canonical basis** in the helicity formalism.π Bug fixes
Required numpy version is limited to v1.20 (#91)
Since [NumPy v1.21](https://github.com/numpy/numpy/releases/tag/v1.21.0) it is required to explicitly define `__array_ufunc__`, both for static typing as for running the code. With the current set-up, `__array_ufunc__` is too problematic. Better solution would be #92.
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.10.1
Release 0.10.1
See all documentation for this version here.
π‘ New features
Implemented HelicityModel.sum_components (#90)
Import [`tensorwaves.physics.add_components`](https://tensorwaves.readthedocs.io/en/0.2.8/api/tensorwaves.physics.html#tensorwaves.physics.add_components). Note that this allows removing the [`tensorwaves.physics`](https://tensorwaves.readthedocs.io/en/0.2.8/api/tensorwaves.physics.html) module.
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.10.0
Release 0.10.0
See all documentation for this version here.
β οΈ Interface
AmpForm interface and implementation has been adapted to the new QRules interface (#84)
Adapts the AmpForm interface and implementation to [QRules v0.9.0](https://github.com/ComPWA/qrules/releases/tag/0.9.0). Naming has been changed accordingly, most notably that graphs become transitions, edges becomes states, nodes become interactions. Some related interface changes: - AmpForm's own `ReactionInfo` (under `kinematics`) and `State` (under `helicity`) have been removed - `TwoBodyKinematicVariableSet`: - `in_edge_inv_mass` -> `incoming_state_mass` - `out_edge_inv_mass1` -> `outgoing_state_mass1` - `out_edge_inv_mass2` -> `outgoing_state_mass2` - There are now also an instance check on its constructor.AmpForm's helicity module has been split (#87)
Split up the `helicity` module. Major change: the `generate()` method is now called `formulate()` (97e9ce2) Related to #61HelicityModel.generate() has been renamed to HelicityModel.formulate() (#87)
All methods and functions that produce `sympy.Expr`s are now named 'formulate' instead of 'generate'.Coefficient names have been changed (#80)
**This changes the sum of amplitudes in some cases!** Fixes #73 New notation:  For comparison, there's also 32bb1b6, which also includes helicity, but which results in 8 unique coefficient names: π¨ Internal maintenance
Test fixtures are now parametrized (#86)
Some improvements to the test set-up.π Documentation
Links to expertsystem replaced with internal links (#82)
Some links in the `expertsystem`, because [intersphinx](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html) is a bit too eager.Intersphinx links can now pinned to specific versions of external API pages (#83)
Added explanation for how to substitute parameters (#88)
First step towards #5. Adds a new page that shows some SymPy tricks to modify the `HelicityModel`.Added explanation of how to couple parameters (#89)
Closes #5
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.9.4
Release 0.9.4
See all documentation for this version here.
π‘ New features
More phase space factor types available (#81)
β οΈ Interface
phase_space_factor_ac has been renamed to phase_space_factor_analytic (#81)
phase_space_factor does not use ComplexSqrt anymore (#81)
**This reverts the phase space factor behaviour to that of version [0.9.2](https://github.com/ComPWA/ampform/releases/tag/0.9.2) and prior.**π Documentation
Improvements to the analytic-continuation and dynamics pages (#81)
π±οΈ Developer Experience
upgrade pinned requirements (#79)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.9.3
Release 0.9.3
See all documentation for this version here.
π‘ New features
Added a new dynamics builder for analytic continuation (#78)
Added a new function `create_analytic_breit_wigner` to `ampform.dynamics.builder` that allows setting a `relativistic_breit_wigner_with_ff` with analytic continuation.π Bug fixes
Return masses as floats if possible (#76)
Since #75 there is no need to use complex values as input for analytic continuation.Set relativistic Breit-Wigner with form factor to 0 if π below threshold (#77)
A relativistic Breit-Wigner with Blatt-Weisskopf form factor now returns 0 below threshold. See [updated docstring](https://github.com/ComPWA/ampform/compare/sub-threshold-behavior?expand=1#diff-afdef4ce3b18ddf3a238a155accf7d4d304b5a66ec160cf95ae11b3bedb340bdR307).
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.9.2
Release 0.9.2
See all documentation for this version here.
π Bug fixes
More control over complex square roots provided through ComplexSqrt class (#72)
Closes #64 Implements [TR-000](https://compwa-org.readthedocs.io/report/000.html) and [TR-001](https://compwa-org.readthedocs.io/report/001.html) by defining a `ComplexSqrt` class. This allows for custom lambdification for specific expression tree nodes that are a square root.π Documentation
Added tip about jupyter-katex (#74)
The complete amplitude model can only be rendered if [`jupyterlab-katex`](https://pypi.org/project/jupyterlab-katex) is installed. However, since KaTeX is less extensive than MathJax, this is only pointed out as a tip, and `jupyterlab-katex` is not added to the requirements.Several improvements to the dynamics and analytic-continuation pages (#75, bb2b4f0, 955be9b)
π±οΈ Developer Experience
Auto-close milestone upon release (#70)
Milestones are automatically closed once their matching release is published.
- Python
Published by github-actions[bot] over 4 years ago
ampform - AmpForm 0.9.1
Release 0.9.1
See all documentation for this version here.
β οΈ Interface
Coefficient symbol name has been changed slightly (cdec30b)
The coefficients in canonical amplitudes ended in ";", while the coefficients for helicity amplitudes did not. Furthermore, an additional space has been added behind each intermediate ";" for readability.π Bug fixes
Function complex_sqrt() has been replaced with sympy.sqrt() to allow lambdified analytic continuation (#58)
The `complex_sqrt()` function causes problems when being lambdified, because it contains `sympy.Piecewise`. An attempt was made to replace `complex_sqrt()` with a class `ComplexSqrt` that defined specific lambdify methods (#59), but that approach results in too much maintenance work (for instance does not work out of the box with tensorflow). This PR instead just casts all masses to complex values, so that `numpy.sqrt` works with negative values, e.g.: ```python >>> np.sqrt(np.array(-1, dtype=np.complex64)) 1j ``` It's not ideal, but at least allows optimizing models with analytic continuation. Closes #59Improve signature of relative_breit_wigner_with_ff (31f5350)
Improve rendering of Clebsch-Gordan coefficient (9d98a3c)
The mini-fix for `CG` introduced by ComPWA/expertsystem#454 did not work well yet. This fix also removes the intermediate `_ClebschGordanLatexFix` class by replacing the `CG._latex method`.π±οΈ π Documentation
Install doc requirements in Google Colab (1e6044f)
- Python
Published by github-actions[bot] almost 5 years ago
ampform - AmpForm 0.9.0
Release 0.9.0
Yanked in favor of v0.9.1 due to #58.
Major refactoring and improvements to the dynamics module and documentation.
See all documentation for this version here.
π‘ New features
Extracted function for coupled, or "mass-dependent", width (#45)
The running width / coupled width / mass dependent width used in `relativisitc_breit_wigner_with_ff` is useful to _K_-matrix and FlattΓ©. It's now exposed as a separate function: AmpForm now ships with a symplot mini-package (#47)
Previously, the mini-package `symplot` was only available to the documentation, or as a relative import to notebooks. This did not work well, especially for the notebooks and for Google Colab.Added phase space factor functions and added visualizations (#51)
Adds the functions phase_space_factor and phase_space_factor_ac, with references. The functions are, however, not yet implemented into the dynamic lineshapes.Implement analytic continuation (#52 and #56)
Implemented `phase_space_factor` that was introduced by #51 into the `coupled_width`. The 'default' `phase_space_factor` has been adapted so that it can handle negative square roots. Note: the overall lineshape of amplitude models does not change in the domain where it was defined so far. Only undefined domains are extended (see `test_dynamics.py`).β οΈ Interface
BlattWeisskopf now uses z as argument, not q and d (#40)
Let the `BlattWeisskopf` callable only depend on `z` and `angular_momentum`. This leaves leaves the responsibility of setting `z` equal to break-up momentum times meson radius to the caller (too much logics going on within this class + this z = d \* q is just one way to define things).Improved API of dynamics module (#41, #54, and d79583d)
- The main `dynamics` module now only contains lineshape functions (801c7d9). This allows for cleaner imports, like : ```python from ampform.dynamics import relativistic_breit_wigner ``` - Decorators that facilitate subclassing `sympy.Expr` have been isolated under `dynamics.decorator` (c1422ff) - `dynamics.builder` can remain as it is (no circular dependencies), but its docstrings have been improved (ba24b2a) - `doit()`, `def_assumptions`, and `evaluate()` are now hidden from the API (1c79ce4) - Sub-classes of `UnevaluatedExpr` do not convert the `args` into properties anymore (bb1675a). This was causing a lot of code cluttering and those properties are not that useful. - `breakup_momentum` now has references to the PDG (in preparation of analytic continuation) (020c5b3)Return square value of break-up momentum (#48)
The original `breakup_momentum` contains a `sqrt`. This is inconvenient for the caller, because it does not allow handling negative values the break-up momentum _squared_. This is becomes important in phase space factors.Use Mandelstam π instead of πΒ² (#49)
Comparable to #48, this allows handling negative values of π or πΒ².Switch to square value of Blatt-Weisskopf (#53)
The value of Blatt-Weisskopf squared can be negative. This leaves it up to the caller how to handle these negative values if a square root is to be taken. Note that this becomes particularly important when the Blatt-Weisskopf function is used as a damping factor, like in `relativistic_breit_wigner_with_ff` and `create_non_dynamics_with_ff`, as opposed to `coupled_width` (where the square value is used). Also improved some of the references for the lineshapes. In addition, a new interactive widget shows the effect of a Blatt-Weisskopf factor.π Documentation
Improved mathematical rendering in dynamics API (#43)
#42 makes it easier to dynamically generate latex for the math in behind the `dynamics` module. This makes it easier to cross-reference the formulas as follows:Screenshot of generated API
It now also becomes easier to extract for instance running width (both in coding and in math definitions).
Annotations in API are now abbreviated (#44)
Make the API more readable by abbreviating type hints. This style also mimics what one sees in the codebase. **Old**   **New**   **Insert line breaks (optional)** There's also an experimental option `autodoc_insert_signature_linebreaks` to insert line breaks before each argument:  but this has been switched off because it doesn't look nicely everywhere.Added interactive dynamics lineshape widgets (#50)
Show effect of Blatt-Weisskopf factor on break-up momentum (#53)
Also improved some of the references for the lineshapes. In addition, a new interactive widget shows the effect of a Blatt-Weisskopf factor.Improve signature of coupled_width (#54)
The signature of functions that have arguments with functions as default values (for an argument that expects a callable) do not render well. So it's better to use `Optional[PhaseSpaceFactor] = None` instead.Improve dynamics page with widget output (#55)
Added phase sliders in K-matrix animation (5eda627)
Removed brackets from parenthetical citations (dda5099)
These citations are already rendered as links, so there's no need to put brackets around them. E.g. > [Chung et al. 1995], pp.2β4 becomes > Chung et al. 1995, pp.2β4π±οΈ Developer Experience
Removed myst-nb glue cells (#42)
The `lineshapes` notebook was used to insert a mathematical rendering of the implementations in the dynamics module into its docstrings. This has some disadvantages: - Output cells have to be updated whenever some implementation. This could be countered with pytest-notebook, but that is bothersome if a notebook generates figures. - The link between the module and that notebook is note immediately clear. The math is now inserted through Sphinx only (through `conf.py`), which makes it easier to extend the `dynamics` module with more lineshapes and render their mathematics.
- Python
Published by github-actions[bot] almost 5 years ago
ampform - AmpForm 0.8.1
Release 0.8.1
See all documentation for this version here.
π Documentation
Generalized the procedure to create plot widgets for SymPy expressions (#31)
- Slider parameters are extracted from the remaining free symbols of an (amplitude) expression automatically. That makes it easier to plot any other amplitude model -- it's only needed to provide a domain for the sliders. - Labels for the sliders are now the names of the (latex) symbols they represent - The real and imaginary plot have been removed, leaving only the intensity plot and the Argand plot - The interactive notebook can now be run independently Extracted interactive plotting to symplot mini-package (#38)
The procedure illustrated in [Inspect model interactively](https://ampform.readthedocs.io/en/0.8.0/usage/interactive.html) has been extracted to a 'mini-module' `symplot`. For now, it's only available to the Jupyter notebooks and to Sphinx, but if successful, it could be hosted as a separate package, so that it can also be used for the PWA pages.Added interactive notebook for inspect K-matrix behavior (#39)
Illustrate difference between _K_-matrix and sum of Breit-Wigners with `symplot` from #38. See [this notebook/page](https://ampform.readthedocs.io/en/0.8.1/usage/k-matrix.html). Added references to dependency pinning in installation instructions (580a7f2)
Added cSpell badge (4f12285)
Updated links to related projects on RTD (b7871b7)
RTD namespace "pwa" has been disabled to shorten URLs.Documentation now renders better on mobile (a4ef501b)
See https://github.com/executablebooks/sphinx-book-theme/blob/master/CHANGELOG.md#v0042v010π¨ Internal maintenance
Adapt tests to official qrules release (#29)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub actionRemove remnants from expertsystem/qrules (#34)
Remove things that are only useful to `qrules`, such as `jsonschema`, `pydot`, `constraints`, and `sphobjinv` (for `constraints`).Clean up pylint configuration (#35)
- Remove built-ins check (flake8-builtins handles this) - Sort pylintrc sections - Use `good-names-rgxs` - Use error names instead of error codes - Move some of the ignores inlineOptional dependencies collection "extras" has been renamed to "all" (0f676c8)
Makes a bit more sense, i.e.: ```shell pip install ampform[all] ``` instead of ```shell pip install ampform[extras] ```π±οΈ Developer Experience
Moved requirements back to setup.cfg (#27)
With the release of [`pip-tools` v6.1.0](https://github.com/jazzband/pip-tools/releases/tag/6.1.0), `pip-compile` now correctly handles [`extras_require`](https://setuptools.readthedocs.io/en/latest/userguide/dependency_management.html#optional-dependencies). This allows for a big clean-up of the set-up introduced by https://github.com/ComPWA/expertsystem/pull/412. Advantages: - Easier for the user and developer! Just run: `pip install -e .[dev]` to get started developing, `pip install -e .[dev] -U` to try out upgrades, and `pip install -c .constraints/py3.8.txt -e .[dev] -U` in case you exactly want to reproduce the dependencies for some commit. - The upgrade jobs become significantly faster: [bit over 1min](https://github.com/ComPWA/qrules/runs/2346236017?check_suite_focus=true) versus almost [3min](https://github.com/ComPWA/qrules/runs/2322145112?check_suite_focus=true) - All requirements, their version domains, and the dependencies between each of the requirement sections can be nicely overseen and maintained within `setup.cfg` - Git diffs for pull requests that affect dependencies become easier to oversee - Less complexity and fewer changes per commitBug fix: define testpaths in pytest.ini (#28)
Since 35aa838, it is become impossible to run tests through VSCode. Defining testpaths fixes this. In addition, it removes the last 'non-tox' section from the tox.ini file (see 81402eb). See also https://github.com/ComPWA/qrules/pull/42Added GitHub PR template (#32)
GitPod now automatically installs VSCode extensions (#32)
Added radon complexity check (#33)
Cleaned up pylint configuration (#35)
- Remove built-ins check (flake8-builtins handles this) - Sort pylintrc sections - Use `good-names-rgxs` - Use error names instead of error codes - Move some of the ignores inlineAdded more flake8 plugins and fixed identified issues (#36)
- [`flake8-comprehensions`](https://pypi.org/project/flake8-comprehensions) - [`flake8-pytest-style`](https://pypi.org/project/flake8-pytest-style) - [`flake8-use-fstring`](https://github.com/MichaelKim0407/flake8-use-fstring/blob/develop/README.md)Removed nbstripout from format requirements and added as pre-commit hook (#37)
Pre-commit hooks should only be local if the corresponding tool can also be used through other applications (e.g. IDEs or Jupyter Lab), so that their versions are in sync. And `nbstripout` can only be used through the terminal, so is best enforced through pre-commit only.Extracted .mypy.ini file from setup.cfg (47f0004)
This cleans up the setup.cfg file so that it only contains info a the set-up of the packageExtracted config files for dev tools from tox.ini (81402eb)
Better to only keep tox job definitions in the tox.ini file. Note that config files are only extracted if their respective tools supports a config file name that starts with a dotRun black formatting in documentation (324d684)
Doctests are now verified with pytest instead of Sphinx (35aa838)
This is much faster, allows for testing coverage, and is also easier to run locally.Renamed CI workflows to pytest and pre-commit (0da2a84)
This works better with the CI badgesAdded test explorer VSCode extension and removed redundant extensions (d04c4f8)
- Python
Published by github-actions[bot] almost 5 years ago
ampform - AmpForm 0.8.0
Release 0.8.0
See all documentation for this version here.
π‘ New features
Extend Blatt-Weisskopf to L <= 8 (#15)
- Improved rendering of the `BlattWeisskopf` in the API and the lineshape notebook - Extended the Blatt-Weisskopf definition to angular momentum of up to _L_ <= 8β οΈ Interface
Rename particle argument to resonance (#17)
First argument of the `ResonanceDynamicsBuilder` protocol has been renamed to `resonance`.Improve BlattWeisskopf signature (#25)
Previously only had `args`, now it has a specific signature.π Documentation
Improve citation labels and bibliography (#14)
- Both DOI and URLs are now in the bibliography file. If both are available, only the DOI is rendered in the HTML pages (with link). - References are now shown as [Author _et al._ year] instead of some number e.g. [1]. - Language tags have been removed from the [`bibliography.bib`](https://github.com/ComPWA/ampform/blob/8ee5c145d5beb840c38fa0a4736c7f7a6bf9d2c8/docs/bibliography.bib) file. - Added more type hints to the [`docs/conf.py`](https://github.com/ComPWA/ampform/blob/8ee5c145d5beb840c38fa0a4736c7f7a6bf9d2c8/docs/conf.py) fileImprove instructions for custom dynamics (#16)
Made the custom dynamics instructions a bit more user-friendly by: - putting the `import` statements where they are used (for copy-button) - clarifying what the output of a custom dynamics builder is by declaring an `expression` and `parameter_defaults` parameter:tada: Add notebook with interactive Argand plots (#23)
A new page has been added that illustrates how to use [mpl-interactions](https://mpl-interactions.readthedocs.io) to inspect the amplitude model. The page is a notebook that can be used interactively, but also renders nicely as an animation on the rendered HTML page itself. Improve introductory text on main index page and usage page (#26)
π±οΈ Developer Experience
Split CI workflow into sty, docs, and tests (#13)
Standardize cspell config (#18)
Use the new `check-dev-files` hook to rename and format the `.cspell.json` file.Verify shape of amplitude model and increase test coverage (#20)
Previously, the tests did not check the shape of the complete amplitude model (specifically, the dynamics). The documentation only shows what those shapes look like, but don't check their shape. This is a problem when refactoring the dynamics (see in particular the [epic/improve-dynamics](https://github.com/ComPWA/ampform/tree/epic/improve-dynamics) branch).Remove redundant dev dependencies (#22)
In particular `pydeps` and `ipywidgets` (which may be added later on again in the dynamics epic branch).
- Python
Published by github-actions[bot] almost 5 years ago
ampform - 0.8.0a1
Pre-release 0.8.0a1
See all documentation for this version here.
β οΈ Interface
The expertsystem.amplitude has been rereleased as the AmpForm package :tada: (#1, #2, and #11). See also the related qrules release.
- Python
Published by github-actions[bot] almost 5 years ago