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

Add possibility to specify nodes in generate_transitions #290

Open
grayson-helmholz opened this issue Oct 8, 2024 · 1 comment
Open
Assignees
Labels
⚙️ Enhancement Improvements and optimizations of existing features ⚠️ Interface Breaking changes to the API

Comments

@grayson-helmholz
Copy link
Contributor

grayson-helmholz commented Oct 8, 2024

Currently generate_transitions can only specify the "settings" for the decay as a whole, while the setter/getter-functions in the StateTransitionManager are able to specify a specific node. An example of this difference can be seen in #285 .
A possible solution would be to pass along a dictionary which maps properties to nodes.

@grayson-helmholz grayson-helmholz self-assigned this Oct 8, 2024
@grayson-helmholz grayson-helmholz added the ⚙️ Enhancement Improvements and optimizations of existing features label Oct 8, 2024
@redeboer redeboer added the ⚠️ Interface Breaking changes to the API label Oct 9, 2024
@redeboer
Copy link
Member

redeboer commented Oct 9, 2024

So you would write this

reaction = qrules.generate_transitions(
    initial_state=["Lambda(c)+"],
    final_state=["p", "K-", "pi+"],
    allowed_interaction_types=("weak", "strong"),
)

instead of this

reaction = qrules.generate_transitions(
    initial_state=["Lambda(c)+"],
    final_state=["p", "K-", "pi+"],
    allowed_interaction_types={
        0: "weak",
        1: "strong",
    },
)

right?

I have to think a bit about this. It would be cleaner, but at the same time, generate_transitions() is a convenience function that assumes the user does not know anything about the generated topologies, like node IDs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Enhancement Improvements and optimizations of existing features ⚠️ Interface Breaking changes to the API
Projects
None yet
Development

No branches or pull requests

2 participants