Skip to content

Commit

Permalink
Improved get_beam_definer
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-oscarsson committed Apr 12, 2018
1 parent 4fc8895 commit 54a85c3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mxcube3/routes/beamlineutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ def get_aperture():


def get_beam_definer():
bd = mxcube.beamline.getObjectByRole("beam_info").beam_definer_hwobj or \
mxcube.beamline.getObjectByRole("beam_info").aperture_hwobj
beam_info_ho = mxcube.beamline.getObjectByRole("beam_info")

return bd
if hasattr(beam_info_ho, "beam_definer_hwobj"):
bd = beam_info_ho.beam_definer_hwobj
else:
bd = beam_info_ho.aperture_hwobj

return bd


def get_viewport_info():
Expand Down

0 comments on commit 54a85c3

Please sign in to comment.