Skip to content

Commit aee786e

Browse files
marcus-oscarssonwalesch-yan
authored andcommitted
Replaced call to beamlineget_beam_info with calls to Beam HardwareObject
1 parent fe25a96 commit aee786e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mxcubeweb/core/components/sampleview.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,16 @@ def update_shapes(self, shapes):
285285
# Store pixels per mm for third party software, to facilitate
286286
# certain calculations
287287

288-
beam_info_dict = self.app.beamline.get_beam_info()
289-
290288
shape_data["pixels_per_mm"] = (
291289
HWR.beamline.diffractometer.get_pixels_per_mm()
292290
)
291+
293292
shape_data["beam_pos"] = (
294-
beam_info_dict.get("position")[0],
295-
beam_info_dict.get("position")[1],
293+
HWR.beamline.beam.get_beam_position_on_screen()[0],
294+
HWR.beamline.beam.get_beam_position_on_screen()[1],
296295
)
297-
shape_data["beam_width"] = beam_info_dict.get("size_x", 0)
298-
shape_data["beam_height"] = beam_info_dict.get("size_y", 0)
296+
shape_data["beam_width"] = HWR.beamline.beam.get_value()[0]
297+
shape_data["beam_height"] = HWR.beamline.beam.get_value()[1]
299298

300299
# Shape does not have any refs, create a new Centered position
301300
if not refs:

0 commit comments

Comments
 (0)