diff --git a/karabo_devices/shared_mem_processor/src/onlinemid_karabo/processor.py b/karabo_devices/shared_mem_processor/src/onlinemid_karabo/processor.py index 598be39de2e3add4a064541979f0976eb6483415..4a655970176bf0d492fc9c86e29fa78250ae7373 100644 --- a/karabo_devices/shared_mem_processor/src/onlinemid_karabo/processor.py +++ b/karabo_devices/shared_mem_processor/src/onlinemid_karabo/processor.py @@ -378,7 +378,7 @@ class OnlineMIDProcessor(TrainMatcher.TrainMatcher): plot_hash = Hash() - plot_hash = self.onlineImagePlotter.add_to_hash(plot_hash, 'agipd_data_plot', train_id, detector_data_list[0][1][0]) + plot_hash = self.onlineImagePlotter.add_to_hash(plot_hash, 'first_bunch', train_id, detector_data_list[0][1][0]) plot_hash = self.onlineImagePlotter.add_to_hash(plot_hash, 'gain_stage', train_id, numPixelPerGainStage) diff --git a/python_package/src/onlinemid/dataplotters/agipd_module.py b/python_package/src/onlinemid/dataplotters/agipd_module.py index f699c0f4616e2559e3883bfbc9fd076e4b062c87..ca5cd2cbad3b2fbde396381ee67c1938f34913e5 100644 --- a/python_package/src/onlinemid/dataplotters/agipd_module.py +++ b/python_package/src/onlinemid/dataplotters/agipd_module.py @@ -27,6 +27,8 @@ class AgipdModulePlotter(): @staticmethod def make_plot(data): + import time + time.sleep(2) plt.switch_backend("agg") fig = plt.figure(figsize=(15,10)) diff --git a/python_package/src/onlinemid/utils/image_plotting.py b/python_package/src/onlinemid/utils/image_plotting.py index e9df14a8413da1093cf4ebfd94087cd0a7fdea8c..286bbdd70bfa6dc495f5f6fa879933455055c77d 100644 --- a/python_package/src/onlinemid/utils/image_plotting.py +++ b/python_package/src/onlinemid/utils/image_plotting.py @@ -135,15 +135,15 @@ class DataToPlotToHash(): STRING_ELEMENT(res) .key(f"{basenode}.update_interval") - .displayedName('update interval') - .description('update interval') + .displayedName('Update interval') + .description('Update interval of the plot') .assignmentOptional() .defaultValue("") .commit(), ) - + schema_update = Schema() ( OUTPUT_CHANNEL(schema_update) @@ -166,9 +166,9 @@ class DataToPlotToHash(): if current_img is not None: hash[f'{hash_key}.plot'] = ImageData(current_img) - + now = time.time() - hash[f'{hash_key}.update_interval'] = f'Update Interval {(now - self.hash_keys_and_plotter[hash_key]['time_to_make_plot']):.1f}s' + hash[f'{hash_key}.update_interval'] = f'{(now - self.hash_keys_and_plotter[hash_key]['time_to_make_plot']):.1f}s' self.hash_keys_and_plotter[hash_key]['time_to_make_plot'] = now return hash