ocelot.adaptors.genesis4
¶
Module Contents¶
Classes¶
Genesis input files storage object |
|
Genesis particle *.dpa files storage object |
|
Genesis input files storage object |
Functions¶
|
Returns MpiLauncher() object for given program |
|
Main function for executing Genesis code |
|
Reads Genesis1.3 v4 output file with the link to the hdf5 file as out.h5 |
|
Reads Genesis1.3 v4 radiation output file |
|
Writes ocelot.optics.wave.RadiationField object to Genesis1.3 v4 radiation file |
|
Reads Genesis1.3 v4 particle output file |
|
Convert Genesis1.3 v4 particle output file to ocelot edist object |
|
|
|
|
|
|
|
-
ocelot.adaptors.genesis4.
h5py_avail
= True¶
-
ocelot.adaptors.genesis4.
_logger
¶
-
ocelot.adaptors.genesis4.
_inputGen4Template
¶ -
:annotation: = $newrun
-
aw0 = __AW0__
-
xkx = __XKX__
-
class
ocelot.adaptors.genesis4.
Namespace
¶
-
class
ocelot.adaptors.genesis4.
Genesis4ParticlesDump
¶ Genesis particle *.dpa files storage object Each particle record in z starts with the energy of all particles followed by the output of the particle phases, positions in x and y and the momenta in x and y. The momenta are normalized to mc
-
fileName
(self)¶
-
-
class
ocelot.adaptors.genesis4.
Genesis4Output
¶ Genesis input files storage object
-
close
(self)¶
-
property
filePath
(self)¶
-
fileName
(self)¶
-
property
nZ
(self)¶
-
property
nSlices
(self)¶
-
property
lambdaref
(self)¶
-
property
phenref
(self)¶
-
property
I
(self)¶
-
property
beam_charge
(self)¶
-
property
rad_power
(self)¶
-
property
rad_energy
(self)¶
-
property
n_photons
(self)¶
-
property
t
(self)¶
-
rad_field
(self, zi=None, loc='near')¶
-
calc_spec
(self, zi=None, loc='near', npad=1, estimate_ph_sp_dens=1)¶
-
wig
(self, z=np.inf)¶
-
close
(self)¶
-
-
ocelot.adaptors.genesis4.
get_genesis4_launcher
(launcher_program='genesis4', launcher_argument='')¶ Returns MpiLauncher() object for given program
-
ocelot.adaptors.genesis4.
run_genesis4
(inp, launcher, *args, **kwargs)¶ Main function for executing Genesis code inp - GenesisInput() object with genesis input parameters launcher - MpiLauncher() object obtained via get_genesis_launcher() function
-
ocelot.adaptors.genesis4.
read_gout4
(filePath)¶ Reads Genesis1.3 v4 output file with the link to the hdf5 file as out.h5 to close the file, use out.h5.close()
- Parameters
filePath – string, absolute path to .out file
- Returns
Genesis4Output
-
ocelot.adaptors.genesis4.
read_dfl4
(filePath)¶ Reads Genesis1.3 v4 radiation output file
- Parameters
filePath – string, absolute path to .fld file
- Returns
RadiationField
-
ocelot.adaptors.genesis4.
write_dfl4
(dfl: RadiationField, file_path='sample.dfl.h5')¶ Writes ocelot.optics.wave.RadiationField object to Genesis1.3 v4 radiation file
- Parameters
dfl – ocelot.optics.wave.RadiationField object
file_path – path to .dfl file (file will be generate, or data will be rewritten)
- Returns
-
ocelot.adaptors.genesis4.
read_dpa4
(filePath, start_slice=0, stop_slice=np.inf, estimate_npart=0)¶ Reads Genesis1.3 v4 particle output file
- Parameters
filePath – string, absolute path to .par file
- Returns
Genesis4ParticlesDump
-
ocelot.adaptors.genesis4.
dpa42edist
(dpa, n_part=None, fill_gaps=False)¶ Convert Genesis1.3 v4 particle output file to ocelot edist object
- Parameters
dpa – GenesisParticlesDump
n_part – desired approximate number of particles in edist
fill_gaps – dublicates buckets into gaps
- Returns
GenesisElectronDist
-
ocelot.adaptors.genesis4.
read_dpa42parray
(filePath, N_part=None, fill_gaps=True)¶
-
ocelot.adaptors.genesis4.
write_gen4_lat
(lat, filePath, line_name='LINE', l=np.inf)¶
-
ocelot.adaptors.genesis4.
write_edist_hdf5
(edist, filepath)¶
-
ocelot.adaptors.genesis4.
read_edist_hdf5
(filepath, charge=None)¶