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

Perturbing charge can lead to negative charge #776

Open
pweigel opened this issue Dec 11, 2024 · 0 comments
Open

Perturbing charge can lead to negative charge #776

pweigel opened this issue Dec 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@pweigel
Copy link
Collaborator

pweigel commented Dec 11, 2024

When a perturbation_dict is provided to the graph definition with a setting for charge, it can lead to negative charges since it is sampled from a normal distribution (if you are unlucky, like me):
https://github.com/graphnet-team/graphnet/blob/92b150aa5fbe149cdd7d473932d05375df176417/src/graphnet/models/graphs/graph_definition.py#L348C1-L362C30

image

Possible solution: include bounds for the perturbations. If the sampled value is outside of the bounds, then it is resampled.

@pweigel pweigel added the bug Something isn't working label Dec 11, 2024
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
None yet
Development

No branches or pull requests

1 participant