Skip to content
Snippets Groups Projects

Rad gbuilder

Closed Jorge Prado requested to merge github/fork/BozianuLeon/rad_gbuilder into main
3 unresolved threads

Created by: BozianuLeon

Simple alternative to knn imagining a sphere around each triggered DOM, taken identically from torch_geometric.nn.

Merge request reports

Approval is optional

Closed by avatar (Mar 14, 2025 5:39am UTC)

Merge details

  • The changes were not merged into main.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
42 42
43 43 return data
44 44
45 class RadialGraphBuilder(GraphBuilder):
46 """Builds graph adjacency according to a sphere of chosen radius centred at each DOM hit"""
47 def __init__ (
48 self,
49 r: float,
  • Jorge Prado
    Jorge Prado @jprado started a thread on commit 91f9375e
  • 43 43 return data
    44 44
    45 class RadialGraphBuilder(GraphBuilder):
    46 """Builds graph adjacency according to a sphere of chosen radius centred at each DOM hit"""
    47 def __init__ (
    48 self,
    49 r: float,
    50 columns: List[int] = None,
    51 device: str = None,
    52 ):
    53 # Check(s)
    54 if columns is None:
    55 columns = [0,1,2]
    56
    57 # Member variable(s)
    58 self._r = r
  • Jorge Prado
    Jorge Prado @jprado started a thread on commit 91f9375e
  • 55 columns = [0,1,2]
    56
    57 # Member variable(s)
    58 self._r = r
    59 self._columns = columns
    60 self._device = device
    61
    62 def __call__ (self, data: Data) -> Data:
    63 # Constructs the adjacency matrix from the raw, DOM-level data and returns this matrix
    64 if data.edge_index is not None:
    65 print("WARNING: GraphBuilder received graph with pre-existing structure. ",
    66 "Will overwrite.")
    67
    68 data.edge_index = radius_graph(
    69 data.x[:, self._columns],
    70 self._r,
  • Created by: asogaard

    Review: Commented

    Thanks for the PR, @BozianuLeon! I think the RadiusGraphBuilder looks pretty much perfect. :) However, it seems like you have branched off BozianuLeon:stop_mu to make this feature branch, meaning that you have inadvertently picked up the stopped-muon changes from #148. I would suggest reverting these changes on branch used in the PR, or create a new branch from main with just the changes in graph_builders.py and then create a new PR from that. :)

  • closed

  • Please register or sign in to reply
    Loading