Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let TopologyBuilder handle 2-to-n transition #29

Open
redeboer opened this issue Nov 3, 2020 · 1 comment
Open

Let TopologyBuilder handle 2-to-n transition #29

redeboer opened this issue Nov 3, 2020 · 1 comment
Assignees
Labels
🐛 Bug Something isn't working

Comments

@redeboer
Copy link
Member

redeboer commented Nov 3, 2020

There seems to be a bug in the SimpleStateTransitionTopologyBuilder: it doesn't correctly handle a list of InteractionNodes:

from expertsystem.reaction.topology import (
    InteractionNode,
    SimpleStateTransitionTopologyBuilder,
)

int_nodes = [
    InteractionNode("TwoBodyDecay", 1, 2),
    InteractionNode("TwoBodyProduction", 2, 1),
]
topology_builder = SimpleStateTransitionTopologyBuilder(int_nodes)
topology_builder.build_graphs(2, 3)
    149             connected_nodes = edge.get_connected_nodes()
    150             if not connected_nodes:
--> 151                 raise ValueError(
    152                     f"Edge nr. {edge_id} is not connected to any node ({edge})"
    153                 )

ValueError: Edge nr. 1 is not connected to any node (Edge(ending_node_id=None, originating_node_id=None))

If I understand correctly, the above snippet should handle a 2-to-3 transition that should look like this:

image

Code to create the figure
import graphviz

import expertsystem as es
from expertsystem.reaction.topology import Edge, Topology

topology = Topology(
    nodes={0, 1, 2},
    edges={
        0: Edge(0, None),
        1: Edge(0, None),
        2: Edge(1, 0),
        3: Edge(2, 1),
        4: Edge(None, 1),
        5: Edge(None, 2),
        6: Edge(None, 2),
    },
)
dot = es.io.convert_to_dot(topology)
graphviz.Source(dot)
@redeboer redeboer transferred this issue from ComPWA/expertsystem Apr 6, 2021
@redeboer redeboer added ✨ Feature New feature added to the package 🐛 Bug Something isn't working and removed ✨ Feature New feature added to the package labels Apr 16, 2021
@redeboer redeboer self-assigned this May 27, 2021
@redeboer redeboer added this to the 0.9.1 milestone May 27, 2021
@redeboer redeboer modified the milestones: 0.9.1, 0.9.2 Jul 21, 2021
@redeboer redeboer modified the milestones: 0.9.6, Future Jan 31, 2022
redeboer added a commit to redeboer/ComPWA-qrules that referenced this issue Apr 30, 2022
* docs: add pre-commit badge
* docs: improve README.md text
@redeboer redeboer removed this from the Future milestone Apr 27, 2023
@redeboer redeboer removed their assignment Jan 9, 2024
@redeboer
Copy link
Member Author

redeboer commented Sep 5, 2024

@grayson-helmholz this also needs to cover $t$ channels
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
Status: 🆕 Icebox
Development

No branches or pull requests

2 participants