Usage

Main interface

Here are some quick examples of how to use qrules. For more fine-grained control, have a look at Advanced.

Investigate intermediate resonances

import qrules as q

result = q.generate_transitions(
    initial_state="J/psi(1S)",
    final_state=["K0", "Sigma+", "p~"],
    allowed_interaction_types="strong",
    formalism_type="canonical-helicity",
)
import graphviz

dot = q.io.asdot(result, collapse_graphs=True)
graphviz.Source(dot)
_images/usage_7_0.svg

Next, you use the ampform package to convert these transitions into a mathematical description that you can use to fit your data and perform Partial Wave Analysis!

Check allowed reactions

qrules can be used to check whether a transition between an initial and final state is violated by any conservation rules:

q.check_reaction_violations(
    initial_state="pi0",
    final_state=["gamma", "gamma", "gamma"],
)
{frozenset({'c_parity_conservation'})}