From e7803768ce6232e952626d4fc60ff873e95f85b1 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Tue, 26 Sep 2023 23:37:50 +0200 Subject: [PATCH] DOC: organise TRs with JS DataTables (#210) * DOC: embed TR details in DataTable * DOC: remove ADRs and TRs from sidebar * FIX: relink `ipywidgets` API https://github.com/ComPWA/compwa-org/actions/runs/6318207428/job/17156697790 * MAINT: remove `pycharm` from cell metadata * MAINT: remove `sphinx-issues` plugin * MAINT: replace all `need` roles with `doc` links * MAINT: update Jupyter kernels * MAINT: update pip constraints and pre-commit * MAINT: remove redundant `custom.css` reference * MAINT: remove `sphinx-needs` * MAINT: split notebook title cell from `spec` card cell * MAINT: update pip constraints and pre-commit --------- Co-authored-by: GitHub --- .constraints/py3.10.txt | 62 +++--- .constraints/py3.11.txt | 62 +++--- .constraints/py3.7.txt | 22 +-- .constraints/py3.8.txt | 62 +++--- .constraints/py3.9.txt | 64 +++---- .cspell.json | 1 + .pre-commit-config.yaml | 8 +- docs/.gitignore | 1 + docs/_list_technical_reports.py | 125 ++++++++++++ docs/adr/000.md | 6 +- docs/adr/001.md | 8 +- docs/adr/001/operators.ipynb | 2 +- docs/adr/001/sympy.ipynb | 2 +- docs/adr/002.md | 8 +- docs/adr/002/composition.ipynb | 2 +- docs/adr/002/expr.ipynb | 2 +- docs/adr/002/function.ipynb | 2 +- docs/adr/template.md | 4 +- docs/conf.py | 75 ++------ docs/report/000.ipynb | 40 ++-- docs/report/001.ipynb | 36 ++-- docs/report/002.ipynb | 39 ++-- docs/report/003.ipynb | 34 ++-- docs/report/004.ipynb | 28 ++- docs/report/005.ipynb | 37 ++-- docs/report/006.ipynb | 31 +-- docs/report/007.ipynb | 28 +-- docs/report/008.ipynb | 33 ++-- docs/report/009.ipynb | 43 +++-- docs/report/010.ipynb | 37 ++-- docs/report/011.ipynb | 42 ++-- docs/report/012.ipynb | 39 ++-- docs/report/013.ipynb | 41 ++-- docs/report/014.ipynb | 30 +-- docs/report/015.ipynb | 33 ++-- docs/report/016.ipynb | 45 +++-- docs/report/017.ipynb | 32 ++-- docs/report/018.ipynb | 34 ++-- docs/report/019.ipynb | 30 ++- docs/report/020.ipynb | 327 ++++++-------------------------- docs/report/021.ipynb | 42 ++-- docs/report/022.ipynb | 34 ++-- docs/reports.md | 52 ++++- setup.cfg | 5 +- 44 files changed, 871 insertions(+), 819 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/_list_technical_reports.py diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index ef8e670a..0770906a 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -17,7 +17,7 @@ attrs==23.1.0 babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.12.2 -black==23.9.0 +black==23.9.1 bleach==6.0.0 cachetools==5.3.1 certifi==2023.7.22 @@ -28,9 +28,9 @@ charset-normalizer==3.2.0 click==8.1.7 colorama==0.4.6 comm==0.1.4 -contourpy==1.1.0 +contourpy==1.1.1 cycler==0.11.0 -debugpy==1.7.0 +debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.7 @@ -40,12 +40,12 @@ entrypoints==0.4 exceptiongroup==1.1.3 executing==1.2.0 fastjsonschema==2.18.0 -filelock==3.12.3 +filelock==3.12.4 fonttools==4.42.1 fqdn==1.5.1 graphviz==0.20.1 greenlet==2.0.2 -identify==2.5.27 +identify==2.5.29 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 @@ -54,13 +54,13 @@ ipykernel==6.25.2 ipympl==0.9.3 ipython==8.15.0 ipython-genutils==0.2.0 -ipywidgets==8.1.0 +ipywidgets==8.1.1 isoduration==20.11.0 jedi==0.19.0 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.0 +jsonschema==4.19.1 jsonschema-specifications==2023.7.1 jupyter==1.0.0 jupyter-cache==0.6.1 @@ -74,19 +74,19 @@ jupyter-server-fileid==0.9.0 jupyter-server-terminals==0.4.4 jupyter-server-ydoc==0.8.0 jupyter-ydoc==0.2.5 -jupyterlab==3.6.5 +jupyterlab==3.6.6 jupyterlab-code-formatter==2.2.1 -jupyterlab-lsp==4.2.0 +jupyterlab-lsp==4.3.0 jupyterlab-myst==2.0.2 jupyterlab-pygments==0.2.2 -jupyterlab-server==2.24.0 -jupyterlab-widgets==3.0.8 +jupyterlab-server==2.25.0 +jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 markdown-it-py==2.2.0 markupsafe==2.1.3 -matplotlib==3.7.2 +matplotlib==3.8.0 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 mdurl==0.1.2 @@ -100,11 +100,11 @@ nbclient==0.6.8 nbconvert==7.8.0 nbformat==5.9.2 nbmake==1.4.3 -nest-asyncio==1.5.7 +nest-asyncio==1.5.8 nodeenv==1.8.0 -notebook==6.5.5 +notebook==6.5.6 notebook-shim==0.2.3 -numpy==1.25.2 +numpy==1.26.0 overrides==7.4.0 packaging==23.1 pandocfilters==1.5.0 @@ -112,7 +112,7 @@ parso==0.8.3 pathspec==0.11.2 pexpect==4.8.0 pickleshare==0.7.5 -pillow==10.0.0 +pillow==10.0.1 platformdirs==3.10.0 pluggy==1.3.0 pre-commit==3.4.0 @@ -124,14 +124,14 @@ pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.13.3 +pydata-sphinx-theme==0.14.1 pygments==2.16.1 -pyparsing==3.0.9 +pyparsing==3.1.1 pyproject-api==1.6.1 pytest==7.4.2 python-dateutil==2.8.2 python-json-logger==2.0.7 -python-lsp-jsonrpc==1.1.0 +python-lsp-jsonrpc==1.1.2 python-lsp-server==1.8.0 pytoolconfig==1.2.5 pyyaml==6.0.1 @@ -140,12 +140,11 @@ qtconsole==5.4.4 qtpy==2.4.0 referencing==0.30.2 requests==2.31.0 -requests-file==1.5.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.9.0 -rpds-py==0.10.2 -ruff==0.0.287 +rpds-py==0.10.3 +ruff==0.0.291 send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -157,10 +156,8 @@ sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 -sphinx-data-viewer==0.1.2 sphinx-design==0.5.0 -sphinx-issues==3.0.1 -sphinx-needs==1.3.0 +sphinx-remove-toctrees==0.0.3 sphinx-thebe==0.2.1 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.7 @@ -169,10 +166,9 @@ sphinxcontrib-devhelp==1.0.5 sphinxcontrib-hep-pdgref==0.1.4 sphinxcontrib-htmlhelp==2.0.4 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-plantuml==0.26 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 -sqlalchemy==2.0.20 +sqlalchemy==2.0.21 stack-data==0.6.2 tabulate==0.9.0 terminado==0.17.1 @@ -180,21 +176,21 @@ tinycss2==1.2.1 tomli==2.0.1 tornado==6.3.3 tox==4.11.3 -traitlets==5.9.0 -typing-extensions==4.7.1 +traitlets==5.10.1 +typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.4 +urllib3==2.0.5 virtualenv==20.24.5 wcwidth==0.2.6 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.2 +websocket-client==1.6.3 wheel==0.41.2 -widgetsnbextension==4.0.8 +widgetsnbextension==4.0.9 y-py==0.6.0 ypy-websocket==0.8.4 -zipp==3.16.2 +zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/.constraints/py3.11.txt b/.constraints/py3.11.txt index 261a4291..2d8b414d 100644 --- a/.constraints/py3.11.txt +++ b/.constraints/py3.11.txt @@ -17,7 +17,7 @@ attrs==23.1.0 babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.12.2 -black==23.9.0 +black==23.9.1 bleach==6.0.0 cachetools==5.3.1 certifi==2023.7.22 @@ -28,9 +28,9 @@ charset-normalizer==3.2.0 click==8.1.7 colorama==0.4.6 comm==0.1.4 -contourpy==1.1.0 +contourpy==1.1.1 cycler==0.11.0 -debugpy==1.7.0 +debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.7 @@ -39,12 +39,12 @@ docutils==0.17.1 entrypoints==0.4 executing==1.2.0 fastjsonschema==2.18.0 -filelock==3.12.3 +filelock==3.12.4 fonttools==4.42.1 fqdn==1.5.1 graphviz==0.20.1 greenlet==2.0.2 -identify==2.5.27 +identify==2.5.29 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 @@ -53,13 +53,13 @@ ipykernel==6.25.2 ipympl==0.9.3 ipython==8.15.0 ipython-genutils==0.2.0 -ipywidgets==8.1.0 +ipywidgets==8.1.1 isoduration==20.11.0 jedi==0.19.0 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.0 +jsonschema==4.19.1 jsonschema-specifications==2023.7.1 jupyter==1.0.0 jupyter-cache==0.6.1 @@ -73,19 +73,19 @@ jupyter-server-fileid==0.9.0 jupyter-server-terminals==0.4.4 jupyter-server-ydoc==0.8.0 jupyter-ydoc==0.2.5 -jupyterlab==3.6.5 +jupyterlab==3.6.6 jupyterlab-code-formatter==2.2.1 -jupyterlab-lsp==4.2.0 +jupyterlab-lsp==4.3.0 jupyterlab-myst==2.0.2 jupyterlab-pygments==0.2.2 -jupyterlab-server==2.24.0 -jupyterlab-widgets==3.0.8 +jupyterlab-server==2.25.0 +jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 markdown-it-py==2.2.0 markupsafe==2.1.3 -matplotlib==3.7.2 +matplotlib==3.8.0 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 mdurl==0.1.2 @@ -99,11 +99,11 @@ nbclient==0.6.8 nbconvert==7.8.0 nbformat==5.9.2 nbmake==1.4.3 -nest-asyncio==1.5.7 +nest-asyncio==1.5.8 nodeenv==1.8.0 -notebook==6.5.5 +notebook==6.5.6 notebook-shim==0.2.3 -numpy==1.25.2 +numpy==1.26.0 overrides==7.4.0 packaging==23.1 pandocfilters==1.5.0 @@ -111,7 +111,7 @@ parso==0.8.3 pathspec==0.11.2 pexpect==4.8.0 pickleshare==0.7.5 -pillow==10.0.0 +pillow==10.0.1 platformdirs==3.10.0 pluggy==1.3.0 pre-commit==3.4.0 @@ -123,14 +123,14 @@ pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.13.3 +pydata-sphinx-theme==0.14.1 pygments==2.16.1 -pyparsing==3.0.9 +pyparsing==3.1.1 pyproject-api==1.6.1 pytest==7.4.2 python-dateutil==2.8.2 python-json-logger==2.0.7 -python-lsp-jsonrpc==1.1.0 +python-lsp-jsonrpc==1.1.2 python-lsp-server==1.8.0 pytoolconfig==1.2.5 pyyaml==6.0.1 @@ -139,12 +139,11 @@ qtconsole==5.4.4 qtpy==2.4.0 referencing==0.30.2 requests==2.31.0 -requests-file==1.5.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.9.0 -rpds-py==0.10.2 -ruff==0.0.287 +rpds-py==0.10.3 +ruff==0.0.291 send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -156,10 +155,8 @@ sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 -sphinx-data-viewer==0.1.2 sphinx-design==0.5.0 -sphinx-issues==3.0.1 -sphinx-needs==1.3.0 +sphinx-remove-toctrees==0.0.3 sphinx-thebe==0.2.1 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.7 @@ -168,31 +165,30 @@ sphinxcontrib-devhelp==1.0.5 sphinxcontrib-hep-pdgref==0.1.4 sphinxcontrib-htmlhelp==2.0.4 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-plantuml==0.26 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 -sqlalchemy==2.0.20 +sqlalchemy==2.0.21 stack-data==0.6.2 tabulate==0.9.0 terminado==0.17.1 tinycss2==1.2.1 tornado==6.3.3 tox==4.11.3 -traitlets==5.9.0 -typing-extensions==4.7.1 +traitlets==5.10.1 +typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.4 +urllib3==2.0.5 virtualenv==20.24.5 wcwidth==0.2.6 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.2 +websocket-client==1.6.3 wheel==0.41.2 -widgetsnbextension==4.0.8 +widgetsnbextension==4.0.9 y-py==0.6.0 ypy-websocket==0.8.4 -zipp==3.16.2 +zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index 33c7ad82..69a5ab35 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -53,7 +53,7 @@ ipykernel==6.16.2 ipympl==0.9.3 ipython==7.34.0 ipython-genutils==0.2.0 -ipywidgets==8.1.0 +ipywidgets==8.1.1 isoduration==20.11.0 jedi==0.18.2 jinja2==3.1.2 @@ -71,13 +71,13 @@ jupyter-server==1.24.0 jupyter-server-fileid==0.9.0 jupyter-server-ydoc==0.8.0 jupyter-ydoc==0.2.4 -jupyterlab==3.6.5 +jupyterlab==3.6.6 jupyterlab-code-formatter==2.2.1 jupyterlab-lsp==3.10.2 jupyterlab-myst==1.2.0 jupyterlab-pygments==0.2.2 jupyterlab-server==2.24.0 -jupyterlab-widgets==3.0.8 +jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 @@ -97,9 +97,9 @@ nbclient==0.5.13 nbconvert==7.6.0 nbformat==5.8.0 nbmake==1.2.1 ; python_version == "3.7.*" -nest-asyncio==1.5.7 +nest-asyncio==1.5.8 nodeenv==1.8.0 -notebook==6.5.5 +notebook==6.5.6 notebook-shim==0.2.3 numpy==1.21.6 packaging==23.1 @@ -138,11 +138,10 @@ pyzmq==24.0.1 qtconsole==5.4.4 qtpy==2.4.0 requests==2.31.0 -requests-file==1.5.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.9.0 -ruff==0.0.287 +ruff==0.0.291 send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -154,10 +153,8 @@ sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 -sphinx-data-viewer==0.1.2 sphinx-design==0.4.1 -sphinx-issues==3.0.1 -sphinx-needs==1.3.0 +sphinx-remove-toctrees==0.0.3 sphinx-thebe==0.2.1 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.2 @@ -166,7 +163,6 @@ sphinxcontrib-devhelp==1.0.2 sphinxcontrib-hep-pdgref==0.1.4 sphinxcontrib-htmlhelp==2.0.0 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-plantuml==0.26 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sqlalchemy==1.4.49 @@ -181,14 +177,14 @@ typed-ast==1.5.5 typing-extensions==4.7.1 ujson==5.7.0 uri-template==1.3.0 -urllib3==2.0.4 +urllib3==2.0.5 virtualenv==20.24.5 wcwidth==0.2.6 webcolors==1.13 webencodings==0.5.1 websocket-client==1.6.1 wheel==0.41.2 -widgetsnbextension==4.0.8 +widgetsnbextension==4.0.9 y-py==0.5.9 ypy-websocket==0.8.2 ; python_version < "3.8.0" zipp==3.15.0 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index 2cc58495..f8d820b0 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -17,7 +17,7 @@ attrs==23.1.0 babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.12.2 -black==23.9.0 +black==23.9.1 bleach==6.0.0 cachetools==5.3.1 certifi==2023.7.22 @@ -28,9 +28,9 @@ charset-normalizer==3.2.0 click==8.1.7 colorama==0.4.6 comm==0.1.4 -contourpy==1.1.0 +contourpy==1.1.1 cycler==0.11.0 -debugpy==1.7.0 +debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.7 @@ -40,28 +40,28 @@ entrypoints==0.4 exceptiongroup==1.1.3 executing==1.2.0 fastjsonschema==2.18.0 -filelock==3.12.3 +filelock==3.12.4 fonttools==4.42.1 fqdn==1.5.1 graphviz==0.20.1 greenlet==2.0.2 -identify==2.5.27 +identify==2.5.29 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 -importlib-resources==6.0.1 +importlib-resources==6.1.0 iniconfig==2.0.0 ipykernel==6.25.2 ipympl==0.9.3 ipython==8.12.2 ipython-genutils==0.2.0 -ipywidgets==8.1.0 +ipywidgets==8.1.1 isoduration==20.11.0 jedi==0.19.0 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.0 +jsonschema==4.19.1 jsonschema-specifications==2023.7.1 jupyter==1.0.0 jupyter-cache==0.6.1 @@ -75,19 +75,19 @@ jupyter-server-fileid==0.9.0 jupyter-server-terminals==0.4.4 jupyter-server-ydoc==0.8.0 jupyter-ydoc==0.2.5 -jupyterlab==3.6.5 +jupyterlab==3.6.6 jupyterlab-code-formatter==2.2.1 -jupyterlab-lsp==4.2.0 +jupyterlab-lsp==4.3.0 jupyterlab-myst==2.0.2 jupyterlab-pygments==0.2.2 -jupyterlab-server==2.24.0 -jupyterlab-widgets==3.0.8 +jupyterlab-server==2.25.0 +jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 markdown-it-py==2.2.0 markupsafe==2.1.3 -matplotlib==3.7.2 +matplotlib==3.7.3 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 mdurl==0.1.2 @@ -101,9 +101,9 @@ nbclient==0.6.8 nbconvert==7.8.0 nbformat==5.9.2 nbmake==1.4.3 -nest-asyncio==1.5.7 +nest-asyncio==1.5.8 nodeenv==1.8.0 -notebook==6.5.5 +notebook==6.5.6 notebook-shim==0.2.3 numpy==1.24.4 overrides==7.4.0 @@ -113,7 +113,7 @@ parso==0.8.3 pathspec==0.11.2 pexpect==4.8.0 pickleshare==0.7.5 -pillow==10.0.0 +pillow==10.0.1 pkgutil-resolve-name==1.3.10 platformdirs==3.10.0 pluggy==1.3.0 @@ -126,14 +126,14 @@ pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.13.3 +pydata-sphinx-theme==0.14.1 pygments==2.16.1 -pyparsing==3.0.9 +pyparsing==3.1.1 pyproject-api==1.6.1 pytest==7.4.2 python-dateutil==2.8.2 python-json-logger==2.0.7 -python-lsp-jsonrpc==1.1.0 +python-lsp-jsonrpc==1.1.2 python-lsp-server==1.8.0 pytoolconfig==1.2.5 pytz==2023.3.post1 @@ -143,12 +143,11 @@ qtconsole==5.4.4 qtpy==2.4.0 referencing==0.30.2 requests==2.31.0 -requests-file==1.5.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.9.0 -rpds-py==0.10.2 -ruff==0.0.287 +rpds-py==0.10.3 +ruff==0.0.291 send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -160,10 +159,8 @@ sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 -sphinx-data-viewer==0.1.2 sphinx-design==0.5.0 -sphinx-issues==3.0.1 -sphinx-needs==1.3.0 +sphinx-remove-toctrees==0.0.3 sphinx-thebe==0.2.1 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.4 @@ -172,10 +169,9 @@ sphinxcontrib-devhelp==1.0.2 sphinxcontrib-hep-pdgref==0.1.4 sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-plantuml==0.26 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -sqlalchemy==2.0.20 +sqlalchemy==2.0.21 stack-data==0.6.2 tabulate==0.9.0 terminado==0.17.1 @@ -183,21 +179,21 @@ tinycss2==1.2.1 tomli==2.0.1 tornado==6.3.3 tox==4.11.3 -traitlets==5.9.0 -typing-extensions==4.7.1 +traitlets==5.10.1 +typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.4 +urllib3==2.0.5 virtualenv==20.24.5 wcwidth==0.2.6 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.2 +websocket-client==1.6.3 wheel==0.41.2 -widgetsnbextension==4.0.8 +widgetsnbextension==4.0.9 y-py==0.6.0 ypy-websocket==0.8.4 -zipp==3.16.2 +zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 64d23618..2c8a5bec 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -17,7 +17,7 @@ attrs==23.1.0 babel==2.12.1 backcall==0.2.0 beautifulsoup4==4.12.2 -black==23.9.0 +black==23.9.1 bleach==6.0.0 cachetools==5.3.1 certifi==2023.7.22 @@ -28,9 +28,9 @@ charset-normalizer==3.2.0 click==8.1.7 colorama==0.4.6 comm==0.1.4 -contourpy==1.1.0 +contourpy==1.1.1 cycler==0.11.0 -debugpy==1.7.0 +debugpy==1.8.0 decorator==5.1.1 defusedxml==0.7.1 distlib==0.3.7 @@ -40,28 +40,28 @@ entrypoints==0.4 exceptiongroup==1.1.3 executing==1.2.0 fastjsonschema==2.18.0 -filelock==3.12.3 +filelock==3.12.4 fonttools==4.42.1 fqdn==1.5.1 graphviz==0.20.1 greenlet==2.0.2 -identify==2.5.27 +identify==2.5.29 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 -importlib-resources==6.0.1 +importlib-resources==6.1.0 iniconfig==2.0.0 ipykernel==6.25.2 ipympl==0.9.3 ipython==8.15.0 ipython-genutils==0.2.0 -ipywidgets==8.1.0 +ipywidgets==8.1.1 isoduration==20.11.0 jedi==0.19.0 jinja2==3.1.2 json5==0.9.14 jsonpointer==2.4 -jsonschema==4.19.0 +jsonschema==4.19.1 jsonschema-specifications==2023.7.1 jupyter==1.0.0 jupyter-cache==0.6.1 @@ -75,19 +75,19 @@ jupyter-server-fileid==0.9.0 jupyter-server-terminals==0.4.4 jupyter-server-ydoc==0.8.0 jupyter-ydoc==0.2.5 -jupyterlab==3.6.5 +jupyterlab==3.6.6 jupyterlab-code-formatter==2.2.1 -jupyterlab-lsp==4.2.0 +jupyterlab-lsp==4.3.0 jupyterlab-myst==2.0.2 jupyterlab-pygments==0.2.2 -jupyterlab-server==2.24.0 -jupyterlab-widgets==3.0.8 +jupyterlab-server==2.25.0 +jupyterlab-widgets==3.0.9 kiwisolver==1.4.5 latexcodec==2.0.1 livereload==2.6.3 markdown-it-py==2.2.0 markupsafe==2.1.3 -matplotlib==3.7.2 +matplotlib==3.8.0 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.5 mdurl==0.1.2 @@ -101,11 +101,11 @@ nbclient==0.6.8 nbconvert==7.8.0 nbformat==5.9.2 nbmake==1.4.3 -nest-asyncio==1.5.7 +nest-asyncio==1.5.8 nodeenv==1.8.0 -notebook==6.5.5 +notebook==6.5.6 notebook-shim==0.2.3 -numpy==1.25.2 +numpy==1.26.0 overrides==7.4.0 packaging==23.1 pandocfilters==1.5.0 @@ -113,7 +113,7 @@ parso==0.8.3 pathspec==0.11.2 pexpect==4.8.0 pickleshare==0.7.5 -pillow==10.0.0 +pillow==10.0.1 platformdirs==3.10.0 pluggy==1.3.0 pre-commit==3.4.0 @@ -125,14 +125,14 @@ pure-eval==0.2.2 pybtex==0.24.0 pybtex-docutils==1.0.3 pycparser==2.21 -pydata-sphinx-theme==0.13.3 +pydata-sphinx-theme==0.14.1 pygments==2.16.1 -pyparsing==3.0.9 +pyparsing==3.1.1 pyproject-api==1.6.1 pytest==7.4.2 python-dateutil==2.8.2 python-json-logger==2.0.7 -python-lsp-jsonrpc==1.1.0 +python-lsp-jsonrpc==1.1.2 python-lsp-server==1.8.0 pytoolconfig==1.2.5 pyyaml==6.0.1 @@ -141,12 +141,11 @@ qtconsole==5.4.4 qtpy==2.4.0 referencing==0.30.2 requests==2.31.0 -requests-file==1.5.1 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rope==1.9.0 -rpds-py==0.10.2 -ruff==0.0.287 +rpds-py==0.10.3 +ruff==0.0.291 send2trash==1.8.2 six==1.16.0 sniffio==1.3.0 @@ -158,10 +157,8 @@ sphinx-book-theme==1.0.1 sphinx-codeautolink==0.15.0 sphinx-comments==0.0.3 sphinx-copybutton==0.5.2 -sphinx-data-viewer==0.1.2 sphinx-design==0.5.0 -sphinx-issues==3.0.1 -sphinx-needs==1.3.0 +sphinx-remove-toctrees==0.0.3 sphinx-thebe==0.2.1 sphinx-togglebutton==0.3.2 sphinxcontrib-applehelp==1.0.7 @@ -170,10 +167,9 @@ sphinxcontrib-devhelp==1.0.5 sphinxcontrib-hep-pdgref==0.1.4 sphinxcontrib-htmlhelp==2.0.4 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-plantuml==0.26 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 -sqlalchemy==2.0.20 +sqlalchemy==2.0.21 stack-data==0.6.2 tabulate==0.9.0 terminado==0.17.1 @@ -181,21 +177,21 @@ tinycss2==1.2.1 tomli==2.0.1 tornado==6.3.3 tox==4.11.3 -traitlets==5.9.0 -typing-extensions==4.7.1 +traitlets==5.10.1 +typing-extensions==4.8.0 ujson==5.8.0 uri-template==1.3.0 -urllib3==2.0.4 +urllib3==2.0.5 virtualenv==20.24.5 wcwidth==0.2.6 webcolors==1.13 webencodings==0.5.1 -websocket-client==1.6.2 +websocket-client==1.6.3 wheel==0.41.2 -widgetsnbextension==4.0.8 +widgetsnbextension==4.0.9 y-py==0.6.0 ypy-websocket==0.8.4 -zipp==3.16.2 +zipp==3.17.0 # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/.cspell.json b/.cspell.json index 578c4f67..07895813 100644 --- a/.cspell.json +++ b/.cspell.json @@ -235,6 +235,7 @@ "maxdepth", "maxsize", "meshgrid", + "mmikhasenko", "mname", "msigma", "multiline", diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dee34d48..025eeb76 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,7 +64,7 @@ repos: - --fix - repo: https://github.com/psf/black - rev: 23.9.0 + rev: 23.9.1 hooks: - id: black @@ -142,19 +142,19 @@ repos: - id: prettier - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.326 + rev: v1.1.328 hooks: - id: pyright - repo: https://github.com/asottile/pyupgrade - rev: v3.10.1 + rev: v3.13.0 hooks: - id: pyupgrade args: - --py37-plus - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.287 + rev: v0.0.291 hooks: - id: ruff args: diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..2047cf6a --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +report-inventory.md diff --git a/docs/_list_technical_reports.py b/docs/_list_technical_reports.py new file mode 100644 index 00000000..0d836813 --- /dev/null +++ b/docs/_list_technical_reports.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +import os +import re +from os.path import dirname +from textwrap import dedent +from typing import TYPE_CHECKING + +import nbformat + +if TYPE_CHECKING: + from nbformat import NotebookNode + + +def main() -> int: + table = _create_tr_table() + this_dir = dirname(__file__) + output_path = f"{this_dir}/report-inventory.md" + with open(output_path, "w") as f: + f.write(table) + return 0 + + +def _create_tr_table() -> str: + notebook_paths = _get_technical_report_paths() + src = dedent(""" + | | TR | Title | Details | Tags | Status | + |:--:|:--:|:------|:--------|:-----|:-------| + """).strip() + for notebook in notebook_paths: + card_info = _get_card_info(notebook) + tr = card_info["tr"] + title = card_info["title"] + details = re.sub( + r"\[([^\]]+)\]\((\./)?(\d\d\d)\.ipynb\)", + r"[\1](report/\3.ipynb)", + card_info.get("details", ""), + ) + tags = " ".join(_to_badge(tag) for tag in sorted(card_info["tags"])) + status = re.sub( + r"\[([^\]]+)\-([^\]]+)\]\(([^\)]+)\)", + r"[\1‑\2](\3)", + card_info.get("footer", "\n").splitlines()[0], + ) + src += ( + f"\n| | [TR‑{tr}](report/{tr}.ipynb) | {title} | {details} | {tags} |" + f" {status} |" + ) + return src + + +def _to_badge(tag: str) -> str: + return f"{{bdg-info-line}}`{tag}`" + + +def _get_technical_report_paths() -> list[str]: + this_dir = dirname(__file__) + report_dir = f"{this_dir}/report" + return [ + f"{report_dir}/{file}" + for file in sorted(os.listdir(report_dir)) + if file.endswith(".ipynb") + ] + + +def _get_card_info(path: str) -> dict[str, str]: + notebook = _open_notebook(path) + for cell in notebook["cells"]: + if cell["cell_type"] != "markdown": + continue + src: list[str] = cell["source"].splitlines() + src = [s for s in src if s.strip() if not s.strip().startswith(" ## Decision drivers diff --git a/docs/conf.py b/docs/conf.py index 1e6c6920..e0971bbd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,6 +32,12 @@ words, ) +this_dir = os.path.dirname(__file__) +sys.path.insert(0, os.path.abspath(this_dir)) +import _list_technical_reports + +_list_technical_reports.main() + # -- Project information ----------------------------------------------------- project = "ComPWA Organization" REPO_NAME = "compwa-org" @@ -92,13 +98,11 @@ def fetch_logo(url: str, output_path: str) -> None: "sphinx_comments", "sphinx_copybutton", "sphinx_design", - "sphinx_issues", - "sphinx_needs", + "sphinx_remove_toctrees", "sphinx_thebe", "sphinx_togglebutton", "sphinxcontrib.bibtex", "sphinxcontrib.hep.pdgref", - "sphinxcontrib.plantuml", ] exclude_patterns = [ "**.ipynb_checkpoints", @@ -130,7 +134,6 @@ def fetch_logo(url: str, output_path: str) -> None: """ graphviz_output_format = "svg" html_copy_source = True # needed for download notebook button -html_css_files = ["custom.css"] html_favicon = "_static/favicon.ico" html_last_updated_fmt = "%-d %B %Y" html_show_copyright = False @@ -172,6 +175,10 @@ def fetch_logo(url: str, output_path: str) -> None: } html_title = "Common Partial Wave Analysis Project" pygments_style = "sphinx" +remove_from_toctrees = [ + "adr/*", + "report/*", +] todo_include_todos = False viewcode_follow_imported_members = True @@ -189,6 +196,7 @@ def fetch_logo(url: str, output_path: str) -> None: "8.0.3": "8.0.5", "8.0.4": "8.0.5", "8.0.6": "8.0.5", + "8.1.1": "8.1.2", }, "matplotlib": {"3.5.1": "3.5.0"}, } @@ -377,65 +385,6 @@ def print_once(message: str) -> None: }, } -# Settings for sphinx-issues -issues_github_path = "ComPWA/compwa-org" - -# Settings for sphinxcontrib.needs -needs_css = "blank.css" -needs_layouts = { - "technical_report": { - "grid": "simple", - "layout": { - "head": ['<> **<>**'], - "meta": [ - '**status**: <>', - '**tags**: <>', - '<>', - ], - }, - } -} -needs_default_layout = "technical_report" -needs_id_regex = "^TR-[0-9][0-9][0-9]$" -needs_id_required = True -needs_services = { - "github-commits": { - "url": "https://api.github.com/", - "need_type": "spec", - "id_prefix": "GH_COMMIT_", - }, - "github-issues": { - "url": "https://api.github.com/", - "need_type": "spec", - "id_prefix": "GH_ISSUE_", - }, - "github-prs": { - "url": "https://api.github.com/", - "need_type": "spec", - "id_prefix": "GH_PR_", - }, -} - -ON_RTD = os.environ.get("READTHEDOCS") is not None -PLANTUML_PATH = os.path.join(os.path.dirname(__file__), "utils", "plantuml.jar") -if not os.path.exists(PLANTUML_PATH): - print("\033[93;1mDowloading plantuml\033[0m") - online_content = requests.get( - "https://sourceforge.net/projects/plantuml/files/latest/download", - allow_redirects=True, - ) - os.makedirs(os.path.dirname(PLANTUML_PATH), exist_ok=True) - with open(PLANTUML_PATH, "wb") as stream: - stream.write(online_content.content) - -if ON_RTD: - # https://github.com/useblocks/sphinxcontrib-needs/blob/d40897e/docs/conf.py#L254-L265 - plantuml = f"java -Djava.awt.headless=true -jar {PLANTUML_PATH}" -else: - plantuml = f"java -jar {PLANTUML_PATH}" -plantuml_output_format = "svg_img" -needs_table_style = "datatables" - # Settings for Thebe cell output thebe_config = { "repository_url": html_theme_options["repository_url"], diff --git a/docs/report/000.ipynb b/docs/report/000.ipynb index d040b668..69e38c1d 100644 --- a/docs/report/000.ipynb +++ b/docs/report/000.ipynb @@ -33,21 +33,30 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "lambdification", + "sympy" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Square root over arrays with negative values\n", + "TR-000\n", + "^^^\n", + "This notebook investigates how to write a square root function in {mod}`sympy` that computes the positive square root for negative values. The lambdified version of this 'complex square root' should have the same behavior for each computational backend.\n", + "+++\n", + "✅ [tensorwaves#284](https://github.com/ComPWA/tensorwaves/pull/284)\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Square root over arrays with negative values\n", - ":id: TR-000\n", - ":status: Implemented\n", - ":tags: lambdification;sympy\n", - "\n", - "This report has been implemented in {pr}`ComPWA/tensorwaves#284`.\n", - "\n", - "```\n", - "````\n", - "\n", "# Complex square roots" ] }, @@ -60,13 +69,6 @@ "" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This notebook investigates how to write a square root function in {mod}`sympy` that computes the positive square root for negative values. The lambdified version of this 'complex square root' should have the same behavior for each computational backend." - ] - }, { "cell_type": "code", "execution_count": null, @@ -940,7 +942,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" }, "orphan": true }, diff --git a/docs/report/001.ipynb b/docs/report/001.ipynb index 251af6e0..0c778791 100644 --- a/docs/report/001.ipynb +++ b/docs/report/001.ipynb @@ -36,23 +36,27 @@ { "cell_type": "markdown", "metadata": { - "tags": [] + "tags": [ + "lambdification", + "sympy" + ] }, "source": [ - "````{margin}\n", - "```{spec} Custom lambdification\n", - ":id: TR-001\n", - ":status: Implemented\n", - ":tags: lambdification;sympy\n", - "\n", - "This report has been implemented in {pr}`ComPWA/ampform#72` and {pr}`ComPWA/tensorwaves#284`.\n", - "\n", - ":::{seealso}\n", - "{doc}`SymPy's tutorial page on the printing modules `\n", + "::::{margin}\n", + ":::{card} Custom lambdification\n", + "TR-001\n", + "^^^\n", + "See also {doc}`SymPy's tutorial page on the printing modules `.\n", + "+++\n", + "✅ [ampform#72](https://github.com/ComPWA/ampform/issues/72), [tensorwaves#284](https://github.com/ComPWA/tensorwaves/issues/284)\n", ":::\n", - "```\n", - "````\n", - "\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Custom lambdification\n", "" ] @@ -106,7 +110,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "As noted in {need}`TR-000`, it's hard to lambdify a {func}`sympy.sqrt ` to {doc}`JAX `. One possible way out is to define a custom class that derives from {class}`sympy.Expr ` and {doc}`overwrite its printer methods `." + "As noted in [TR-000](000.ipynb), it's hard to lambdify a {func}`sympy.sqrt ` to {doc}`JAX `. One possible way out is to define a custom class that derives from {class}`sympy.Expr ` and {doc}`overwrite its printer methods `." ] }, { @@ -722,7 +726,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" }, "orphan": true }, diff --git a/docs/report/002.ipynb b/docs/report/002.ipynb index e13e90d2..077e16e0 100644 --- a/docs/report/002.ipynb +++ b/docs/report/002.ipynb @@ -33,20 +33,30 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "lambdification", + "sympy" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Faster lambdification by splitting expressions\n", + "TR-002\n", + "^^^\n", + "This notebook investigates how to speed up {func}`sympy.lambdify ` by splitting up the expression tree of a complicated expression into components, lambdifying those, and then combining them back again.\n", + "+++\n", + "✅ [tensorwaves#281](https://github.com/ComPWA/tensorwaves/issues/281)\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Faster lambdification by splitting expressions\n", - ":id: TR-002\n", - ":status: Implemented\n", - ":tags: lambdification;sympy\n", - "\n", - "This report has been implemented in {pr}`ComPWA/tensorwaves#281`.\n", - "```\n", - "````\n", - "\n", "# Speed up lambdifying" ] }, @@ -73,13 +83,6 @@ "%pip install -q ampform==0.9.1 numpy==1.19.5 pandas==1.2.4 pandas==1.2.4 qrules==0.8.2 sympy==1.8 tensorwaves[jax]==0.2.9 git+https://github.com/zfit/phasespace@7131fbd" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This notebook investigates how to speed up {func}`sympy.lambdify ` by splitting up the expression tree of a complicated expression into components, lambdifying those, and then combining them back again." - ] - }, { "cell_type": "code", "execution_count": null, @@ -1976,7 +1979,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/003.ipynb b/docs/report/003.ipynb index c854ef92..4330f266 100644 --- a/docs/report/003.ipynb +++ b/docs/report/003.ipynb @@ -33,20 +33,30 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "physics", + "sympy" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Chew-Mandelstam S-wave and dispersion integrals\n", + "TR-003\n", + "^^^\n", + "Section {ref}`report/003:S-wave` has been implemented in [ampform#265](https://github.com/ComPWA/ampform/issues/265).\n", + "+++\n", + "_To be implemented_\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Chew-Mandelstam S-wave and dispersion integrals\n", - ":id: TR-003\n", - ":status: To be implemented\n", - ":tags: physics;sympy\n", - "\n", - "Section {ref}`report/003:S-wave` has been implemented in {pr}`ComPWA/ampform#265`.\n", - "```\n", - "````\n", - "\n", "# Chew-Mandelstam" ] }, @@ -609,7 +619,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "As discussed in {need}`TR-016`, {func}`scipy.integrate.quad` cannot integrate over complex-valued functions, while [`quadpy`](https://github.com/sigma-py/quadpy) runs into trouble with vectorized input to the integrand. The following function, from {ref}`report/016:Vectorized input` offers a quick solution:" + "As discussed in [TR-016](016.ipynb), {func}`scipy.integrate.quad` cannot integrate over complex-valued functions, while [`quadpy`](https://github.com/sigma-py/quadpy) runs into trouble with vectorized input to the integrand. The following function, from {ref}`report/016:Vectorized input` offers a quick solution:" ] }, { @@ -1117,7 +1127,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/004.ipynb b/docs/report/004.ipynb index 7db544a6..b9cf37f9 100644 --- a/docs/report/004.ipynb +++ b/docs/report/004.ipynb @@ -33,18 +33,28 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "physics" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Investigation of analyticity\n", + "TR-004\n", + "^^^\n", + "+++\n", + "WIP\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Investigation of analyticity\n", - ":id: TR-004\n", - ":status: WIP\n", - ":tags: physics\n", - "```\n", - "````\n", - "\n", "# Analyticity" ] }, @@ -565,7 +575,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/005.ipynb b/docs/report/005.ipynb index 078f33bd..4cd5f46d 100644 --- a/docs/report/005.ipynb +++ b/docs/report/005.ipynb @@ -33,20 +33,29 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "physics" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Symbolic K-matrix expressions\n", + "TR-005\n", + "^^^\n", + "Implementation of this report is tracked through [ampform#67](https://github.com/ComPWA/ampform/issues/67).\n", + "+++\n", + "To be implemented\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Symbolic K-matrix expressions\n", - ":id: TR-005\n", - ":status: To be implemented\n", - ":tags: physics\n", - "\n", - "Implementation of this report is tracked through {issue}`ComPWA/ampform#67`.\n", - "```\n", - "````\n", - "\n", "# K-matrix" ] }, @@ -65,7 +74,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This report investigates how to implement $K$-matrix dynamics with {doc}`SymPy `. We here describe only the version that is **not Lorentz-invariant**, because it is simplest and allows us to check whether the case $n_R=1, n=1$ (single resonance, single channel) reduces to a Breit-Wigner function. We followed the physics as described by {pdg-review}`Resonances` and {cite}`chungPartialWaveAnalysis1995,petersPartialWaveAnalysis2004,meyerMatrixTutorial2008`. For the Lorentz-invariant version, see {need}`TR-009`.\n", + "This report investigates how to implement $K$-matrix dynamics with {doc}`SymPy `. We here describe only the version that is **not Lorentz-invariant**, because it is simplest and allows us to check whether the case $n_R=1, n=1$ (single resonance, single channel) reduces to a Breit-Wigner function. We followed the physics as described by {pdg-review}`Resonances` and {cite}`chungPartialWaveAnalysis1995,petersPartialWaveAnalysis2004,meyerMatrixTutorial2008`. For the Lorentz-invariant version, see [TR-009](009.ipynb).\n", "\n", "A brief overview of the origin of the $\\boldsymbol{K}$-matrix is given first. This overview follows {cite}`chungPartialWaveAnalysis1995`, but skips over quite a few details, as this is only an attempt to provide some context of what is going on." ] @@ -292,7 +301,7 @@ "source": [ "The challenge is to generate a correct parametrization for an arbitrary **number of coupled channels $n$** and an arbitrary **number of resonances $n_R$**. Our approach is to construct an $n \\times n$ {obj}`sympy.Matrix ` with {class}`~sympy.core.symbol.Symbol`s as its elements. We then use substitute these {class}`~sympy.core.symbol.Symbol`s with certain parametrizations using {meth}`~sympy.core.basic.Basic.subs`. In order to generate symbols for $n_R$ resonances and $n$ channels, we use {doc}`indexed symbols `.\n", "\n", - "This approach is less elegant and (theoretically) slower than using {class}`~sympy.matrices.expressions.MatrixSymbol`s. That approach is explored in {need}`TR-007`." + "This approach is less elegant and (theoretically) slower than using {class}`~sympy.matrices.expressions.MatrixSymbol`s. That approach is explored in [TR-007](007.ipynb)." ] }, { @@ -780,7 +789,7 @@ "\n", ":::{margin}\n", "\n", - "{need}`TR-008` explains the need for {func}`symplot.substitute_indexed_symbols`.\n", + "[TR-008](008.ipynb) explains the need for {func}`symplot.substitute_indexed_symbols`.\n", "\n", ":::" ] @@ -1051,7 +1060,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/006.ipynb b/docs/report/006.ipynb index c7915992..086104f4 100644 --- a/docs/report/006.ipynb +++ b/docs/report/006.ipynb @@ -36,17 +36,26 @@ { "cell_type": "markdown", "metadata": { - "tags": [] + "tags": [ + "tips" + ] }, "source": [ - "````{margin}\n", - "```{spec} Interactive 3D plots\n", - ":id: TR-006\n", - ":status: Implemented\n", - ":tags: tips\n", - "```\n", - "````\n", - "\n", + "::::{margin}\n", + ":::{card} Interactive 3D plots\n", + "TR-006\n", + "^^^\n", + "This report illustrates how to interact with [`matplotlib`](https://matplotlib.org) 3D plots through [Matplotlib sliders](https://matplotlib.org/stable/api/widgets_api.html) and [ipywidgets](https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html).\n", + "+++\n", + "✅ [ampform#38](https://github.com/ComPWA/ampform/pull/38)\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Interactive 3D plots" ] }, @@ -115,7 +124,7 @@ "tags": [] }, "source": [ - "This report illustrates how to interact with [`matplotlib`](https://matplotlib.org) 3D plots through [Matplotlib sliders](https://matplotlib.org/stable/api/widgets_api.html) and [ipywidgets](https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html). This might be implemented later on in {mod}`symplot` and/or [`mpl_interactions`](https://mpl-interactions.readthedocs.io) (see {issue}`ianhi/mpl-interactions#89`).\n", + "This report illustrates how to interact with [`matplotlib`](https://matplotlib.org) 3D plots through [Matplotlib sliders](https://matplotlib.org/stable/api/widgets_api.html) and [ipywidgets](https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html). This might be implemented later on in {mod}`symplot` and/or [`mpl_interactions`](https://mpl-interactions.readthedocs.io) (see [ianhi/mpl-interactions#89](https://github.com/ianhi/mpl-interactions/issues/89)).\n", "\n", "In this example, we create a surface plot (see {meth}`~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface`) for the following function." ] @@ -466,7 +475,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/007.ipynb b/docs/report/007.ipynb index e230f658..ef21c10b 100644 --- a/docs/report/007.ipynb +++ b/docs/report/007.ipynb @@ -35,24 +35,28 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "tags": [ + "sympy" + ] + }, "source": [ - "````{margin}\n", - "```{spec} MatrixSymbols\n", - ":id: TR-007\n", - ":status: WIP\n", - ":tags: sympy\n", - "```\n", - "````\n", - "\n", - "# `MatrixSymbol`s" + "::::{margin}\n", + ":::{card} `MatrixSymbols`\n", + "TR-007\n", + "^^^\n", + "This report is a sequel to [TR-005](005.ipynb). In that report, the $\\boldsymbol{K}$ was constructed with a {obj}`sympy.Matrix `, but it might be more elegant to work with {class}`~sympy.matrices.expressions.MatrixSymbol`s.\n", + "+++\n", + "WIP\n", + ":::\n", + "::::" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "This report is a sequel to {need}`TR-005`. In that report, the $\\boldsymbol{K}$ was constructed with a {obj}`sympy.Matrix `, but it might be more elegant to work with {class}`~sympy.matrices.expressions.MatrixSymbol`s." + "# `MatrixSymbol`s" ] }, { @@ -211,7 +215,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/008.ipynb b/docs/report/008.ipynb index add4a796..a33517d8 100644 --- a/docs/report/008.ipynb +++ b/docs/report/008.ipynb @@ -36,19 +36,26 @@ { "cell_type": "markdown", "metadata": { - "tags": [] + "tags": [ + "sympy" + ] }, "source": [ - "````{margin}\n", - "```{spec} Indexed free symbols\n", - ":id: TR-008\n", - ":status: Implemented\n", - ":tags: sympy\n", - "\n", - "This report has been implemented in {pr}`ComPWA/ampform#111`. Additionally, {pr}`ComPWA/tensorwaves#427` makes it possible to lambdify {class}`sympy.Expr ` with {class}`~sympy.tensor.indexed.Indexed` symbols directly.\n", - "```\n", - "````\n", - "\n", + "::::{margin}\n", + ":::{card} Indexed free symbols\n", + "TR-008\n", + "^^^\n", + "This report has been implemented in [ampform#111](https://github.com/ComPWA/ampform/issues/111). Additionally, [tensorwaves#427](https://github.com/ComPWA/tensorwaves/issues/427) makes it possible to lambdify {class}`sympy.Expr ` with {class}`~sympy.tensor.indexed.Indexed` symbols directly.\n", + "+++\n", + "✅ [ampform#111](https://github.com/ComPWA/ampform/issues/111)\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# `Indexed` free symbols" ] }, @@ -72,7 +79,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In {need}`TR-005`, we made use of {doc}`indexed symbols ` to create a $\\boldsymbol{K}$-matrix. The problem with that approach is that {class}`~sympy.tensor.indexed.IndexedBase` and their resulting {class}`~sympy.tensor.indexed.Indexed` instances when taking indices behave strangely in an expression tree.\n", + "In [TR-005](005.ipynb), we made use of {doc}`indexed symbols ` to create a $\\boldsymbol{K}$-matrix. The problem with that approach is that {class}`~sympy.tensor.indexed.IndexedBase` and their resulting {class}`~sympy.tensor.indexed.Indexed` instances when taking indices behave strangely in an expression tree.\n", "\n", "The following {class}`~sympy.core.expr.Expr` uses a {class}`~sympy.core.symbol.Symbol` and a elements in {class}`~sympy.tensor.indexed.IndexedBase`s (an {class}`~sympy.tensor.indexed.Indexed` instance):" ] @@ -288,7 +295,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/009.ipynb b/docs/report/009.ipynb index f881bca2..2526cd9d 100644 --- a/docs/report/009.ipynb +++ b/docs/report/009.ipynb @@ -33,21 +33,30 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "physics", + "sympy" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Symbolic expressions for Lorentz-invariant K-matrix\n", + "TR-009\n", + "^^^\n", + "This report is a sequel to [TR-005](005.ipynb).\n", + "+++\n", + "✅ [ampform#120](https://github.com/ComPWA/ampform/issues/120)\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Symbolic expressions for Lorentz-invariant K-matrix\n", - ":id: TR-009\n", - ":links: TR-005\n", - ":status: To be implemented\n", - ":tags: physics;sympy\n", - "\n", - "This report is a sequel to {need}`TR-005`. It has been implemented in {pr}`ComPWA/ampform#120`.\n", - "```\n", - "````\n", - "\n", "# Lorentz-invariant K-matrix" ] }, @@ -113,7 +122,7 @@ "\\boldsymbol{K} = \\sqrt{\\boldsymbol{\\rho^\\dagger}} \\; \\boldsymbol{\\hat{K}} \\sqrt{\\boldsymbol{\\rho}}\n", "$$ (covariant-K-matrix)\n", "\n", - "with (compare Eq. {eq}`T-in-terms-of-K` in {need}`TR-005`):\n", + "with (compare Eq. {eq}`T-in-terms-of-K` in [TR-005](005.ipynb)):\n", "\n", "$$\n", "\\boldsymbol{\\hat{T}} = \\boldsymbol{\\hat{K}}(\\boldsymbol{I} - i\\boldsymbol{\\rho}\\boldsymbol{\\hat{K}})^{-1}\n", @@ -125,9 +134,9 @@ "K_{ij} = \\sum_R \\frac{g_{R,i}(m)g_{R,j}(m)}{\\left(m_R^2-m^2\\right)\\sqrt{\\rho_i\\rho_j}}\n", "$$ (covariant parametrization)\n", "\n", - "Compare this with Eq. {eq}`K-matrix-parametrization` in {need}`TR-005`.\n", + "Compare this with Eq. {eq}`K-matrix-parametrization` in [TR-005](005.ipynb).\n", "\n", - "In addition, one often uses an \"energy dependent\" [`coupled_width()`](https://ampform.readthedocs.io/en/0.10.5/api/ampform.dynamics.html#ampform.dynamics.coupled_width) $\\Gamma_R(m)$ instead of a fixed width $\\Gamma_R$ as done in {need}`TR-005`." + "In addition, one often uses an \"energy dependent\" [`coupled_width()`](https://ampform.readthedocs.io/en/0.10.5/api/ampform.dynamics.html#ampform.dynamics.coupled_width) $\\Gamma_R(m)$ instead of a fixed width $\\Gamma_R$ as done in [TR-005](005.ipynb)." ] }, { @@ -405,7 +414,7 @@ "source": [ ":::{note}\n", "\n", - "In `PhaseSpaceFactor`, we used {class}`~ampform.dynamics.phasespace.PhaseSpaceFactorComplex` instead of {class}`~ampform.dynamics.phasespace.PhaseSpaceFactor`, meaning that we choose the _positive_ square root when values under the square root are negative. The only reason for doing this is, so that there is output in the figure under {ref}`report/009:Visualization`. The choice for which square root to choose has to do with analyticity (see {need}`TR-004`) and choosing which Riemann sheet to connect to. This issue is ignored in this report.\n", + "In `PhaseSpaceFactor`, we used {class}`~ampform.dynamics.phasespace.PhaseSpaceFactorComplex` instead of {class}`~ampform.dynamics.phasespace.PhaseSpaceFactor`, meaning that we choose the _positive_ square root when values under the square root are negative. The only reason for doing this is, so that there is output in the figure under {ref}`report/009:Visualization`. The choice for which square root to choose has to do with analyticity (see [TR-004](004.ipynb)) and choosing which Riemann sheet to connect to. This issue is ignored in this report.\n", "\n", ":::" ] @@ -670,7 +679,7 @@ "source": [ ":::{margin}\n", "\n", - "{need}`TR-008` explains the need for {func}`symplot.substitute_indexed_symbols`.\n", + "[TR-008](008.ipynb) explains the need for {func}`symplot.substitute_indexed_symbols`.\n", "\n", ":::" ] @@ -1025,7 +1034,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/010.ipynb b/docs/report/010.ipynb index 17e1ed9f..c2c211bd 100644 --- a/docs/report/010.ipynb +++ b/docs/report/010.ipynb @@ -36,20 +36,27 @@ { "cell_type": "markdown", "metadata": { - "tags": [] + "tags": [ + "physics", + "sympy" + ] }, "source": [ - "````{margin}\n", - "```{spec} P-vector\n", - ":id: TR-010\n", - ":links: TR-005; TR-009\n", - ":status: To be implemented\n", - ":tags: physics;sympy\n", - "\n", - "This report is a sequel to {need}`TR-005` and {need}`TR-009`. Has been implemented in {pr}`ComPWA/ampform#131`.\n", - "```\n", - "````\n", - "\n", + "::::{margin}\n", + ":::{card} P-vector\n", + "TR-010\n", + "^^^\n", + "This report is a sequel to [TR-005](005.ipynb) and [TR-009](009.ipynb).\n", + "+++\n", + "✅ [ampform#131](https://github.com/ComPWA/ampform/issues/131)\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# P-vector" ] }, @@ -145,7 +152,7 @@ ] }, "source": [ - "As described in {need}`TR-005`, the $\\boldsymbol{K}$-matrix describes **scattering processes** of the type $cd \\to ab$. The $P$-vector approach is one of two generalizations for **production processes** of the type $c \\to ab$. For more details on this approach, {cite}`chungPartialWaveAnalysis1995` refers to {cite}`aitchisonMatrixFormalismOverlapping1972`.\n", + "As described in [TR-005](005.ipynb), the $\\boldsymbol{K}$-matrix describes **scattering processes** of the type $cd \\to ab$. The $P$-vector approach is one of two generalizations for **production processes** of the type $c \\to ab$. For more details on this approach, {cite}`chungPartialWaveAnalysis1995` refers to {cite}`aitchisonMatrixFormalismOverlapping1972`.\n", "\n", "If we take the production vector $P$ to be:\n", "\n", @@ -175,7 +182,7 @@ "$$ (K-hat in terms of K)\n", "\n", "\n", - "Just like with the residue functions in {need}`TR-005` and {need}`TR-009`, $\\beta$ is often expressed in terms of resonance mass and 'width':\n", + "Just like with the residue functions in [TR-005](005.ipynb) and [TR-009](009.ipynb), $\\beta$ is often expressed in terms of resonance mass and 'width':\n", "\n", "$$\n", "\\beta^0_R = \\beta_R\\sqrt{m_R\\Gamma^0_R}\n", @@ -765,7 +772,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/011.ipynb b/docs/report/011.ipynb index db613d15..c8b67b5d 100644 --- a/docs/report/011.ipynb +++ b/docs/report/011.ipynb @@ -36,19 +36,27 @@ { "cell_type": "markdown", "metadata": { - "tags": [] + "tags": [ + "physics", + "sympy" + ] }, "source": [ - "````{margin}\n", - "```{spec} Helicity angles as symbolic expressions\n", - ":id: TR-011\n", - ":status: Implemented\n", - ":tags: physics;sympy\n", - "\n", - "This report has been implemented in and {pr}`ComPWA/ampform#177` and {pr}`ComPWA/tensorwaves#345`. The report contains some bugs which were also addressed in these PRs.\n", - "```\n", - "````\n", - "\n", + "::::{margin}\n", + ":::{card} Helicity angles as symbolic expressions\n", + "TR-011\n", + "^^^\n", + "This report has been implemented in and [ampform#177](https://github.com/ComPWA/ampform/issues/177) and [tensorwaves#345](https://github.com/ComPWA/tensorwaves/issues/345). The report contains some bugs which were also addressed in these PRs.\n", + "+++\n", + "✅ [ampform#177](https://github.com/ComPWA/ampform/issues/177), [tensorwaves#345](https://github.com/ComPWA/tensorwaves/issues/345)\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Symbolic kinematics" ] }, @@ -115,7 +123,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "This report investigates issue {issue}`56`. The ideal solution would be to use only SymPy in the existing [`ampform.kinematics`](https://ampform.readthedocs.io/en/0.11.4/api/ampform.kinematics.html) module. This has two benefits:\n", + "This report investigates issue [compwa-org#56](https://github.com/ComPWA/compwa-org/issues/56). The ideal solution would be to use only SymPy in the existing [`ampform.kinematics`](https://ampform.readthedocs.io/en/0.11.4/api/ampform.kinematics.html) module. This has two benefits:\n", "\n", "1. It allows computing kinematic variables from four-momenta with different computational back-ends.\n", "2. Expressions for kinematic variable can be inspected through their LaTeX representation.\n", @@ -469,7 +477,7 @@ "source": [ ":::{note}\n", "\n", - "It could be that the above can be achieved with SymPy's `ArrayTensorProduct` and `ArrayContraction`. See for instance {issue}`sympy/sympy#22279`.\n", + "It could be that the above can be achieved with SymPy's `ArrayTensorProduct` and `ArrayContraction`. See for instance [sympy/sympy#22279](https://github.com/sympy/sympy/issues/22279).\n", "\n", ":::" ] @@ -898,7 +906,7 @@ "source": [ ":::{note}\n", "\n", - "The code above contains a lot of duplicate code, such as `len(-phi)`. This could possibly be improved with {class}`~sympy.codegen.ast.CodeBlock`. See {issue}`ComPWA/ampform#166`.\n", + "The code above contains a lot of duplicate code, such as `len(-phi)`. This could possibly be improved with {class}`~sympy.codegen.ast.CodeBlock`. See [ampform#166](https://github.com/ComPWA/ampform/issues/166).\n", "\n", ":::" ] @@ -1124,7 +1132,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Note that the four classes like `FourMomentumX` expect an `ArraySymbol` as input. This requires {pr}`sympy/sympy#22265`. This allows lambdifying the above expressions to valid NumPy code. Let's compare this with the existing implementation using the {ref}`report/011:Test sample`:" + "Note that the four classes like `FourMomentumX` expect an `ArraySymbol` as input. This requires [sympy/sympy#22265](https://github.com/sympy/sympy/issues/22265). This allows lambdifying the above expressions to valid NumPy code. Let's compare this with the existing implementation using the {ref}`report/011:Test sample`:" ] }, { @@ -1308,7 +1316,7 @@ "\\left|\\vec{p}\\right| = \\sqrt{p_x^2+p_y^2+p_z^2}\n", "$$\n", "\n", - "The complication here is that $\\left|\\vec{p}\\right|$ [needs to be computed with `np.sum`](https://github.com/ComPWA/ampform/blob/f381794/src/ampform/data.py#L157-L159) over a slice of the arrays. As of writing, it is not yet possible to write a SymPy expression that can lambdify to this or an equivalent with `np.einsum` ({issue}`sympy/sympy#22279`). So for now, an intermediate `ArrayAxisSum` class has to be written for this. See also [this remark](https://github.com/sympy/sympy/discussions/22269#discussioncomment-1473005)." + "The complication here is that $\\left|\\vec{p}\\right|$ [needs to be computed with `np.sum`](https://github.com/ComPWA/ampform/blob/f381794/src/ampform/data.py#L157-L159) over a slice of the arrays. As of writing, it is not yet possible to write a SymPy expression that can lambdify to this or an equivalent with `np.einsum` ([sympy/sympy#22279](https://github.com/sympy/sympy/issues/22279)). So for now, an intermediate `ArrayAxisSum` class has to be written for this. See also [this remark](https://github.com/sympy/sympy/discussions/22269#discussioncomment-1473005)." ] }, { @@ -4867,7 +4875,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/012.ipynb b/docs/report/012.ipynb index 7e75672d..c3d83605 100644 --- a/docs/report/012.ipynb +++ b/docs/report/012.ipynb @@ -35,16 +35,28 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "tags": [ + "lambdification", + "sympy" + ] + }, "source": [ - "````{margin}\n", - "```{spec} Extended DataSample performance\n", - ":id: TR-012\n", - ":status: Implemented\n", - ":tags: lambdification;sympy\n", - "```\n", - "````\n", + "::::{margin}\n", + ":::{card} Extended DataSample performance\n", + "TR-012\n", + "^^^\n", + "[ampform#198](https://github.com/ComPWA/ampform/issues/198) makes it easier to generate expressions for kinematic variables that are not contained in the [`HelicityModel.expression`](https://ampform.readthedocs.io/en/0.12.1/api/ampform.helicity.html#ampform.helicity.HelicityModel.expression). In TensorWaves, this results in a [`DataSample`](https://tensorwaves.readthedocs.io/en/0.4.x/api/tensorwaves.interface.html#tensorwaves.interface.DataSample) with more keys.\n", "\n", + "A question was raised whether this affects the duration of fits. This report shows that this is not the case (see {ref}`report/012:Conclusion`).\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Extended `DataSample` performance" ] }, @@ -72,15 +84,6 @@ "%pip install -q ampform==0.12.6 tensorwaves[jax,pwa]==0.4.8" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "{issue}`ComPWA/ampform#198` makes it easier to generate expressions for kinematic variables that are not contained in the [`HelicityModel.expression`](https://ampform.readthedocs.io/en/0.12.1/api/ampform.helicity.html#ampform.helicity.HelicityModel.expression). In TensorWaves, this results in a [`DataSample`](https://tensorwaves.readthedocs.io/en/0.4.x/api/tensorwaves.interface.html#tensorwaves.interface.DataSample) with more keys.\n", - "\n", - "A question was raised whether this affects the duration of fits. This report shows that this is not the case (see {ref}`report/012:Conclusion`)." - ] - }, { "cell_type": "code", "execution_count": null, @@ -392,7 +395,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/013.ipynb b/docs/report/013.ipynb index d9299077..221502bd 100644 --- a/docs/report/013.ipynb +++ b/docs/report/013.ipynb @@ -36,18 +36,28 @@ { "cell_type": "markdown", "metadata": { - "tags": [] + "tags": [ + "physics" + ] }, "source": [ - "````{margin}\n", - "```{spec} Spin alignment with data\n", - ":id: TR-013\n", - ":status: WIP\n", - ":tags: physics\n", - ":links: TR-014; TR-015\n", - "```\n", - "````\n", - "\n", + "::::{margin}\n", + ":::{card} Spin alignment with data\n", + "TR-013\n", + "^^^\n", + "In this report, we attempt to check the effect of activating spin alignment ([ampform#245](https://github.com/ComPWA/ampform/pull/245)) and compare it with [Figure 2](https://downloads.hindawi.com/journals/ahep/2020/6674595.pdf#page=9) in {cite}`marangottoHelicityAmplitudesGeneric2020`.\n", + "\n", + "See also [TR-014](014.ipynb) and [TR-015](015.ipynb).\n", + "+++\n", + "WIP\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Spin alignment with data" ] }, @@ -67,15 +77,6 @@ "%pip install -q ampform==0.13.3 qrules[viz]==0.9.7 tensorwaves[jax,pwa]==0.4.8" ] }, - { - "cell_type": "markdown", - "metadata": { - "tags": [] - }, - "source": [ - "In this report, we attempt to check the effect of activating spin alignment ([ampform#245](https://github.com/ComPWA/ampform/pull/245)) and compare it with [Figure 2](https://downloads.hindawi.com/journals/ahep/2020/6674595.pdf#page=9) in {cite}`marangottoHelicityAmplitudesGeneric2020`." - ] - }, { "cell_type": "code", "execution_count": null, @@ -662,7 +663,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/014.ipynb b/docs/report/014.ipynb index 1423084c..7828a973 100644 --- a/docs/report/014.ipynb +++ b/docs/report/014.ipynb @@ -36,18 +36,26 @@ { "cell_type": "markdown", "metadata": { - "tags": [] + "tags": [ + "sympy" + ] }, "source": [ - "````{margin}\n", - "```{spec} Amplitude model with sum notation\n", - ":id: TR-014\n", - ":links: TR-013; TR-015\n", - ":status: Implemented\n", - ":tags: sympy\n", - "```\n", - "````\n", - "\n", + "::::{margin}\n", + ":::{card} Amplitude model with sum notation\n", + "TR-014\n", + "^^^\n", + "See also [TR-013](013.ipynb) and [TR-015](015.ipynb).\n", + "+++\n", + "✅ [ampform#245](https://github.com/ComPWA/ampform/issues/245)\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Amplitude model with sum notation" ] }, @@ -1735,7 +1743,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/015.ipynb b/docs/report/015.ipynb index bbfc39aa..68114bf0 100644 --- a/docs/report/015.ipynb +++ b/docs/report/015.ipynb @@ -36,20 +36,27 @@ { "cell_type": "markdown", "metadata": { - "tags": [] + "tags": [ + "physics", + "sympy" + ] }, "source": [ - "````{margin}\n", - "```{spec} Spin alignment implementation\n", - ":id: TR-015\n", - ":links: TR-013; TR-014\n", - ":status: Implemented\n", - ":tags: physics;sympy\n", - "\n", - "This report has been implemented through [ampform#245](https://github.com/ComPWA/ampform/pull/245). For details on how to use it, see [this notebook](https://ampform.readthedocs.io/en/0.13.3/usage/helicity/spin-alignment.html).\n", - "```\n", - "````\n", - "\n", + "::::{margin}\n", + ":::{card} Spin alignment implementation\n", + "TR-015\n", + "^^^\n", + "This report has been implemented through [ampform#245](https://github.com/ComPWA/ampform/pull/245). For details on how to use it, see [this notebook](https://ampform.readthedocs.io/en/0.13.3/usage/helicity/spin-alignment.html). See also [TR-013](013.ipynb) and [TR-014](014.ipynb).\n", + "+++\n", + "✅ [ampform#245](https://github.com/ComPWA/ampform/pull/245)\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Spin alignment implementation" ] }, @@ -1673,7 +1680,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/016.ipynb b/docs/report/016.ipynb index 5379108f..06419bfa 100644 --- a/docs/report/016.ipynb +++ b/docs/report/016.ipynb @@ -33,19 +33,29 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "sympy" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Complex integral\n", + "TR-016\n", + "^^^\n", + "As noted in [TR-003](./003.ipynb), {func}`scipy.integrate.quad` cannot handle complex integrals. In addition, one can get into trouble with vectorized input ({obj}`numpy.array`s) on a lambdified {class}`sympy.Integral `. This report discusses both problems and proposes some solutions.\n", + "+++\n", + "To be implemented\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Complex integral\n", - ":id: TR-016\n", - ":links: TR-003\n", - ":status: To be implemented\n", - ":tags: sympy\n", - "```\n", - "````\n", - "\n", "# Complex integral" ] }, @@ -82,13 +92,6 @@ "%pip install -q ndim==0.1.7 quadpy==0.16.15 scipy==1.8.0 sympy==1.10.1 x21==0.2.16" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "As noted in {need}`TR-003`, {func}`scipy.integrate.quad` cannot handle complex integrals. In addition, one can get into trouble with vectorized input ({obj}`numpy.array`s) on a lambdified {class}`sympy.Integral `. This report discusses both problems and proposes some solutions." - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -270,7 +273,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The dispersion integral from Eq. {eq}`dispersion-integral` in {need}`TR-003` features a variable $s$ that is an argument to the function $\\Sigma_a$. This becomes a problem when $s$ gets vectorized (in this case: gets an event-wise {obj}`numpy.array` of invariant masses). Here's a simplified version of the problem:" + "The dispersion integral from Eq. {eq}`dispersion-integral` in [TR-003](003.ipynb) features a variable $s$ that is an argument to the function $\\Sigma_a$. This becomes a problem when $s$ gets vectorized (in this case: gets an event-wise {obj}`numpy.array` of invariant masses). Here's a simplified version of the problem:" ] }, { @@ -359,7 +362,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Note, however, that this becomes difficult to implement as {func}`~sympy.utilities.lambdify.lambdify` output for a {class}`sympy.Integral `. An attempt at this is made in {need}`TR-003`." + "Note, however, that this becomes difficult to implement as {func}`~sympy.utilities.lambdify.lambdify` output for a {class}`sympy.Integral `. An attempt at this is made in [TR-003](003.ipynb)." ] }, { @@ -376,7 +379,7 @@ "There is no good way to write integrals as [SymPy](https://docs.sympy.org) expressions that correctly {func}`~sympy.utilities.lambdify.lambdify` to a **vectorized** integral that handles complex values. Here is a first step however. Note that this integral expression class derives from {class}`sympy.Integral ` and:\n", "\n", "1. overwrites its {meth}`~sympy.core.basic.Basic.doit` method, so that the integral cannot be evaluated by SymPy.\n", - "2. provides a custom NumPy printer method (see {need}`TR-001`) that lambdifies this expression node to [`quadpy.quad()`](https://github.com/sigma-py/quadpy).\n", + "2. provides a custom NumPy printer method (see [TR-001](001.ipynb)) that lambdifies this expression node to [`quadpy.quad()`](https://github.com/sigma-py/quadpy).\n", "3. adds class variables that can affect the behavior of [`quadpy.quad()`](https://github.com/sigma-py/quadpy)." ] }, @@ -519,7 +522,7 @@ "source": [ ":::{tip}\n", "\n", - "For a more complicated and challenging expression, see {ref}`report/003:SymPy expressions` in {need}`TR-003`.\n", + "For a more complicated and challenging expression, see {ref}`report/003:SymPy expressions` in [TR-003](003.ipynb).\n", "\n", ":::" ] @@ -542,7 +545,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/017.ipynb b/docs/report/017.ipynb index 868d5390..80cae815 100644 --- a/docs/report/017.ipynb +++ b/docs/report/017.ipynb @@ -35,18 +35,28 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "tags": [ + "physics", + "sympy" + ] + }, "source": [ - "````{margin}\n", - "```{spec} Symbolic phase space boundary for a three-body decay\n", - ":id: TR-017\n", - ":status: Finished\n", - ":tags: sympy;physics\n", - "\n", + "::::{margin}\n", + ":::{card} Symbolic phase space boundary for a three-body decay\n", + "TR-017\n", + "^^^\n", "This reports shows how define the physical phase space region on a Dalitz plot using a Kibble function.\n", - "```\n", - "````\n", - "\n", + "+++\n", + "✅ [compwa-org#139](https://github.com/ComPWA/compwa-org/issues/139)\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Phase space for a three-body decay" ] }, @@ -747,7 +757,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/018.ipynb b/docs/report/018.ipynb index eee01a32..a06ffa7c 100644 --- a/docs/report/018.ipynb +++ b/docs/report/018.ipynb @@ -33,20 +33,30 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "physics", + "tensorwaves" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Intensity distribution generator with importance sampling\n", + "TR-018\n", + "^^^\n", + "This reports sets out how data generation with TensorWaves works and what would be the best approach to tackle [tensorwaves#402](https://github.com/ComPWA/tensorwaves/issues/402).\n", + "+++\n", + "WIP\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Intensity distribution generator with importance sampling\n", - ":id: TR-018\n", - ":status: WIP\n", - ":tags: physics;tensorwaves\n", - "\n", - "This reports sets out how data generation with TensorWaves works and what would be the best approach to tackle [ComPWA/tensorwaves#402](https://github.com/ComPWA/tensorwaves/issues/402).\n", - "```\n", - "````\n", - "\n", "# Importance sampling" ] }, @@ -289,7 +299,7 @@ "\n", "::::{margin}\n", ":::{seealso}\n", - "[ComPWA/tensorwaves#16](https://github.com/ComPWA/tensorwaves/issues/16) on a Python interface for [`EvtGen`](https://gitlab.cern.ch/evtgen/evtgen).\n", + "[tensorwaves#16](https://github.com/ComPWA/tensorwaves/issues/16) on a Python interface for [`EvtGen`](https://gitlab.cern.ch/evtgen/evtgen).\n", ":::\n", "::::" ] @@ -624,7 +634,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/019.ipynb b/docs/report/019.ipynb index 78bf2f20..7a1f3162 100644 --- a/docs/report/019.ipynb +++ b/docs/report/019.ipynb @@ -33,20 +33,30 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "DX", + "tips" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Integrating Jupyter notebook with Julia notebooks in MyST-NB\n", + "TR-019\n", + "^^^\n", + "This report shows how to define a Julia kernel for Jupyter notebooks, so that it can be executed and converted to static pages with [MyST-NB](https://myst-nb.readthedocs.io).\n", + "+++\n", + "✅ [compwa-org#174](https://github.com/ComPWA/compwa-org/issues/174)\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Integrating Jupyter notebook with Julia notebooks in MyST-NB\n", - ":id: TR-019\n", - ":status: Finished\n", - ":tags: tips;DX\n", - "\n", - "This report shows how to define a Julia kernel for Jupyter notebooks, so that it can be executed and converted to static pages with [MyST-NB](https://myst-nb.readthedocs.io/en/latest/computation/coconut-lang.html). This closes [ComPWA/compwa-org#134](https://github.com/ComPWA/compwa-org/issues/134).\n", - "```\n", - "````\n", - "\n", "# Jupyter notebook with Julia kernel" ] }, diff --git a/docs/report/020.ipynb b/docs/report/020.ipynb index 4d02b171..16f79977 100644 --- a/docs/report/020.ipynb +++ b/docs/report/020.ipynb @@ -27,11 +27,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "```{autolink-concat}\n", "```" @@ -40,21 +36,29 @@ { "cell_type": "markdown", "metadata": { - "pycharm": { - "name": "#%% md\n" - } + "tags": [ + "physics", + "sympy", + "tensorwaves" + ] }, "source": [ - "````{margin}\n", - "```{spec} Amplitude analysis with zfit\n", - ":id: TR-020\n", - ":status: WIP\n", - ":tags: physics;sympy;tensorwaves\n", - "\n", - "This reports builds a [simple symbolic amplitude model](https://tensorwaves.readthedocs.io/en/0.4.5/amplitude-analysis.html) with {mod}`qrules` and {mod}`ampform` and feeds it to [zfit](https://zfit.rtfd.io) instead of {mod}`tensorwaves`. See {issue}`ComPWA/compwa-org#156`.\n", - "```\n", - "````\n", - "\n", + "::::{margin}\n", + ":::{card} Amplitude analysis with zfit\n", + "TR-020\n", + "^^^\n", + "This reports builds a [simple symbolic amplitude model](https://tensorwaves.readthedocs.io/en/0.4.5/amplitude-analysis.html) with {mod}`qrules` and {mod}`ampform` and feeds it to [zfit](https://zfit.rtfd.io) instead of {mod}`tensorwaves`.\n", + "+++\n", + "✅ [compwa-org#151](https://github.com/ComPWA/compwa-org/issues/151)
\n", + "WIP [ComPWA/.github#14](https://github.com/ComPWA/.github/issues/14)\n", + ":::\n", + "::::" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "# Amplitude analysis with zfit" ] }, @@ -65,9 +69,6 @@ "jupyter": { "source_hidden": true }, - "pycharm": { - "name": "#%%\n" - }, "tags": [ "remove-cell" ] @@ -84,9 +85,6 @@ "jupyter": { "source_hidden": true }, - "pycharm": { - "name": "#%%\n" - }, "tags": [ "hide-cell" ] @@ -106,11 +104,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "## Formulating the model" ] @@ -118,11 +112,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "import qrules\n", @@ -143,9 +133,6 @@ "jupyter": { "source_hidden": true }, - "pycharm": { - "name": "#%%\n" - }, "tags": [ "remove-output", "hide-input" @@ -169,11 +156,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "import ampform\n", @@ -193,22 +176,14 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "## Generate data" ] }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Phase space sample" ] @@ -216,11 +191,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "from tensorwaves.data import TFPhaseSpaceGenerator, TFUniformRealNumberGenerator\n", @@ -235,11 +206,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Intensity-based sample" ] @@ -247,11 +214,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "from tensorwaves.function.sympy import create_function\n", @@ -266,11 +229,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "from tensorwaves.data import SympyDataTransformer\n", @@ -283,11 +242,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "from tensorwaves.data import (\n", @@ -311,9 +266,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "keep_output" ] @@ -478,9 +430,6 @@ "jupyter": { "source_hidden": true }, - "pycharm": { - "name": "#%%\n" - }, "tags": [ "hide-input", "remove-output" @@ -521,22 +470,14 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "## Fit" ] }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Determine free parameters" ] @@ -544,11 +485,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "initial_parameters = {\n", @@ -568,11 +505,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Parametrized function and caching" ] @@ -580,11 +513,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "from tensorwaves.function.sympy import create_parametrized_function\n", @@ -599,11 +528,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "from tensorwaves.estimator import create_cached_function\n", @@ -625,11 +550,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Estimator" ] @@ -637,11 +558,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "from tensorwaves.estimator import UnbinnedNLL\n", @@ -662,11 +579,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Optimize fit parameters" ] @@ -678,9 +591,6 @@ "jupyter": { "source_hidden": true }, - "pycharm": { - "name": "#%%\n" - }, "tags": [ "hide-cell" ] @@ -748,9 +658,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "remove-output" ] @@ -773,9 +680,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "keep_output" ] @@ -849,9 +753,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "keep_output" ] @@ -919,11 +820,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Fit result analysis" ] @@ -932,9 +829,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "remove-output", "hide-input" @@ -960,9 +854,6 @@ "jupyter": { "source_hidden": true }, - "pycharm": { - "name": "#%%\n" - }, "tags": [ "hide-input", "remove-output" @@ -990,22 +881,14 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "## Zfit" ] }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### PDF definition" ] @@ -1013,11 +896,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "import jax.numpy as jnp\n", @@ -1062,11 +941,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "params = [\n", @@ -1078,11 +953,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "def reset_parameters():\n", @@ -1094,11 +965,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "obs = [\n", @@ -1110,11 +977,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Data conversion" ] @@ -1122,11 +985,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "phsp_zfit = zfit.Data.from_pandas(pd.DataFrame(phsp), obs=obs_all)\n", @@ -1135,11 +994,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Perform fit" ] @@ -1154,11 +1009,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "params_fit = [p for p in params if p.name in initial_parameters if p.independent]" @@ -1167,11 +1018,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "jax_intensity_func = create_parametrized_function(\n", @@ -1184,11 +1031,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "reset_parameters()" @@ -1197,11 +1040,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "pdf = TensorWavesPDF(\n", @@ -1216,11 +1055,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "minimizer = zfit.minimize.Minuit(gradient=True, mode=0)" @@ -1228,11 +1063,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "source": [ ":::{note}\n", "You can also try different minimizers, like {class}`~zfit.minimizers.minimizers_scipy.ScipyTrustConstrV1`, but {class}`~zfit.minimizers.minimizer_minuit.Minuit` seems to perform best.\n", @@ -1243,9 +1074,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "keep_output" ] @@ -1301,9 +1129,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "keep_output" ] @@ -1359,9 +1184,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "keep_output" ] @@ -1415,11 +1237,7 @@ }, { "cell_type": "markdown", - "metadata": { - "pycharm": { - "name": "#%% md\n" - } - }, + "metadata": {}, "source": [ "### Statistical inference using the hepstats library\n", "\n", @@ -1429,11 +1247,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "from hepstats.hypotests import ConfidenceInterval\n", @@ -1444,11 +1258,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "calculator = AsymptoticCalculator(result, minimizer)" @@ -1465,9 +1275,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "keep_output" ] @@ -1493,9 +1300,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "keep_output" ] @@ -1528,11 +1332,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, + "metadata": {}, "outputs": [], "source": [ "def one_minus_cl_plot(x, pvalues, alpha=None, ax=None):\n", @@ -1555,9 +1355,6 @@ "cell_type": "code", "execution_count": null, "metadata": { - "pycharm": { - "name": "#%%\n" - }, "tags": [ "remove-output" ] @@ -1594,7 +1391,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/021.ipynb b/docs/report/021.ipynb index b81a15d7..c932ca3e 100644 --- a/docs/report/021.ipynb +++ b/docs/report/021.ipynb @@ -35,23 +35,35 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "tags": [] + }, "source": [ - "\n", - "\n", - "````{margin}\n", - "```{spec} Polarimeter vector field\n", - ":id: TR-021\n", - ":status: Finished\n", - ":tags: physics;polarimetry;polarization\n", - "\n", - "**Authors:**\n", - "Mikhail Mikhasenko [@mmikhasenko](https://github.com/mmikhasenko),\n", - "Remco de Boer [@redeboer](https://github.com/redeboer)\n", + "" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "physics", + "polarimetry", + "polarization" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Polarimeter vector field\n", + "TR-021\n", + "^^^\n", + "_Mikhail Mikhasenko [@mmikhasenko](https://github.com/mmikhasenko),\n", + "Remco de Boer [@redeboer](https://github.com/redeboer)_\n", "\n", "This report formulates the polarimeter vector field for in $\\Lambda_c \\to p\\pi K$ with [SymPy](https://docs.sympy.org) and visualizes it as an interactive widget with [TensorWaves](https://tensorwaves.rtfd.io) and [ipywidgets](https://ipywidgets.readthedocs.io).\n", - "```\n", - "````" + "+++\n", + "[compwa-org#129](https://github.com/ComPWA/compwa-org/issues/129)\n", + ":::\n", + "::::" ] }, { @@ -2576,7 +2588,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.8.18" } }, "nbformat": 4, diff --git a/docs/report/022.ipynb b/docs/report/022.ipynb index ba18ff38..0594817c 100644 --- a/docs/report/022.ipynb +++ b/docs/report/022.ipynb @@ -33,21 +33,31 @@ "```" ] }, + { + "cell_type": "markdown", + "metadata": { + "tags": [ + "physics", + "polarimetry", + "polarization" + ] + }, + "source": [ + "::::{margin}\n", + ":::{card} Polarimetry: Computing the B-matrix for Λc→pKπ\n", + "TR-022\n", + "^^^\n", + "The $B$-matrix forms an extension of the polarimeter vector field $\\vec\\alpha$ ([arXiv:2301.07010](https://arxiv.org/abs/2301.07010), see also [TR-021](021.ipynb)) that takes the polarization of the proton into account. See [arXiv:2302.07665](https://arxiv.org/abs/2302.07665), Eq. (B6).\n", + "+++\n", + "✅ [compwa-org#196](https://github.com/ComPWA/compwa-org/pull/196)\n", + ":::\n", + "::::" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ - "````{margin}\n", - "```{spec} Polarimetry: Computing the B-matrix for Λc→pKπ\n", - ":id: TR-022\n", - ":links: TR-021\n", - ":status: Finished\n", - ":tags: physics;polarimetry;polarization\n", - "```\n", - "\n", - "The $B$-matrix forms an extension of the polarimeter vector field $\\vec\\alpha$ ([arXiv:2301.07010](https://arxiv.org/abs/2301.07010), see also {need}`TR-021`) that takes the polarization of the proton into account. See [arXiv:2302.07665](https://arxiv.org/abs/2302.07665), Eq. (B6).\n", - "````\n", - "\n", "# B-matrix extension of polarimeter" ] }, @@ -747,7 +757,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.16" + "version": "3.8.18" }, "myst": { "all_links_external": true diff --git a/docs/reports.md b/docs/reports.md index 7cc324c9..e16e21eb 100644 --- a/docs/reports.md +++ b/docs/reports.md @@ -5,13 +5,57 @@ These pages are a collection of findings while working on ComPWA packages such a implemented, but may become relevant later on or could be useful to other frameworks as well. - +```{include} report-inventory.md -```{needtable} -:columns: id;title;status;tags -:style: datatables ``` + + + + + + + ```{toctree} :glob: :hidden: diff --git a/setup.cfg b/setup.cfg index 82cea15e..198be340 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,14 +47,12 @@ doc = sphinx-codeautolink[ipython] sphinx-comments sphinx-copybutton - sphinx-issues sphinx-design - sphinx-needs + sphinx-remove-toctrees sphinx-thebe sphinx-togglebutton sphinxcontrib-bibtex >=2 sphinxcontrib-hep-pdgref - sphinxcontrib-plantuml test = jupyter nbmake @@ -67,6 +65,7 @@ sty = %(format)s %(lint)s attrs # https://github.com/ComPWA/compwa-org/runs/8127821070?check_suite_focus=true#step:5:52 + nbformat pre-commit >=1.4.0 jupyter = %(doc)s