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

Add pulse merging functionality to GraphDefinition #748

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
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
12 changes: 11 additions & 1 deletion src/graphnet/models/detector/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def forward( # type: ignore
@property
def geometry_table(self) -> pd.DataFrame:
"""Public get method for retrieving a `Detector`s geometry table."""
if ~hasattr(self, "_geometry_table"):
if not hasattr(self, "_geometry_table"):
try:
assert hasattr(self, "geometry_table_path")
except AssertionError as e:
Expand All @@ -60,6 +60,16 @@ def sensor_index_name(self) -> str:
"""Public get method for retrieving the sensor id column name."""
return self.sensor_id_column

@property
def sensor_time_name(self) -> str:
"""Public get method for retrieving the sensor time column name."""
return self.sensor_time_column

@property
def charge_name(self) -> str:
"""Public get method for retrieving the charge column name."""
return self.charge_column

@final
def _standardize(
self, input_features: torch.tensor, input_feature_names: List[str]
Expand Down
6 changes: 6 additions & 0 deletions src/graphnet/models/detector/icecube.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class IceCube86(Detector):
xyz = ["dom_x", "dom_y", "dom_z"]
string_id_column = "string"
sensor_id_column = "sensor_id"
sensor_time_column = "dom_time"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension of input data."""
Expand Down Expand Up @@ -57,6 +59,8 @@ class IceCubeKaggle(Detector):
xyz = ["x", "y", "z"]
string_id_column = "string"
sensor_id_column = "sensor_id"
sensor_time_column = "time"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension of input data."""
Expand Down Expand Up @@ -122,6 +126,8 @@ class IceCubeUpgrade(Detector):
xyz = ["dom_x", "dom_y", "dom_z"]
string_id_column = "string"
sensor_id_column = "sensor_id"
sensor_time_column = "dom_time"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension of input data."""
Expand Down
2 changes: 2 additions & 0 deletions src/graphnet/models/detector/liquido.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class LiquidO_v1(Detector):
xyz = ["sipm_x", "sipm_y", "sipm_z"]
string_id_column = "fiber_id"
sensor_id_column = "sipm_id"
sensor_time_column = "t"
charge_column = None

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down
24 changes: 24 additions & 0 deletions src/graphnet/models/detector/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class ORCA150SuperDense(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -47,6 +49,8 @@ class TRIDENT1211(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -77,6 +81,8 @@ class IceCubeUpgrade7(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -107,6 +113,8 @@ class WaterDemo81(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -137,6 +145,8 @@ class BaikalGVD8(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -167,6 +177,8 @@ class IceDemo81(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -197,6 +209,8 @@ class ARCA115(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -227,6 +241,8 @@ class ORCA150(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -257,6 +273,8 @@ class IceCube86Prometheus(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -287,6 +305,8 @@ class IceCubeDeepCore8(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -317,6 +337,8 @@ class IceCubeGen2(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down Expand Up @@ -344,6 +366,8 @@ class PONETriangle(Detector):
xyz = ["sensor_pos_x", "sensor_pos_y", "sensor_pos_z"]
string_id_column = "sensor_string_id"
sensor_id_column = "sensor_id"
sensor_time_column = "t"
charge_column = "charge"

def feature_map(self) -> Dict[str, Callable]:
"""Map standardization functions to each dimension."""
Expand Down
Loading
Loading