georges.manzoni.maps package#
Submodules#
georges.manzoni.maps.mad8_combined_dipole module#
georges.manzoni.maps.mad8_drift module#
- georges.manzoni.maps.mad8_drift.drift4(b1: ndarray, b2: ndarray, kargs: ndarray)[source]#
Performance tests on MBP i9 show that the explicit loop is faster, both at compile-time and at runtime than the nb broadcast variant.
- Parameters:
b1 – a numpy array containing all the particles
b2 – explicit destination for the result
kargs – the drift length (in meters)
- Returns:
the destination (result) array
- georges.manzoni.maps.mad8_drift.drift5(b1: ndarray, b2: ndarray, kargs: ndarray)[source]#
Performance tests on MBP i9 show that the explicit loop is faster, both at compile-time and at runtime than the nb broadcast variant.
- Parameters:
b1 – a numpy array containing all the particles
b2 – explicit destination for the result
kargs – the drift length (in meters)
- Returns:
the destination (result) array
- georges.manzoni.maps.mad8_drift.drift6(b1: ndarray, b2: ndarray, length: float)[source]#
Note
Performance tests on MBP i9 show that the explicit loop is faster, both at compile-time and at runtime
than the nb broadcast variant.
- Parameters:
b1 – a numpy array containing all the particles
b2 – explicit destination for the result
length – the drift length (in meters)
- Returns:
the destination (result) array
georges.manzoni.maps.mad8_quadrupole module#
georges.manzoni.maps.madx_combined_dipole module#
This code is from MAD-X twiss.f90. It is used to allow comparisons between the MAD-X tensor and the generated code for MAD8 or Transport style tensor computation.
georges.manzoni.maps.madx_thick module#
- georges.manzoni.maps.madx_thick.track_madx_srotation(b1, b2, element_parameters: List, global_parameters: List)[source]#
- Parameters:
b1 –
b2 –
element_parameters –
global_parameters –
Returns:
- georges.manzoni.maps.madx_thick.track_madx_drift(b1, b2, element_parameters: List, global_parameters: List)[source]#
Track through a drift. This methods follows directly from the method implemented in MAD-X.
Note
From MAD-X: ttdrf in trrun.f90
- Parameters:
b1 –
b2 –
element_parameters –
global_parameters –
Returns:
- georges.manzoni.maps.madx_thick.track_madx_drift_paraxial(b1, b2, element_parameters: List, global_parameters: List)[source]#
Track through a drift using the paraxial approximation. Not used by MAD-X.
- Parameters:
b1 –
b2 –
element_parameters –
global_parameters –
Returns:
- georges.manzoni.maps.madx_thick.track_madx_quadrupole(b1, b2, element_parameters: List, global_parameters: List)[source]#
Track through a (thick) quadrupole. This methods follows directly from the method implemented in MAD-X.
The Hamiltonian is
H = (1/2) K1 x^2 + (1/2) px^2/(delta + 1)
Note
From MAD-X: ttcfd in trrun.f90
- Parameters:
b1 –
b2 –
element_parameters –
global_parameters –
Returns:
- georges.manzoni.maps.madx_thick.track_madx_bend(b1, b2, element_parameters: List, global_parameters: List)[source]#
Track through a (thick) combined function bend. This methods follows directly from the method implemented in MAD-X.
Note
From MAD-X: ttcfd in trrun.f90
- Parameters:
b1 –
b2 –
element_parameters –
global_parameters –
Returns:
georges.manzoni.maps.transport_combined_dipole module#
georges.manzoni.maps.transport_combined_dipole_ex module#
georges.manzoni.maps.transport_drift module#
georges.manzoni.maps.transport_fringe_in module#
georges.manzoni.maps.transport_fringe_in_ex module#
georges.manzoni.maps.transport_fringe_out module#
georges.manzoni.maps.transport_fringe_out_ex module#
georges.manzoni.maps.transport_multipole module#
georges.manzoni.maps.transport_multipole_ex module#
georges.manzoni.maps.transport_quadrupole module#
georges.manzoni.maps.transport_quadrupole_ex module#
georges.manzoni.maps.transport_sextupole module#
georges.manzoni.maps.transport_sextupole_ex module#
Module contents#
The maps submodule contains the physics of the propagation of the particles through each of the beamline elements described in the elements submodule. For each element, a first and second-order type propagation is implemented, allowing the user to select the order of the tracking that is suitable for his specific application. It is done via the selection of the integrator type when building the beamline (see later). The Transport-type, MadX-type, and Mad8-type maps are implemented and available. The user should be aware that the canonical variables of the particles are not the same for the three different integrator types, so the definition of the beam must be done according to the integrator to be consistent.