Skip to content
Snippets Groups Projects
Commit 03010533 authored by David Hammer's avatar David Hammer Committed by spbonc
Browse files

Compute preview reductions before running addons

parent d40d8e70
No related branches found
No related tags found
1 merge request!131Compute preview reductions before running addons
......@@ -884,6 +884,19 @@ class BaseCorrection(PythonDevice):
image_data, cell_table, *additional_data
)
data_hash["corrections"] = corrections
# write previews first so addons cannot mess with them
with self.warning_context(
"processingState", WarningLampType.PREVIEW_SETTINGS
) as warn:
self.preview_friend.write_outputs(
*previews,
timestamp=timestamp,
cell_table=cell_table,
pulse_table=pulse_table,
warn_fun=warn,
)
for addon in self._enabled_addons:
addon.post_correction(
timestamp.getTrainId(),
......@@ -894,17 +907,6 @@ class BaseCorrection(PythonDevice):
)
self.kernel_runner.reshape(processed_buffer, out=buffer_array)
with self.warning_context(
"processingState", WarningLampType.PREVIEW_SETTINGS
) as warn:
self.preview_friend.write_outputs(
*previews,
timestamp=timestamp,
cell_table=cell_table,
pulse_table=pulse_table,
warn_fun=warn,
)
for addon in self._enabled_addons:
addon.post_reshape(
timestamp.getTrainId(), buffer_array, cell_table, pulse_table, data_hash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment