Skip to content

Commit 93d7f45

Browse files
committed
remove redundant function
1 parent fba43a5 commit 93d7f45

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

src/graphnet/data/extractors/icecube/i3calorimetry.py

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def get_energies(
232232
):
233233
hdr = frame["I3EventHeader"]
234234
e.add_note(f"Error in MuonGun track in event {hdr}")
235-
print(f"Skipping bad event {hdr}: {e}")
235+
self.warning(f"Skipping bad event {hdr}: {e}")
236236
e0 = np.nan
237237
e1 = np.nan
238238
e_dep_cascade = np.nan
@@ -315,35 +315,6 @@ def frame_contains_info(self, frame: "icetray.I3Frame") -> bool:
315315
"""Check if the frame contains the necessary information."""
316316
return self.mctree in frame and self.mmctracklist in frame
317317

318-
def in_hull_filter(
319-
self,
320-
frame: "icetray.I3Frame",
321-
particles: List["dataclasses.I3Particle"],
322-
) -> bool:
323-
"""Filter particle list to only particles that are in the hull."""
324-
pos, direc, length = np.asarray(
325-
[
326-
[
327-
np.array(p.pos),
328-
np.array([p.dir.x, p.dir.y, p.dir.z]),
329-
p.length,
330-
]
331-
for p in particles
332-
],
333-
dtype=object,
334-
).T
335-
336-
length = length.astype(float)
337-
338-
# replace length nan with 0
339-
length[np.isnan(length)] = 0
340-
pos = pos + direc * length
341-
pos = np.stack(pos)
342-
343-
in_volume = self.hull.point_in_hull(pos)
344-
is_track = np.array([p.is_track for p in particles], dtype=bool)
345-
return np.array(particles)[is_track | in_volume]
346-
347318
def is_in_hull(self, particle: "dataclasses.I3Particle") -> bool:
348319
"""Check if a particle is in the hull."""
349320
pos = np.array(particle.pos)

0 commit comments

Comments
 (0)