Skip to content

Charge perturbations leading to negative charge values #898

Description

@sevmag

Describe the bug
When using the perturbation functionality of the DataRepresentation on the charge values, you can sometimes get a negative charge, which leads to issues in the detector standardization, which uses log10 for most of the detector classes.

perturbation_dict: Optional[Dict[str, float]] = None,

def _charge(self, x: torch.tensor) -> torch.tensor:
return torch.log10(1 + x)

def _charge(self, x: torch.tensor) -> torch.tensor:
return torch.log10(x)

Expected behavior
Lower-bound the charge to 0, as this is the only physically meaningful way

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions