CorrectOrbit[] -makes an orbit correction.
CorrectOrbit[orbit-kind,monitor,steer,optics,options]
| option | default | descriptions |
| SetSteer | True | Set calculated steer values after correction. |
| Solver | "LeastSquare" | Type of solver routine. For MICADO method Solver->{"Micado",n}, n is number of correctors. |
| TotalKick | {Null,Null} | Specifies a constraint to the steering strength. TotalKick->{ax,ay} means that the sum of the kick angle should be ax and ay for horizontal and vertical steers, respectively. |
| ZeroSum | False | ZeroSum->True is equivalent to TotalKick->{0,0} |
| TotalDZ | Null | TotalDZ->dz imposes a constraint on the correction that circumference is increased by amount of dz. |
| DN | {Null,Null} | DN->{dnx,dny} imposes a constraint on the correction that the tune is increased by an amount of {dnx,dny}. DTune can be used instead of DN. |
| Tune | {0,0} | A list of tunes {nu-x,nu-y} which is used for a calculation of the response matrix. If tune is zero, that of the input optics is used. |
| Orbit | {} | A list of orbit values that is to be minimized. |
| Calc | True | Calulate a resultant optics and set it in the Twiss buffer. |
| EPS | 1e-8 | Precision in the LinearSolve. Epsilon can be used instead of EPS. |
| Condition | {{},{}} | A list {c,d}, where c is a matrix and d is a vector representing a condition equations that the solution should obeys: c.x==d . More convenient form of Condition option is available: Condition->{{"ZX.1","ZX.2","ZX.3"},{1,-2,1},0}}, for example, where "ZX" is the steer element. This is equivalent to a condition equation ZX.1 - 2*ZX.3 + ZX.3 == 0. |
| Weight | Automatic | A list of weight factors to the monitors. If Automatic Sqrt of beta-function at the monitors is applied. MonitorWeight can be used instead of Weight. |
| CorrectorWeight | Automatic | A list of weight factors to the correctors. Default is unity. |
| ExpectedOrbit | False | Leave an expected orbit in the Twiss buffer after corretion. (ExpectedOrbit->True) overrides the (Calc->True). This option is convenient for OPERATE mode. |
| MomentumCompaction | Null | If not Null, an effect of circumference change is taken into account in the calculation of single-kick response. |
| MomentumCorrection | False | Momentum deviation is used as a corrector variable. If True, resultant momentum-deviation is appended as the last component of the list of kick angle. |
| MomentumWeight | 1 | Relative weight factor for the momentum deviation given in a unit of betabpmbetacorr/etabpm2. Effective if MomentumCorrection->True. |
An example of orbit correction.
(* 1 Save design optics that has no errors, only which is known to us! *)
DesignOptics=CalculateOptics[1,LINE["LENGTH"],Twiss["*",1],FLAG["CELL"],2];
(* Here is a function that displays the orbit *)
o1:=OpticsPlot[{{"BX"},{"BY"},{"DX"},{"DY"}}, ListCoordinate->"S", Names->"Q*"];
(* 2 Define beam position monitors, which are assumed to be attached to every quad *)
bpm=Monitor["Q*"];
(* 3 Define correctors *)
strx=Steer["{BH}*"];
(* 4 Set machine errors and calculate optics and orbit *)
dk 3e-4 {qs}*
delx 3e-4 {qs}* dely 3e-4 {qs}*
dtheta 5e-4 {qs}*
calc
o1; (* .... display orbit before correction *)
(* 5 Make an orbit correction *)
CorrectOrbit["X",bpm,strx,DesignOptics,Tune->Twiss[{"nx","ny"},$$$]/2/Pi];
o1; (* .... display orbit after correction *)