Particle diagnostic plot. More...
#include <particlediagplot.hpp>

Public Member Functions | |
ParticleDiagPlot (Frame &frame, const Geometry &geom, const ParticleDataBase &pdb, coordinate_axis_e axis, double level, particle_diag_plot_type_e type, trajectory_diagnostic_e diagx, trajectory_diagnostic_e diagy=DIAG_NONE) | |
Constructor for particle diagnostic plot. More... | |
ParticleDiagPlot (Frame &frame, const Geometry &geom, const ParticleDataBase &pdb, const Vec3D &c, const Vec3D &o, const Vec3D &p, particle_diag_plot_type_e type, trajectory_diagnostic_e diagx, trajectory_diagnostic_e diagy=DIAG_NONE) | |
Constructor for particle diagnostic plot. More... | |
~ParticleDiagPlot () | |
Destructor. More... | |
void | set_emittance_ellipse (bool enable) |
Enable/disable emittance fit for emittance plots? More... | |
bool | get_emittance_ellipse (void) |
Is emittance fit enabled for emittance plots? More... | |
void | set_view (coordinate_axis_e axis, double level) |
Set diagnostic plane. More... | |
void | get_view (coordinate_axis_e &axis, double &level) |
Get diagnostic plane definition if it an even coorinate plane. More... | |
void | set_type (particle_diag_plot_type_e type) |
Set plot type. More... | |
particle_diag_plot_type_e | get_type (void) |
Get plot type. More... | |
void | set_plot (particle_diag_plot_type_e type, trajectory_diagnostic_e diagx, trajectory_diagnostic_e diagy) |
Set plot type and diagnostic axes of plot. More... | |
void | get_plot (particle_diag_plot_type_e &type, trajectory_diagnostic_e &diagx, trajectory_diagnostic_e &diagy) |
Get plot type and diagnostic axes of plot. More... | |
void | set_histogram_n (size_t n) |
Set number of histogram bins in x-direction to use for colormap plot. More... | |
size_t | get_histogram_n (void) |
Get number of histogram bins in x-direction to use for colormap plot. More... | |
void | set_histogram_m (size_t m) |
Set number of histogram bins in y-direction to use for colormap plot. More... | |
size_t | get_histogram_m (void) |
Get number of histogram bins in y-direction to use for colormap plot. More... | |
void | set_histogram_accumulation (histogram_accumulation_e accumulation) |
Set histogram accumulation type. More... | |
histogram_accumulation_e | get_histogram_accumulation (void) |
Get histogram accumulation type. More... | |
void | set_histogram_style (bool style) |
Set 1d histogram style. More... | |
bool | get_histogram_style (void) |
Get 1d histogram style. More... | |
void | set_colormap_interpolation (interpolation_e interpolation) |
Set the type of interpolation used in colormap plot. More... | |
interpolation_e | get_colormap_interpolation (void) |
Get the type of interpolation used in colormap plot. More... | |
const MeshColormap * | get_colormap (void) const |
Get a pointer to histogram in the plot. More... | |
void | set_dot_size (double size) |
Set dot size for scatter plot. More... | |
double | get_dot_size (void) |
Get dot size for scatter plot. More... | |
const Histogram * | get_histogram (void) |
Return a pointer to histogram. More... | |
double | get_isum (void) |
Return total current in diagnostic. More... | |
const Emittance & | calculate_emittance (void) |
Calculate Emittance fit. More... | |
void | export_data (const std::string &filename) |
Export plotted data as ASCII. More... | |
void | build_plot (void) |
Rebuild plot. More... | |
Detailed Description
Particle diagnostic plot.
Two dimensional histograms have particle trajectory currents always taken in account. Similarly profile plot (PARTICLE_DIAG_PLOT_HISTO1D) always takes in account the trajectory current. In cylindrical symmetry cases the output is scaled to have constant area per histogram bin. One dimensional Emittance plots in (r,r') space are scaled to have constant area per histogram bin.
Constructor & Destructor Documentation
◆ ParticleDiagPlot() [1/2]
ParticleDiagPlot::ParticleDiagPlot | ( | Frame & | frame, |
const Geometry & | geom, | ||
const ParticleDataBase & | pdb, | ||
coordinate_axis_e | axis, | ||
double | level, | ||
particle_diag_plot_type_e | type, | ||
trajectory_diagnostic_e | diagx, | ||
trajectory_diagnostic_e | diagy = DIAG_NONE |
||
) |
Constructor for particle diagnostic plot.
Make a diagnostic plot using plotter frame for making a diagnostic at plane axis = level using particle data from pdb in geometry geom. The particle diagnostic is defined by diagnostic type and diagnostic axes diagx and diagy.
The EmittanceConv class is automatically used to convert particle data from cylindrically symmetric simulations if (y,y') or (z,z') plot is requested with plot type PARTICLE_DIAG_PLOT_HISTO2D.
◆ ParticleDiagPlot() [2/2]
ParticleDiagPlot::ParticleDiagPlot | ( | Frame & | frame, |
const Geometry & | geom, | ||
const ParticleDataBase & | pdb, | ||
const Vec3D & | c, | ||
const Vec3D & | o, | ||
const Vec3D & | p, | ||
particle_diag_plot_type_e | type, | ||
trajectory_diagnostic_e | diagx, | ||
trajectory_diagnostic_e | diagy = DIAG_NONE |
||
) |
Constructor for particle diagnostic plot.
Make a diagnostic plot using plotter frame for making a diagnostic at plane defined by center point c and two vectors defining the coordinate axes o and p. The diagnostics is made using particle data from pdb in geometry geom. The particle diagnostic is defined by diagnostic type and diagnostic axes diagx and diagy.
◆ ~ParticleDiagPlot()
ParticleDiagPlot::~ParticleDiagPlot | ( | ) |
Destructor.
Member Function Documentation
◆ build_plot()
void ParticleDiagPlot::build_plot | ( | void | ) |
Rebuild plot.
◆ calculate_emittance()
◆ export_data()
void ParticleDiagPlot::export_data | ( | const std::string & | filename | ) |
Export plotted data as ASCII.
If the plot is a scatter plot, each particle is exported with plotted coordinates and current it is carrying. If the plot is a histogram a grid is outputted with coordinates and current density in grid cells.
◆ get_colormap()
|
inline |
Get a pointer to histogram in the plot.
◆ get_colormap_interpolation()
|
inline |
Get the type of interpolation used in colormap plot.
◆ get_dot_size()
|
inline |
Get dot size for scatter plot.
◆ get_emittance_ellipse()
|
inline |
Is emittance fit enabled for emittance plots?
◆ get_histogram()
|
inline |
Return a pointer to histogram.
Histogram might not exist in the plot object.
◆ get_histogram_accumulation()
|
inline |
Get histogram accumulation type.
◆ get_histogram_m()
|
inline |
Get number of histogram bins in y-direction to use for colormap plot.
◆ get_histogram_n()
|
inline |
Get number of histogram bins in x-direction to use for colormap plot.
◆ get_histogram_style()
|
inline |
Get 1d histogram style.
◆ get_isum()
|
inline |
Return total current in diagnostic.
No mirroring applied to returned current.
◆ get_plot()
|
inline |
Get plot type and diagnostic axes of plot.
◆ get_type()
|
inline |
Get plot type.
◆ get_view()
|
inline |
Get diagnostic plane definition if it an even coorinate plane.
◆ set_colormap_interpolation()
|
inline |
Set the type of interpolation used in colormap plot.
◆ set_dot_size()
|
inline |
Set dot size for scatter plot.
◆ set_emittance_ellipse()
|
inline |
Enable/disable emittance fit for emittance plots?
◆ set_histogram_accumulation()
|
inline |
Set histogram accumulation type.
◆ set_histogram_m()
|
inline |
Set number of histogram bins in y-direction to use for colormap plot.
◆ set_histogram_n()
|
inline |
Set number of histogram bins in x-direction to use for colormap plot.
◆ set_histogram_style()
|
inline |
Set 1d histogram style.
◆ set_plot()
|
inline |
Set plot type and diagnostic axes of plot.
◆ set_type()
|
inline |
Set plot type.
◆ set_view()
|
inline |
Set diagnostic plane.
The documentation for this class was generated from the following files: