envelope_1d module

Define class to compute beam propagation in envelope, 1D, no space-charge.

This solver is fast, but should not be used at low energies.

Almost everything is inherited from the Python version of the solver, Envelope1D.

class CyEnvelope1D(*, reference_phase_policy, default_field_map_folder, beam_kwargs, export_phase, phi_s_definition='historical', n_steps_per_cell, method, **kwargs)[source]

Bases: Envelope1D

The fastest beam calculator, adapted to high energies.

Parameters:
  • reference_phase_policy (Literal['phi_0_abs', 'phi_0_rel', 'phi_s'] | Literal['as_in_original_dat'])

  • default_field_map_folder (Path | str)

  • beam_kwargs (BeamKwargs)

  • export_phase (Literal['phi_0_abs', 'phi_0_rel', 'phi_s'] | Literal['as_in_original_dat'] | Literal['as_in_settings'])

  • phi_s_definition (Literal['historical', 'lagniel'], default: 'historical')

  • n_steps_per_cell (int)

  • method (Literal['RK4', 'leapfrog'])

flag_cython = True
__init__(*, reference_phase_policy, default_field_map_folder, beam_kwargs, export_phase, phi_s_definition='historical', n_steps_per_cell, method, **kwargs)[source]

Set the proper motion integration function, according to inputs.

Parameters:
  • reference_phase_policy (Literal['phi_0_abs', 'phi_0_rel', 'phi_s'] | Literal['as_in_original_dat'])

  • default_field_map_folder (Path | str)

  • beam_kwargs (BeamKwargs)

  • export_phase (Literal['phi_0_abs', 'phi_0_rel', 'phi_s'] | Literal['as_in_original_dat'] | Literal['as_in_settings'])

  • phi_s_definition (Literal['historical', 'lagniel'], default: 'historical')

  • n_steps_per_cell (int)

  • method (Literal['RK4', 'leapfrog'])

Return type:

None

_set_up_specific_factories()[source]

Set up the factories specific to the BeamCalculator.

This method is called in the BeamCalculator.__init__(), hence it appears only in the base BeamCalculator.

Return type:

None

_abc_impl = <_abc._abc_data object at 0x7318faeee880>