georges.manzoni.maps package#

Submodules#

georges.manzoni.maps.mad8_combined_dipole module#

georges.manzoni.maps.mad8_combined_dipole.compute_mad_combined_dipole_matrix(element_parameters: list, global_parameters: list) ndarray[source]#
georges.manzoni.maps.mad8_combined_dipole.compute_mad_combined_dipole_tensor(element_parameters: list, global_parameters: list) ndarray[source]#

georges.manzoni.maps.mad8_drift module#

georges.manzoni.maps.mad8_drift.drift2(b1: ndarray, b2: ndarray, length: float)[source]#
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_drift.compute_mad_drift_matrix(element_parameters: list, **_) ndarray[source]#
georges.manzoni.maps.mad8_drift.compute_mad_drift_tensor(element_parameters: list, **_) ndarray[source]#

georges.manzoni.maps.mad8_quadrupole module#

georges.manzoni.maps.mad8_quadrupole.compute_mad_quadrupole_matrix(element_parameters: list, global_parameters: list) ndarray[source]#
georges.manzoni.maps.mad8_quadrupole.compute_mad_quadrupole_tensor(element_parameters: list, global_parameters: list) ndarray[source]#

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_combined_dipole.tmfoc(el, sk1)[source]#
georges.manzoni.maps.madx_combined_dipole.tmsect(fsec, el, h, sk1, sk2, dh, beta, gamma)[source]#

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.madx_thick.track_madx_dipedge(b1, b2, element_parameters: List, global_parameters: List)[source]#
georges.manzoni.maps.madx_thick.track_madx_kicker(b1, b2, element_parameters: List, global_parameters: List)[source]#

georges.manzoni.maps.transport_combined_dipole module#

georges.manzoni.maps.transport_combined_dipole.compute_transport_combined_dipole_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_combined_dipole.compute_transport_combined_dipole_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_combined_dipole_ex module#

georges.manzoni.maps.transport_combined_dipole_ex.compute_transport_combined_dipole_ex_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_combined_dipole_ex.compute_transport_combined_dipole_ex_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_drift module#

georges.manzoni.maps.transport_fringe_in module#

georges.manzoni.maps.transport_fringe_in.compute_transport_fringe_in_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_fringe_in.compute_transport_fringe_in_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_fringe_in_ex module#

georges.manzoni.maps.transport_fringe_in_ex.compute_transport_fringe_in_ex_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_fringe_in_ex.compute_transport_fringe_in_ex_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_fringe_out module#

georges.manzoni.maps.transport_fringe_out.compute_transport_fringe_out_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_fringe_out.compute_transport_fringe_out_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_fringe_out_ex module#

georges.manzoni.maps.transport_fringe_out_ex.compute_transport_fringe_out_ex_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_fringe_out_ex.compute_transport_fringe_out_ex_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_multipole module#

georges.manzoni.maps.transport_multipole.compute_transport_multipole_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_multipole.compute_transport_multipole_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_multipole_ex module#

georges.manzoni.maps.transport_multipole_ex.compute_transport_multipole_ex_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_multipole_ex.compute_transport_multipole_ex_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_quadrupole module#

georges.manzoni.maps.transport_quadrupole.compute_transport_quadrupole_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_quadrupole.compute_transport_quadrupole_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_quadrupole_ex module#

georges.manzoni.maps.transport_quadrupole_ex.compute_transport_quadrupole_ex_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_quadrupole_ex.compute_transport_quadrupole_ex_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_sextupole module#

georges.manzoni.maps.transport_sextupole.compute_transport_sextupole_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_sextupole.compute_transport_sextupole_tensor(element_parameters: List) ndarray[source]#

georges.manzoni.maps.transport_sextupole_ex module#

georges.manzoni.maps.transport_sextupole_ex.compute_transport_sextupole_ex_matrix(element_parameters: List) ndarray[source]#
georges.manzoni.maps.transport_sextupole_ex.compute_transport_sextupole_ex_tensor(element_parameters: List) ndarray[source]#

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.