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. | |
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. | |
~ParticleDiagPlot () | |
Destructor. | |
void | set_emittance_ellipse (bool enable) |
Enable/disable emittance fit for emittance plots? | |
bool | get_emittance_ellipse (void) |
Is emittance fit enabled for emittance plots? | |
void | set_view (coordinate_axis_e axis, double level) |
Set diagnostic plane. | |
void | get_view (coordinate_axis_e &axis, double &level) |
Get diagnostic plane definition if it an even coorinate plane. | |
void | set_type (particle_diag_plot_type_e type) |
Set plot type. | |
particle_diag_plot_type_e | get_type (void) |
Get plot type. | |
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. | |
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. | |
void | set_histogram_n (size_t n) |
Set number of histogram bins in x-direction to use for colormap plot. | |
size_t | get_histogram_n (void) |
Get number of histogram bins in x-direction to use for colormap plot. | |
void | set_histogram_m (size_t m) |
Set number of histogram bins in y-direction to use for colormap plot. | |
size_t | get_histogram_m (void) |
Get number of histogram bins in y-direction to use for colormap plot. | |
void | set_colormap_interpolation (interpolation_e interpolation) |
Set the type of interpolation used in colormap plot. | |
interpolation_e | get_colormap_interpolation (void) |
Get the type of interpolation used in colormap plot. | |
const Colormap * | get_colormap (void) const |
Get a pointer to histogram in the plot. | |
void | set_dot_size (double size) |
Set dot size for scatter plot. | |
double | get_dot_size (void) |
Get dot size for scatter plot. | |
const Histogram * | get_histogram (void) |
Return a pointer to histogram. | |
const Emittance & | calculate_emittance (void) |
Calculate Emittance fit. | |
void | export_data (const std::string &filename) |
Export plotted data as ASCII. | |
void | build_plot (void) |
Rebuild plot. |
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.
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.
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 | ( | ) |
Destructor.
void ParticleDiagPlot::build_plot | ( | void | ) |
Rebuild plot.
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.
|
inline |
Get a pointer to histogram in the plot.
|
inline |
Get the type of interpolation used in colormap plot.
|
inline |
Get dot size for scatter plot.
|
inline |
Is emittance fit enabled for emittance plots?
|
inline |
Return a pointer to histogram.
Histogram might not exist in the plot object.
|
inline |
Get number of histogram bins in y-direction to use for colormap plot.
|
inline |
Get number of histogram bins in x-direction to use for colormap plot.
|
inline |
Get plot type and diagnostic axes of plot.
|
inline |
Get plot type.
|
inline |
Get diagnostic plane definition if it an even coorinate plane.
|
inline |
Set the type of interpolation used in colormap plot.
|
inline |
Set dot size for scatter plot.
|
inline |
Enable/disable emittance fit for emittance plots?
|
inline |
Set number of histogram bins in y-direction to use for colormap plot.
|
inline |
Set number of histogram bins in x-direction to use for colormap plot.
|
inline |
Set plot type and diagnostic axes of plot.
|
inline |
Set plot type.
|
inline |
Set diagnostic plane.