Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion src/graphnet/models/detector/icecube.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def _dom_time(self, x: torch.tensor) -> torch.tensor:
return (x - 1.0e04) / 3.0e4

def _charge(self, x: torch.tensor) -> torch.tensor:
return torch.log10(x)
# catch negative charges arising from input perturbation/noise
return torch.log10(1 + torch.clamp(x, min=0.0))

def _rde(self, x: torch.tensor) -> torch.tensor:
return (x - 1.25) / 0.25
Expand Down
3 changes: 2 additions & 1 deletion src/graphnet/models/detector/nubench.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def _t(self, x: torch.tensor) -> torch.tensor:
return x / 10e5

def _charge(self, x: torch.tensor) -> torch.tensor:
return torch.log10(1 + x)
# catch negative charges arising from input perturbation/noise
return torch.log10(1 + torch.clamp(x, min=0.0))


class FlowerS(NuBenchDetector):
Expand Down
Loading