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

FIX: remove IsobarNode argument checks #110

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/ampform_dpd/decay.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,6 @@ def get_decay_product_ids(
class ThreeBodyDecayChain:
decay: IsobarNode = field(validator=instance_of(IsobarNode))

def __attrs_post_init__(self) -> None:
if not isinstance(self.decay.child1, IsobarNode):
msg = f"Child 1 has of type {IsobarNode.__name__} (the decay)"
raise TypeError(msg)
if not isinstance(self.decay.child1.child1, Particle):
msg = f"Child 1 of child 1 has of type {Particle.__name__}"
raise TypeError(msg)
if not isinstance(self.decay.child1.child2, Particle):
msg = f"Child 2 of child 1 has of type {Particle.__name__}"
raise TypeError(msg)
if not isinstance(self.decay.child2, Particle):
msg = f"Child 2 has of type {Particle.__name__} (spectator)"
raise TypeError(msg)

@property
def parent(self) -> Particle:
return self.decay.parent
Expand Down
Loading