Basic scan analysis¤
Using the plot_analysis/plot_properties.PlotProperties
class (see the example script), the parameter scan can be quickly analyzed and the effect of the scanned parameter on bunch properties plotted. Best used when the plotting script is called automatically after the scan is complete.
Plots directory¤
A plots/
directory will be created in the working directory. Within this plots/
directory, several directories will be created based on how many setup settings were scanned at the same time, to show the dependency of the bunch parameters on this setting. In these directories, the plots are located along with an excel file data.xlsx
containing the data used to create the plots.
The following plots are included:
Active particle ratio_zpos_end.png
plot of the ratio of active (not lost) particles, 1 means no particles were lost in the simulation.Beam size (z_rms)_zpos_end.png
plot of the rms bunch length.energy_spread_zpos_end.png
plot of the rms energy spread.energy_zpos_end.png
plot of the particle energy with the rms energy spread as the error bars.x_emit_zpos_end.png
plot of the rms normalized transverse emittance in the x plane.x_rms_zpos_end.png
plot of the rms transverse bunch size in the x plane.xBar_rms_zpos_end.png
plot of the rms beam divergence in the x plane.y_emit_zpos_end.png
plot of the rms normalized transverse emittance in the y plane.y_rms_zpos_end.png
plot of the rms transverse bunch size in the y plane.yBar_rms_zpos_end.png
plot of the rms beam divergence in the y plane.
Info
The plot name contains the \(z\) coordinate (zpos
). In the case presented above, the bunch parameters were evaluated at the end of the simulation, which is the default setting for most optimization scripts. It can be changed when plotting manually in the plot_analysis/plot_properties.PlotProperties
class definition.
Analysis output file¤
The scan summarizing data that were used for the plotting is saved in the plots directory as an excel (.xlsx
) file. Each simulation run is represented as a row. The columns are described in the table bellow
Column | Description |
---|---|
Index | Index column. |
run |
Run number |
scanning_parameter |
Value of the parameter that was scanned. |
energy |
Bunch energy. |
energy_spread |
Rms energy spread. |
x_emit |
Rms normalized transverse emittance in the x plane. |
y_emit |
Rms normalized transverse emittance in the y plane. |
x_rms |
Rms transverse bunch size in the x plane. |
y_rms |
Rms transverse bunch size in the y plane. |
xBar_rms |
Rms beam divergence in the x plane. |
yBar_rms |
Rms beam divergence in the y plane. |
Active particle ratio |
Ratio of the active particles (those not lost during the simulation). 1 means no particles were lost. |
Beam size (z_rms) |
Rms bunch length. |
The input file can be loaded into python
using the pandas
data analytics library as follows
Created: September 14, 2023