Skip to content

Commit

Permalink
Trajectory correction inverts the response matrix internally (#51)
Browse files Browse the repository at this point in the history
* Simplifying function signatures 

* More PEP-8 compliant names
  • Loading branch information
lmalina authored Jan 24, 2024
1 parent 6bd2d5f commit d1208c7
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 188 deletions.
6 changes: 3 additions & 3 deletions pySC/correction/bba.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pySC.core.constants import TRACK_TBT, NUM_TO_AB, SETTING_REL, SETTING_ABS
from pySC.utils.stats import weighted_mean, weighted_error, effective_sample_size, weights_from_errors
from pySC.utils.at_wrapper import atgetfieldvalues, findspos
from pySC.correction.orbit_trajectory import SCfeedbackRun
from pySC.correction import orbit_trajectory


LOGGER = logging_tools.get_logger(__name__)
Expand Down Expand Up @@ -344,8 +344,8 @@ def _get_orbit_bump(SC, cm_ord, bpm_ord, n_dim, par): # TODO
W0[n_dim, max(1, tmpBPMind - par.orbBumpWindow):(tmpBPMind - 1)] = 0
W0[n_dim, (tmpBPMind + 1):min(len(par.RMstruct.BPMords), tmpBPMind + par.orbBumpWindow)] = 0

CUR = SCfeedbackRun(SC, par.RMstruct.MinvCO, reference=R0, CMords=cm_ords, BPMords=par.RMstruct.BPMords, eps=1E-6,
target=0, maxsteps=50, scaleDisp=par.RMstruct.scaleDisp, )
CUR = orbit_trajectory.correct(SC, par.RMstruct.RM, reference=R0, cm_ords=cm_ords, bpm_ords=par.RMstruct.BPMords, eps=1E-6,
target=0, maxsteps=50, scaleDisp=par.RMstruct.scaleDisp, )
cm_vec = []
factor = np.linspace(-1, 1, par.n_steps)
for n_dim in range(2):
Expand Down
Loading

0 comments on commit d1208c7

Please sign in to comment.