Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix normalizer #1100

Merged
merged 4 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions siriuspy/siriuspy/magnet/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
used to create magnet normalizers
"""

from ..search import PSSearch as _PSSearch
from ..search import MASearch as _MASearch

from . import util as _mutil
from . import normalizer as _norm
from ..search import MASearch as _MASearch, PSSearch as _PSSearch
from . import normalizer as _norm, util as _mutil


class NormalizerFactory:
Expand Down
8 changes: 4 additions & 4 deletions siriuspy/siriuspy/magnet/normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ def __init__(
self._default_strengths_dipole = None
self._brho = None
self.default_strengths_dipole = default_strengths_dipole # [GeV]
self._maname = _SiriusPVName(maname) if type(maname) == str else maname
self._maname = _SiriusPVName(maname)
self._psnames = _MASearch.conv_maname_2_psnames(self._maname)
self._psmodel = _PSSearch.conv_psname_2_psmodel(self._psnames[0])
self._pstype = _PSSearch.conv_psname_2_pstype(self._psnames[0])
self._psmodel = _PSSearch.conv_psname_2_psmodel(self._psnames[-1])
self._pstype = _PSSearch.conv_psname_2_pstype(self._psnames[-1])
self._magfunc = _PSSearch.conv_pstype_2_magfunc(self._pstype)
self._excdata = _PSSearch.conv_psname_2_excdata(self._psnames[0])
self._excdata = _PSSearch.conv_psname_2_excdata(self._psnames[-1])
self._magnet_conv_sign = magnet_conv_sign
self._mfmult = _MAGFUNCS[self._magfunc]
self._psname = self._power_supplies()[0]
Expand Down
Loading