Skip to content
Snippets Groups Projects
Commit 5ec02069 authored by Jakobsen, Mads Bregenholt's avatar Jakobsen, Mads Bregenholt
Browse files

fixing typo, adding sleep function to test

parent d34f4972
No related branches found
No related tags found
No related merge requests found
Pipeline #167553 passed
...@@ -378,7 +378,7 @@ class OnlineMIDProcessor(TrainMatcher.TrainMatcher): ...@@ -378,7 +378,7 @@ class OnlineMIDProcessor(TrainMatcher.TrainMatcher):
plot_hash = Hash() 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) plot_hash = self.onlineImagePlotter.add_to_hash(plot_hash, 'gain_stage', train_id, numPixelPerGainStage)
......
...@@ -27,6 +27,8 @@ class AgipdModulePlotter(): ...@@ -27,6 +27,8 @@ class AgipdModulePlotter():
@staticmethod @staticmethod
def make_plot(data): def make_plot(data):
import time
time.sleep(2)
plt.switch_backend("agg") plt.switch_backend("agg")
fig = plt.figure(figsize=(15,10)) fig = plt.figure(figsize=(15,10))
......
...@@ -135,15 +135,15 @@ class DataToPlotToHash(): ...@@ -135,15 +135,15 @@ class DataToPlotToHash():
STRING_ELEMENT(res) STRING_ELEMENT(res)
.key(f"{basenode}.update_interval") .key(f"{basenode}.update_interval")
.displayedName('update interval') .displayedName('Update interval')
.description('update interval') .description('Update interval of the plot')
.assignmentOptional() .assignmentOptional()
.defaultValue("") .defaultValue("")
.commit(), .commit(),
) )
schema_update = Schema() schema_update = Schema()
( (
OUTPUT_CHANNEL(schema_update) OUTPUT_CHANNEL(schema_update)
...@@ -166,9 +166,9 @@ class DataToPlotToHash(): ...@@ -166,9 +166,9 @@ class DataToPlotToHash():
if current_img is not None: if current_img is not None:
hash[f'{hash_key}.plot'] = ImageData(current_img) hash[f'{hash_key}.plot'] = ImageData(current_img)
now = time.time() 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 self.hash_keys_and_plotter[hash_key]['time_to_make_plot'] = now
return hash return 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