From 93168da6a3e9b745446e839e03545a4f3d66b73b Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:37:54 +0100 Subject: [PATCH] MAINT: update links to QRules v0.10 API --- docs/conf.py | 4 ++-- docs/usage/amplitude.ipynb | 2 +- docs/usage/dynamics/custom.ipynb | 2 +- docs/usage/helicity/formalism.ipynb | 4 ++-- src/ampform/__init__.py | 2 +- src/ampform/helicity/__init__.py | 2 +- src/ampform/helicity/align/axisangle.py | 2 +- src/ampform/helicity/decay.py | 8 ++++---- src/ampform/helicity/naming.py | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 4f9f9f781..a54b72725 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -59,7 +59,7 @@ "ReactionInfo": "qrules.transition.ReactionInfo", "Slider": ("obj", "symplot.Slider"), "State": "qrules.transition.State", - "StateTransition": "qrules.transition.StateTransition", + "StateTransition": "qrules.topology.Transition", "T": "TypeVar", "Topology": "qrules.topology.Topology", "WignerD": "sympy.physics.quantum.spin.WignerD", @@ -238,7 +238,7 @@ "numpy": (f"https://numpy.org/doc/{pin_minor('numpy')}", None), "pwa": ("https://pwa.readthedocs.io", None), "python": ("https://docs.python.org/3", None), - "qrules": (f"https://qrules.readthedocs.io/en/{pin('qrules')}", None), + "qrules": (f"https://qrules.readthedocs.io/{pin('qrules')}", None), "sympy": ("https://docs.sympy.org/latest", None), } linkcheck_anchors = False diff --git a/docs/usage/amplitude.ipynb b/docs/usage/amplitude.ipynb index 46c599eb4..00f4a15df 100644 --- a/docs/usage/amplitude.ipynb +++ b/docs/usage/amplitude.ipynb @@ -99,7 +99,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In {doc}`qrules:usage/reaction`, we used {func}`~qrules.generate_transitions` to create a list of allowed {class}`~qrules.transition.StateTransition`s for a specific decay channel:" + "In {doc}`qrules:usage/reaction`, we used {func}`~qrules.generate_transitions` to create a list of allowed {class}`~qrules.topology.Transition`s for a specific decay channel:" ] }, { diff --git a/docs/usage/dynamics/custom.ipynb b/docs/usage/dynamics/custom.ipynb index b10325601..4c676d46e 100644 --- a/docs/usage/dynamics/custom.ipynb +++ b/docs/usage/dynamics/custom.ipynb @@ -176,7 +176,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "A function that behaves like a {class}`.ResonanceDynamicsBuilder` should return a {class}`tuple` of some {class}`~sympy.core.expr.Expr` (which formulates your lineshape) and a {class}`dict` of {class}`~sympy.core.symbol.Symbol`s to some suggested initial values. This signature is required so the builder knows how to extract the correct symbol names and their suggested initial values from a {class}`~qrules.transition.StateTransition`." + "A function that behaves like a {class}`.ResonanceDynamicsBuilder` should return a {class}`tuple` of some {class}`~sympy.core.expr.Expr` (which formulates your lineshape) and a {class}`dict` of {class}`~sympy.core.symbol.Symbol`s to some suggested initial values. This signature is required so the builder knows how to extract the correct symbol names and their suggested initial values from a {class}`~qrules.topology.Transition`." ] }, { diff --git a/docs/usage/helicity/formalism.ipynb b/docs/usage/helicity/formalism.ipynb index 32468c981..e9003a404 100644 --- a/docs/usage/helicity/formalism.ipynb +++ b/docs/usage/helicity/formalism.ipynb @@ -332,9 +332,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "See {func}`.formulate_isobar_wigner_d` and {func}`.formulate_isobar_cg_coefficients` for how these Wigner-$D$ functions and Clebsch-Gordan coefficients are computed for each node on a {class}`~qrules.transition.StateTransition`.\n", + "See {func}`.formulate_isobar_wigner_d` and {func}`.formulate_isobar_cg_coefficients` for how these Wigner-$D$ functions and Clebsch-Gordan coefficients are computed for each node on a {class}`~qrules.topology.Transition`.\n", "\n", - "We can see this also from the original {class}`~qrules.transition.ReactionInfo` objects. Let's select only the {attr}`~qrules.transition.ReactionInfo.transitions` where the $a_1(1260)^+$ resonance has spin projection $-1$ (taken to be helicity $-1$ in the helicity formalism). We then see just one {class}`~qrules.transition.StateTransition` in the helicity basis and three transitions in the canonical basis:" + "We can see this also from the original {class}`~qrules.transition.ReactionInfo` objects. Let's select only the {attr}`~qrules.transition.ReactionInfo.transitions` where the $a_1(1260)^+$ resonance has spin projection $-1$ (taken to be helicity $-1$ in the helicity formalism). We then see just one {class}`~qrules.topology.Transition` in the helicity basis and three transitions in the canonical basis:" ] }, { diff --git a/src/ampform/__init__.py b/src/ampform/__init__.py index 030e25d0b..466095cbc 100644 --- a/src/ampform/__init__.py +++ b/src/ampform/__init__.py @@ -1,7 +1,7 @@ """Build amplitude models with different PWA formalisms. AmpForm formalizes formalisms from :doc:`Partial Wave Analysis `. It provides -tools to convert `~qrules.transition.StateTransition` solutions that the `.qrules` +tools to convert `~qrules.topology.Transition` solutions that the `.qrules` package found into an `.HelicityModel`. The output `.HelicityModel` can then be used by external fitter packages to generate a data set (toy Monte Carlo) for this specific reaction process, or to optimize ('fit') its parameters so that they resemble the data diff --git a/src/ampform/helicity/__init__.py b/src/ampform/helicity/__init__.py index f2aa26660..05e46ae62 100644 --- a/src/ampform/helicity/__init__.py +++ b/src/ampform/helicity/__init__.py @@ -679,7 +679,7 @@ def assign( # noqa: PLR6301 - `str`: Select transition nodes by the name of the `~.TwoBodyDecay.parent` `~qrules.particle.Particle`. - - `.TwoBodyDecay` or `tuple` of a `~qrules.transition.StateTransition` with a + - `.TwoBodyDecay` or `tuple` of a `~qrules.topology.Transition` with a node ID: set dynamics for one specific transition node. """ msg = ( diff --git a/src/ampform/helicity/align/axisangle.py b/src/ampform/helicity/align/axisangle.py index 409845f72..90cfd31ff 100644 --- a/src/ampform/helicity/align/axisangle.py +++ b/src/ampform/helicity/align/axisangle.py @@ -197,7 +197,7 @@ def formulate_wigner_rotation( :cite:`marangottoHelicityAmplitudesGeneric2020`, p.6, especially Eq.(36). Args: - transition: The `~qrules.transition.StateTransition` in which you + transition: The `~qrules.topology.Transition` in which you want to rotate one of the spin states. rotated_state_id: The state ID of a spin `~qrules.transition.State` that you want to rotate. diff --git a/src/ampform/helicity/decay.py b/src/ampform/helicity/decay.py index c1860b7fc..f65e8cfdc 100644 --- a/src/ampform/helicity/decay.py +++ b/src/ampform/helicity/decay.py @@ -1,4 +1,4 @@ -"""Extract two-body decay info from a `~qrules.transition.StateTransition`.""" +"""Extract two-body decay info from a `~qrules.topology.Transition`.""" from __future__ import annotations @@ -44,11 +44,11 @@ def from_transition(cls, transition: StateTransition, state_id: int) -> StateWit @frozen class TwoBodyDecay: - """Two-body sub-decay in a `~qrules.transition.StateTransition`. + """Two-body sub-decay in a `~qrules.topology.Transition`. This container class ensures that: - 1. a selected node in a `~qrules.transition.StateTransition` is indeed a 1-to-2 body + 1. a selected node in a `~qrules.topology.Transition` is indeed a 1-to-2 body decay 2. its two `.children` are sorted by whether they decay further or not (see @@ -407,7 +407,7 @@ def group_by_spin_projection( ) -> list[list[StateTransition]]: """Match final and initial states in groups. - Each `~qrules.transition.StateTransition` corresponds to a specific state transition + Each `~qrules.topology.Transition` corresponds to a specific state transition amplitude. This function groups together transitions, which have the same initial and final state (including spin). This is needed to determine the coherency of the individual amplitude parts. diff --git a/src/ampform/helicity/naming.py b/src/ampform/helicity/naming.py index 889293ba6..f1f78de4e 100644 --- a/src/ampform/helicity/naming.py +++ b/src/ampform/helicity/naming.py @@ -41,10 +41,10 @@ def generate_amplitude_name( ) -> str: """Generates a unique name for the amplitude corresponding. - That is, corresponging to the given `~qrules.transition.StateTransition`. If + That is, corresponging to the given `~qrules.topology.Transition`. If ``node_id`` is given, it generates a unique name for the partial amplitude corresponding to the interaction node of the given - `~qrules.transition.StateTransition`. + `~qrules.topology.Transition`. """ @abstractmethod