Skip to content

Commit

Permalink
Adapt missing DispContainer assingment
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBeiske committed Nov 6, 2023
1 parent 0ebff9d commit 76628bd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ctapipe/reco/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,12 +690,10 @@ def __call__(self, event: ArrayEventContainer) -> None:

if passes_quality_checks:
disp, valid = self._predict(self.subarray.tel[tel_id], table)
disp_container = DispContainer(
norm=disp[0],
is_valid=valid[0],
)

if valid:
disp_container = DispContainer(parameter=disp[0])

hillas = event.dl1.tel[tel_id].parameters.hillas
psi = hillas.psi.to_value(u.rad)

Expand All @@ -715,6 +713,9 @@ def __call__(self, event: ArrayEventContainer) -> None:
)

else:
disp_container = DispContainer(
parameter=u.Quantity(np.nan, self.unit),
)
altaz_container = ReconstructedGeometryContainer(
alt=u.Quantity(np.nan, u.deg, copy=False),
az=u.Quantity(np.nan, u.deg, copy=False),
Expand Down

0 comments on commit 76628bd

Please sign in to comment.