simba.Codes.Cheetah package
Submodules
simba.Codes.Cheetah.Cheetah module
SIMBA Cheetah Module
Various objects and functions to handle Cheetah lattices and commands. See Cheetah github for more details.
- Classes:
cheetahLattice: The Cheetah lattice object, used for
converting the
frameworkObjects defined in theframeworkLatticeinto a Cheetah lattice object, and for tracking through it.
- class cheetahLattice(*args, **kwargs)[source]
Bases:
frameworkLatticeClass for defining the Cheetah lattice object, used for converting the
frameworkLatticeinto a Cheetah lattice object, and for tracking through it.- Parameters:
args (
Any)kwargs (
Any)
-
cheetahglobal:
Dict= {} Global settings for Cheetah, read in from cheetahLattice.settings[“global”][“Cheetahsettings”] and cheetah_defaults.yaml
-
code:
str= 'cheetah' String indicating the lattice object type
- hdf5_to_openpmd(prefix='', write=True)[source]
Convert the initial HDF5 particle distribution to OpenPMD format and set
pinaccordingly.- Parameters:
prefix (str) – Prefix for particle file
write (bool) – Flag to indicate whether to save the file
- Return type:
None
-
particle_definition:
str= None Initial particle distribution as a string
-
pin:
Optional[Any] = None Initial particle distribution as a Cheetah `ParticleArray`_
- postProcess()[source]
Convert the outputs from Cheetah to HDF5 format and save them to master_subdir.
- Return type:
None
-
pout:
Optional[Any] = None Final particle distribution as a Cheetah `ParticleArray`_
- preProcess()[source]
Get the initial particle distribution defined in file_block[‘input’][‘prefix’] if it exists.
- Return type:
None
-
ref_idx:
int= None Reference particle index
-
ref_s:
float= None Reference s position
-
screen_threaded_function:
ClassVar[ScatterGatherDescriptor] Function for converting all screen outputs from ELEGANT into the SIMBA generic
beamobject and writing files
-
trackBeam:
bool= True Flag to indicate whether to track the beam
-
tws:
tuple[Tensor,...] |Tensor|None= None Tensor or tuple of Tensors containing Twiss parameters
- write()[source]
Create the lattice object via
writeElements()and save it as a JSON file to master_subdir.- Return type:
None