combined a bit more of the logic
This commit is contained in:
@ -33,11 +33,14 @@ class JFData:
|
|||||||
|
|
||||||
|
|
||||||
def process(self, image, metadata, double_pixels):
|
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):
|
data = np.ascontiguousarray(data)
|
||||||
return bool(self.ju_stream_adapter.handler.pedestal_file)
|
return data
|
||||||
|
|
||||||
|
|
||||||
def get_pixel_mask(self, results, double_pixels):
|
def get_pixel_mask(self, results, double_pixels):
|
||||||
|
@ -116,12 +116,9 @@ def work(backend_address, accumulator_host, accumulator_port, visualisation_host
|
|||||||
|
|
||||||
data = jfdata.process(image, metadata, double_pixels)
|
data = jfdata.process(image, metadata, double_pixels)
|
||||||
|
|
||||||
# the pedestal file is loaded in process(), this check needs to be afterwards
|
if not data:
|
||||||
if not jfdata.has_pedestal_file():
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
data = np.ascontiguousarray(data)
|
|
||||||
|
|
||||||
pixel_mask_pf = jfdata.get_pixel_mask(results, double_pixels)
|
pixel_mask_pf = jfdata.get_pixel_mask(results, double_pixels)
|
||||||
|
|
||||||
if pixel_mask_pf is not None:
|
if pixel_mask_pf is not None:
|
||||||
|
Reference in New Issue
Block a user