Rad gbuilder
3 unresolved threads
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
Activity
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 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 offBozianuLeon: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 frommain
with just the changes ingraph_builders.py
and then create a new PR from that. :)
Please register or sign in to reply