transfer_matrix_factory module
Provide an easy way to generate TransferMatrix.
- class TransferMatrixFactoryTraceWin(is_3d)[source]
Bases:
TransferMatrixFactoryProvide a method for easy creation of
TransferMatrix.- Parameters:
is_3d (
bool)
- _load_transfer_matrices(path_cal, filename='Transfer_matrix1.dat', high_def=False)[source]
Get the full transfer matrices calculated by TraceWin.
- Parameters:
filename (
str, default:'Transfer_matrix1.dat') – The name of the transfer matrix file produced by TraceWin. The default is"Transfer_matrix1.dat".high_def (
bool, default:False) – To get the transfer matrices at all the solver step, instead at the elements exit only. The default is False. Currently not implemented.path_cal (
str)
- Return type:
- Returns:
element_numbers – Number of the elements.
position_in_m – Position of the elements.
transfer_matrices – Cumulated transfer matrices of the elements.
- run(tm_cumul_in, path_cal, element_to_index)[source]
Load the TraceWin transfer matrix file and create the object.
- Parameters:
tm_cumul_in (
ndarray) – Cumulated transfer matrix at entrance of linac or linac subset.path_cal (
str) – Full path to transfer matrix file.element_to_index (
ELEMENT_TO_INDEX_T) – to doc
- Return type:
- Returns:
The various transfer matrices in the \([x-x']\), \([y-y']\) and \([z-\delta]\) planes.
- _abc_impl = <_abc._abc_data object at 0x7318f9fd3c40>