Skip to content

Commit

Permalink
Terminate detector data translation if datasets are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
egorsobolev committed Feb 17, 2024
1 parent bf7e77b commit 697cad9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hummingbird/backend/euxfel.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ def _tr_AGIPD(self, values, obj, evt_key):
#cellid = numpy.squeeze(obj["image.cellId"], axis=-1)[:,0].astype(int)

cellid = obj['image.cellId']
if cellid.size == 0:
return

if self._live and cellid.ndim == (2 + self._use_stacked):
cellid = numpy.squeeze(cellid, axis=-1)
if self._live and self._use_stacked:
Expand Down Expand Up @@ -367,6 +370,9 @@ def _tr_DSSC(self, values, obj, evt_key):
return

cellid = obj['image.cellId']
if cellid.size == 0:
return

if self._live and cellid.ndim == (2 + self._use_stacked):
cellid = numpy.squeeze(cellid, axis=-1)
if self._live and self._use_stacked:
Expand Down

0 comments on commit 697cad9

Please sign in to comment.