TrajectoryCorrection#

class orbit.py_linac.orbit_correction.TrajectoryCorrection(lattice, start_node=None, stop_node=None)[source]#

Bases: object

Class to perform correction of the trajectory in the linac type lattice or in the part of it. To correct trajectories the Linac DCorrectorH and DCorrectorV objects will be used. The trajectory is defined by BPMs nodes that specifically defined for this trajectory correction. The correction algorithm will build response matrix for correctors (assuming no tilt) and apply the correctors field to provide the best correction to the target values for each BPM. By default the goal for all BPMs is 0., but user can redefine these values and set of BPMs. User also can redefine what dipole correctors will be used.

Methods Summary

calculateTrajectory(bunch_init[, print_info])

It tracks bunch with one particle through the lattice and fills out the BPM data in self.transvBPM_arr Returns arrays of x,y corrdinates of the bunch in (pm_value_hor_arr,bpm_value_ver_arr) tuple.

cleanBPM_Nodes()

Removes TransverseBPM child nodes from BPM nodes

cleanQuad_Nodes()

Removes TransverseBPM child nodes from Quad nodes

correctTrajectory(bunch_initial)

This method will calculate and applyes fields to dipole correctors to achive minimal beam deviation from the center at all BPMs.

getBPMs()

Returns array of bpm nodes.

getDCHs()

Returns DCorrectorHs array

getDCVs()

Returns DCorrectorVs array

getQuadTransverseBPMs()

getQuads()

Returns Quads array

getTransverseBPMforBPM(bpm)

Retuns the TransverseBPM instance for particular BPM.

getTransverseBPMs()

makeOneParticleBunch(bunch_init)

Returns the bunch with one particle which coordinates are equal to the average coordinates in the initial bunch.

setBPMs(bpms)

Sets custom bpm array for analysis.

setDCHs(dchs)

Sets the DCorrectorHs

setDCVs(dcvs)

Sets the DCorrectorVs

setQuads(quads)

Sets Quads

setStartStopNodes([start_node, stop_node])

Methods Documentation

calculateTrajectory(bunch_init, print_info=False)[source]#

It tracks bunch with one particle through the lattice and fills out the BPM data in self.transvBPM_arr Returns arrays of x,y corrdinates of the bunch in (pm_value_hor_arr,bpm_value_ver_arr) tuple.

cleanBPM_Nodes()[source]#

Removes TransverseBPM child nodes from BPM nodes

cleanQuad_Nodes()[source]#

Removes TransverseBPM child nodes from Quad nodes

correctTrajectory(bunch_initial)[source]#

This method will calculate and applyes fields to dipole correctors to achive minimal beam deviation from the center at all BPMs. LSQM method is used.

getBPMs()[source]#

Returns array of bpm nodes.

getDCHs()[source]#

Returns DCorrectorHs array

getDCVs()[source]#

Returns DCorrectorVs array

getQuadTransverseBPMs()[source]#
getQuads()[source]#

Returns Quads array

getTransverseBPMforBPM(bpm)[source]#

Retuns the TransverseBPM instance for particular BPM.

getTransverseBPMs()[source]#
makeOneParticleBunch(bunch_init)[source]#

Returns the bunch with one particle which coordinates are equal to the average coordinates in the initial bunch.

setBPMs(bpms)[source]#

Sets custom bpm array for analysis. In reality they can be any nodes. Returns array of bpm nodes.

setDCHs(dchs)[source]#

Sets the DCorrectorHs

setDCVs(dcvs)[source]#

Sets the DCorrectorVs

setQuads(quads)[source]#

Sets Quads

setStartStopNodes(start_node=None, stop_node=None)[source]#