Skip to content

Commit 61b4d4f

Browse files
committed
Disabled dysfunctional save_image function
1 parent c20f451 commit 61b4d4f

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

mxcubecore/HardwareObjects/QtGraphicsManager.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -786,20 +786,23 @@ def diffractometer_centring_successful(self, method, centring_status):
786786
gevent.spawn_later(2, self.save_crystal_image)
787787

788788
def save_crystal_image(self):
789-
try:
790-
raw_snapshot = self.get_raw_snapshot()
791-
result_image = raw_snapshot.copy(
792-
self.beam_position[0]
793-
- self.beam_info_dict["size_x"] * self.pixels_per_mm[0] / 2,
794-
self.beam_position[1]
795-
- self.beam_info_dict["size_y"] * self.pixels_per_mm[1] / 2,
796-
self.beam_info_dict["size_x"] * self.pixels_per_mm[0] * 1.5,
797-
self.beam_info_dict["size_y"] * self.pixels_per_mm[1] * 1.5,
798-
)
799-
date_time_str = datetime.now().strftime("%Y_%m_%d_%H_%M_%S")
800-
result_image.save("/opt/embl-hh/var/crystal_images/%s.png" % date_time_str)
801-
except Exception:
802-
self.log.exception("")
789+
pass
790+
# This code ios EMBL-specific and broken.
791+
# Left as comment to mark ned for refactoring
792+
# try:
793+
# raw_snapshot = self.get_raw_snapshot()
794+
# result_image = raw_snapshot.copy(
795+
# self.beam_position[0]
796+
# - self.beam_info_dict["size_x"] * self.pixels_per_mm[0] / 2,
797+
# self.beam_position[1]
798+
# - self.beam_info_dict["size_y"] * self.pixels_per_mm[1] / 2,
799+
# self.beam_info_dict["size_x"] * self.pixels_per_mm[0] * 1.5,
800+
# self.beam_info_dict["size_y"] * self.pixels_per_mm[1] * 1.5,
801+
# )
802+
# date_time_str = datetime.now().strftime("%Y_%m_%d_%H_%M_%S")
803+
# result_image.save("/opt/embl-hh/var/crystal_images/%s.png" % date_time_str)
804+
# except Exception:
805+
# self.log.exception("")
803806

804807
def diffractometer_centring_failed(self, method, centring_status):
805808
"""CleanUp method after centring failed

0 commit comments

Comments
 (0)