beam_calculation.envelope_1d.transfer_matrices_c module
This module holds the same functions as transfer_matrices_p
, but in Cython.
Cython needs to be compiled to work. Check the instructions in setup.py
.
Todo
I think that this module could be greatly enhanced. I am not a Cython specialist and suggestions are welcome.
Todo
Field maps better to create the transfer matrix in one passage at the end?
Todo
the passing of the field maps is not clean at all
- init_arrays(filepaths)
Initialize electric fields for efficiency.
- z_bend(gamma_in, delta_s, factor_1, factor_2, factor_3)
- z_drift(gamma_in, delta_s, n_steps=1)
Calculate the transfer matrix of a drift.
- z_field_map_leapfrog(gamma_in, d_z, n_steps, omega0_rf, k_e, phi_0_rel, section_idx, **kwargs)
Calculate the transfer matrix of a field map using leapfrog.
- z_field_map_rk4(gamma_in, d_z, n_steps, omega0_rf, k_e, phi_0_rel, **kwargs)
Calculate the transfer matrix of a field map using Runge-Kutta.