*+ 10/17/2013 sorbit signs of positions and deltacorrectors
and corrector/bpm orientations
Call LSSOL to compute correction angles:
sorbit_ls_lssol(int ncorrectors, int npositions,
float *betacorrectors, float *betapositions,
float *phasecorrectors, float *phasepositions, float tune,
float stepcut, float *positions, float *lbcorrectors, float *ubcorrectors,
float *deltacorrectors, float *predictedpositions, int *lssol_inform)
After deltacorrectors found multiply by stepcut and change sign of angles
(change sign because have solved for angles which move
the orbit from 0 to the positions inputed and we want
the angles which move the beam from the positions inputed
to 0)
stepcutl = -stepcut;
for(ii=0;iidx1[i] = -cor->o1.mm[i];
/* the sign of correction is as such: -1 is to correct 1 mm distortion */
if (pgm.i4[I_DESO]) {
for (i = 0; i < num_bpms[pl]; i++) cor->dx1[i] += cor->deso.mm[i];
}
The signs of the above output correction angles must be reversed.
Fact that for recycler in pa4196(original pa1850) 'sorbit' output deltacorrectors
sign reversed only in horz plane indicate corrector/bpm orientations in horz
is 'norm' whereas vertical is opposite.
- float signs[2] = {-1,1.};
- for (i = 0; i < num_ob_ceds[pl]; i++) cor->dthet[i] *= signs[pl];
IN MI signs[2] = {1,-1.} indicate corrector/bpm orientations in vertical plane
is 'norm' whereas in horz plane is wrong.