Skip to content

Commit

Permalink
Explicitly import used libs from 'mathphys'.
Browse files Browse the repository at this point in the history
This makes the code that uses siriuspy less restricted to some
dependencies, such as h5py.
  • Loading branch information
gustavosr8 committed Mar 6, 2025
1 parent ba8acb8 commit e04a0ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions siriuspy/siriuspy/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import epics as _epics

from mathphys import beam_optics as _beam
from mathphys.beam_optics import beam_rigidity as _beam_rigidity
from siriuspy import envars as _envars


Expand Down Expand Up @@ -134,7 +134,7 @@ def configure_log_file(stream=None, filename=None, debug=False):

def beam_rigidity(energy):
"""Return beam rigidity, beta amd game, given its energy [GeV]."""
brho, _, beta, gamma, _ = _beam.beam_rigidity(energy=energy)
brho, _, beta, gamma, _ = _beam_rigidity(energy=energy)
return brho, beta, gamma


Expand Down

0 comments on commit e04a0ac

Please sign in to comment.