combined a bit more of the logic

This commit is contained in:
2024-08-06 16:37:56 +02:00
parent 9fb9595c83
commit 159574f4e8
2 changed files with 7 additions and 7 deletions

View File

@ -33,11 +33,14 @@ class JFData:
def process(self, image, metadata, double_pixels):
return self.ju_stream_adapter.process(image, metadata, double_pixels=double_pixels)
data = self.ju_stream_adapter.process(image, metadata, double_pixels=double_pixels)
# the pedestal file is loaded in process(), this check needs to be afterwards
if not self.ju_stream_adapter.handler.pedestal_file:
return None
def has_pedestal_file(self):
return bool(self.ju_stream_adapter.handler.pedestal_file)
data = np.ascontiguousarray(data)
return data
def get_pixel_mask(self, results, double_pixels):

View File

@ -116,12 +116,9 @@ def work(backend_address, accumulator_host, accumulator_port, visualisation_host
data = jfdata.process(image, metadata, double_pixels)
# the pedestal file is loaded in process(), this check needs to be afterwards
if not jfdata.has_pedestal_file():
if not data:
continue
data = np.ascontiguousarray(data)
pixel_mask_pf = jfdata.get_pixel_mask(results, double_pixels)
if pixel_mask_pf is not None: