plot_phase_space
Classes¤
PlotPhaseSpace ¤
PlotPhaseSpace(
run_number,
z_pos="end",
working_dir="",
distribution_file="generator.in",
run_file="photo_track.in",
log_dir="log",
log_file_name="plots_log.log",
console_log=True,
plots_dir="plots",
)
Bases: PlotCore
Source code in plot_analysis/plot_phase_space.py
Functions¤
_charge_density_plot ¤
Prepares the charge density plot.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
p |
str
|
name of the axis (or time), along which to plot the density |
required |
z_pos |
int
|
z position, at which to plot |
required |
Returns:
Type | Description |
---|---|
figure
|
plt.figure: Chare density figure |
Source code in plot_analysis/plot_phase_space.py
_density_plot ¤
Prepares the macroparticle density figure.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
p |
str
|
name of the axis, along which to plot the density |
required |
z_pos |
int
|
z position, at which to plot |
required |
Returns:
Type | Description |
---|---|
figure
|
plt.figure: Macroparticle density figure |
Source code in plot_analysis/plot_phase_space.py
_relative_momentum_plot ¤
Prepares the relative momentum figure.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
p |
str
|
the component of the momentum |
required |
z_pos |
int
|
z position, at which to plot |
required |
Returns:
Type | Description |
---|---|
figure
|
plt.figure: Relative momentum figure |
Source code in plot_analysis/plot_phase_space.py
_transverse_particle_density_plot ¤
Function to build the particle density plot (heatmap) and side histograms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
z_pos |
int
|
z position, at which to plot |
required |
Source code in plot_analysis/plot_phase_space.py
plot ¤
Plots the relative momentum, macroparticle particle densities and charge densities. Main function to use.
Source code in plot_analysis/plot_phase_space.py
plot_charge_density ¤
Plots the charge density along x,y,z axis and along time.
Source code in plot_analysis/plot_phase_space.py
plot_densities ¤
Plots the macroparticle densities along the axes x,y,z.
Source code in plot_analysis/plot_phase_space.py
plot_relative_momentum ¤
Plots the relative momentum in the axes x,y,z.
Source code in plot_analysis/plot_phase_space.py
plot_transverse_particle_density ¤
Plots the transverse particle density at self.z_pos.
Source code in plot_analysis/plot_phase_space.py
prepare_data ¤
Method to prepare the data for plotting.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
run_number |
int
|
number of the run, from which to take the data |
required |
z_pos |
in
|
z position, from which to take the data |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
pd.DataFrame: dataframe containing the prepared data |
Source code in plot_analysis/plot_phase_space.py
save_data ¤
Saves the data to an excel file.
start_3D_plot ¤
Method to start the 3D visualisation in dash.
Source code in plot_analysis/plot_phase_space.py
Created: October 31, 2023