Skip to content

Commit

Permalink
return refined beamcenter result
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjlevin committed Sep 4, 2024
1 parent eb65c16 commit 8e8b6db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PyHyperScattering/BeamCentering.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,7 @@ def refine_geometry(self, energy, q_min, q_max,
print(f'Optimization successful. Updating beamcenter to ({res.x[0]},{res.x[1]}), old values were ({self._obj.poni1},{self._obj.poni2})')
self._obj.attrs['poni1'] = res.x[0]
self._obj.attrs['poni2'] = res.x[1]

return res
else:
warnings.warn('Optimization was unsuccessful. Try new guesses and start again')

0 comments on commit 8e8b6db

Please sign in to comment.