WIP gui final touch
This commit is contained in:
@@ -179,18 +179,11 @@ class flomniGuiTools:
|
||||
self.flomnigui_remove_all_docks()
|
||||
# Add a new dock with a RingProgressBar widget
|
||||
self.progressbar = self.gui.flomni.new("RingProgressBar")
|
||||
# # Disable automatic updates and manually set the self.progressbar value
|
||||
# self.progressbar.enable_auto_updates(False)
|
||||
# Set precision for the self.progressbar display
|
||||
# self.progressbar.set_precision(1) # Display self.progressbar with one decimal places
|
||||
|
||||
# Setting multiple rings with different values
|
||||
self.progressbar.add_ring().set_update("manual")
|
||||
self.progressbar.add_ring().set_update("manual")
|
||||
self.progressbar.add_ring().set_update("scan")
|
||||
# Set the values of the rings to 50, 75, and 25 from outer to inner ring
|
||||
# self.progressbar.set_value([50, 75])
|
||||
# Add a new dock with a TextBox widget
|
||||
self.text_box = self.gui.flomni.new("TextBox")
|
||||
|
||||
self._flomnigui_update_progress()
|
||||
|
||||
@@ -206,9 +199,9 @@ class flomniGuiTools:
|
||||
)
|
||||
main_progress_ring.set_value(progress)
|
||||
subtomo_progress_ring.set_value(subtomo_progress)
|
||||
if self.text_box is not None:
|
||||
text = f"Progress report:\n Tomo type: ....................... {self.progress['tomo_type']}\n Projection: ...................... {self.progress['projection']:.0f}\n Total projections expected ....... {self.progress['total_projections']}\n Angle: ........................... {self.progress['angle']}\n Current subtomo: ................. {self.progress['subtomo']}\n Current projection within subtomo: {self.progress['subtomo_projection']}\n Total projections per subtomo: ... {self.progress['subtomo_total_projections']}"
|
||||
self.text_box.set_plain_text(text)
|
||||
|
||||
text = f"Progress report:\n Tomo type: ....................... {self.progress['tomo_type']}\n Projection: ...................... {self.progress['projection']:.0f}\n Total projections expected ....... {self.progress['total_projections']}\n Angle: ........................... {self.progress['angle']}\n Current subtomo: ................. {self.progress['subtomo']}\n Current projection within subtomo: {self.progress['subtomo_projection']}\n Total projections per subtomo: ... {self.progress['subtomo_total_projections']}"
|
||||
self.progressbar.set_center_label(text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -288,13 +288,20 @@ class XRayEye(BECWidget, QWidget):
|
||||
x=[0],
|
||||
y=[1],
|
||||
label="fit-x",
|
||||
dap="SineModel",
|
||||
dap_parameters={
|
||||
"frequency": {"value": 0.0174533, "vary": False, "min": 0.01, "max": 0.02}
|
||||
},
|
||||
dap=["SineModel","LinearModel"],
|
||||
dap_parameters=[
|
||||
{"frequency": {"value": 0.0174533, "vary": False, "min": 0.01, "max": 0.02}},{"slope": {"value": 0, "vary": False, "min": 0.0, "max": 0.02}}],
|
||||
dap_oversample=5,
|
||||
)
|
||||
self.waveform_y.plot(
|
||||
x=[0],
|
||||
y=[2],
|
||||
label="fit-y",
|
||||
dap=["SineModel","LinearModel"],
|
||||
dap_parameters=[
|
||||
{"frequency": {"value": 0.0174533, "vary": False, "min": 0.01, "max": 0.02}},{"slope": {"value": 0, "vary": False, "min": 0.0, "max": 0.02}}],
|
||||
dap_oversample=5,
|
||||
)
|
||||
self.waveform_y.plot(x=[0], y=[2], label="fit-y", dap="SineModel") # ,dap_oversample=5)
|
||||
self.fit_x = self.waveform_x.curves[0]
|
||||
self.fit_y = self.waveform_y.curves[0]
|
||||
|
||||
@@ -484,7 +491,7 @@ class XRayEye(BECWidget, QWidget):
|
||||
# self.bec_dispatcher.disconnect_slot(self.device_updates, MessageEndpoints.device_readback("omny_xray_gui"))
|
||||
curve_id = meta.get("curve_id")
|
||||
|
||||
if curve_id == "fit-x-SineModel":
|
||||
if curve_id == "fit-x-SineModel+LinearModel":
|
||||
self.dev.omny_xray_gui.fit_params_x.set(data).wait()
|
||||
print(f"setting x data to {data}")
|
||||
else:
|
||||
@@ -504,6 +511,7 @@ class XRayEye(BECWidget, QWidget):
|
||||
# self.fix_x.title = " got fit array"
|
||||
print(f"got fit array {fit_array}")
|
||||
self.waveform_x.curves[0].set_data(x=fit_array[0], y=fit_array[1])
|
||||
self.waveform_y.curves[0].set_data(x=fit_array[0], y=fit_array[2])
|
||||
# self.fit_x.set_data(x=fit_array[0],y=fit_array[1])
|
||||
# self.fit_y.set_data(x=fit_array[0],y=fit_array[2])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user