simba.Codes.OPAL package

Submodules

simba.Codes.OPAL.OPAL module

class opalLattice(*args, **kwargs)[source]

Bases: frameworkLattice

Class for defining the GPT lattice object, used for converting the frameworkLattice into a string representation of the lattice suitable for an OPAL input file.

Parameters:
  • args (Any)

  • kwargs (Any)

breakstr: str = '//----------------------------------------------------------------------------'

String used for separating headers in the input file

code: str = 'opal'

String indicating the lattice object type

hdf5_to_opal()[source]
headers: Dict = {}

Section headers for OPAL input file

maxsteps: int = 1000000

Maximum number of steps for tracking; will be set dynamically once the lattice is parsed

particle_definition: str = None

Name of initial particle distribution

postProcess()[source]
preProcess()[source]

Pre-process the lattice before running the simulation. This method initializes the initial Twiss parameters by calling the getInitialTwiss method.

Return type:

None

ref_idx: int = None

Reference particle index

ref_s: float = None

Reference s position

run()[source]

Run the code with input ‘filename’

property space_charge_mode: str | None

Get the space charge mode based on globalSettings or file_block.

Returns:

Space charge mode as string, or None if not provided.

Return type:

str

time_step_size: float = 2e-12

Step size for tracking

version: str = '202210'

Version of OPAL

write()[source]
update_globals(global_settings, beamlen=None, sample_interval=1)[source]

Module contents