ocelot.cpbd.orbit_correction
¶
Module Contents¶
Classes¶
Iterative method based on CERN-ISR-MA/73-17, 1973. |
|
Functions¶
|
|
|
|
|
|
|
|
|
|
|
-
ocelot.cpbd.orbit_correction.
logger
¶
-
class
ocelot.cpbd.orbit_correction.
OrbitSVD
(epsilon_x=0.001, epsilon_y=0.001)¶ -
apply
(self, resp_matrix, orbit, weights=None)¶
-
-
class
ocelot.cpbd.orbit_correction.
MICADO
(epsilon_x=0.001, epsilon_y=0.001, epsilon_ksi=1e-05)¶ Bases:
ocelot.cpbd.orbit_correction.OrbitSVD
Iterative method based on CERN-ISR-MA/73-17, 1973. Strategy: 1. each corrector is tested singly. For each corrector we have residual vector: r = b + A * x.
Corrector (x_j) and column A_j (response matrix) which correspond to minimum residual are exchanged with first position.
- Two correctors are tested. the first one which is defined from step 1 and second one iteratively is tested
j = 2, … n
The iteration is stopped when the peak-to-peak amplitude of the residual vector is smaller than a fixed value given in advance.
-
static
swap_columns
(m, col1, col2)¶ method to swap columns in matrix m :param m: matrix :param col1: index :param col2: index :return:
-
solver_svd
(self, resp_matrix, orbit, weights)¶
-
solver_lstsq
(self, resp_matrix, orbit, weights)¶
-
apply
(self, resp_matrix, orbit, weights=None)¶
-
class
ocelot.cpbd.orbit_correction.
LInfinityNorm
(epsilon_x=0.001, epsilon_y=0.001)¶ Bases:
ocelot.cpbd.orbit_correction.OrbitSVD
-
apply
(self, resp_matrix, orbit, weights=None)¶
-
-
class
ocelot.cpbd.orbit_correction.
Orbit
(lattice, rm_method=None, disp_rm_method=None, empty=False)¶ Bases:
object
-
setup_response_matrix
(self)¶
-
setup_disp_response_matrix
(self)¶
-
create_bpms
(self, bpm_list=None)¶ Search bpm in the lattice and create list of bpms :param lattice: class MagneticLattice :return: self.bpms - list of BPMs (class BPM)
-
create_correctors
(self, cor_list=None)¶ Search correctors (horizontal and vertical) in the lattice and create list of hcors and list of vcors :param lattice: class MagneticLattice :return:
-
get_ref_orbit
(self)¶
-
get_orbit
(self)¶
-
get_dispersion
(self)¶
-
combine_matrices
(self, mat1, mat2)¶ - Parameters
mat1 –
mat2 –
- Returns
-
correction
(self, alpha=0, beta=0, p_init=None, print_log=True)¶ Method to find corrector kicks using SVD. bpm weights are ignored for a moment but everything ready to immplement.
- Parameters
alpha – 0 - 1, trade off between orbit and dispersion correction, 0 - only orbit, 1 - only dispersion
epsilon_x – cut s-matrix diag for x-plane, if s[i] < s_max * epsilon: s_inv[i] = 0. else s_inv[i] = 1/s[i]
epsilon_y – cut s-matrix diag for y-plane, if s[i] < s_max * epsilon: s_inv[i] = 0. else s_inv[i] = 1/s[i]
beta – weight for suppress large kicks
p_init – particle initial conditions. Removed in that version.
print_log –
- Returns
-
-
class
ocelot.cpbd.orbit_correction.
NewOrbit
(lattice, rm_method=None, disp_rm_method=None, empty=False)¶
-
ocelot.cpbd.orbit_correction.
change_corrector
(corrector, lattice)¶
-
ocelot.cpbd.orbit_correction.
restore_corrector
(corrector, lattice)¶
-
ocelot.cpbd.orbit_correction.
change_quad_position
(quad, lattice, dx=0.0, dy=0.0)¶
-
ocelot.cpbd.orbit_correction.
measure_response_matrix
(orbit, lattice)¶
-
ocelot.cpbd.orbit_correction.
quad_response_matrix
(orbit, lattice)¶
-
ocelot.cpbd.orbit_correction.
elem_response_matrix
(orbit, lattice, p_init, elem_types, remove_elem)¶