scripts_shorthands module

Define several helper functions.

Todo

Should they be in a module somewhere?

compute_beam(beam_calculator: BeamCalculator, config_files: dict[str, Any]) tuple[Accelerator, SimulationOutput]

Create the Accelerator and compute beam in it.

Parameters:
  • beam_calculator (BeamCalculator) – Solver to use.

  • config_files (dict[str, Any]) – Holds info on file input/output.

Returns:

An accelerator with its SimulationOutput.

Return type:

Accelerator

compute_beams(beam_calculators: Collection[BeamCalculator], config_files: dict[str, Any]) tuple[list[Accelerator], list[SimulationOutput]]

Propagate beam with all BeamCalculator.