Public Member Functions | List of all members
ParticleDiagPlot Class Reference

Particle diagnostic plot. More...

#include <particlediagplot.hpp>

Inheritance diagram for ParticleDiagPlot:
ParticleDiagPlotter

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 Colormapget_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 Histogramget_histogram (void)
 Return a pointer to histogram.
const Emittancecalculate_emittance (void)
 Calculate Emittance fit.
void export_data (const std::string &filename)
 Export plotted data as ASCII.
void build_plot (void)
 Rebuild plot.

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::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.

Member Function Documentation

void ParticleDiagPlot::build_plot ( void  )

Rebuild plot.

const Emittance& ParticleDiagPlot::calculate_emittance ( void  )

Calculate Emittance fit.

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.

const Colormap* ParticleDiagPlot::get_colormap ( void  ) const
inline

Get a pointer to histogram in the plot.

interpolation_e ParticleDiagPlot::get_colormap_interpolation ( void  )
inline

Get the type of interpolation used in colormap plot.

double ParticleDiagPlot::get_dot_size ( void  )
inline

Get dot size for scatter plot.

bool ParticleDiagPlot::get_emittance_ellipse ( void  )
inline

Is emittance fit enabled for emittance plots?

const Histogram* ParticleDiagPlot::get_histogram ( void  )
inline

Return a pointer to histogram.

Histogram might not exist in the plot object.

size_t ParticleDiagPlot::get_histogram_m ( void  )
inline

Get number of histogram bins in y-direction to use for colormap plot.

size_t ParticleDiagPlot::get_histogram_n ( void  )
inline

Get number of histogram bins in x-direction to use for colormap plot.

void ParticleDiagPlot::get_plot ( particle_diag_plot_type_e type,
trajectory_diagnostic_e diagx,
trajectory_diagnostic_e diagy 
)
inline

Get plot type and diagnostic axes of plot.

particle_diag_plot_type_e ParticleDiagPlot::get_type ( void  )
inline

Get plot type.

void ParticleDiagPlot::get_view ( coordinate_axis_e axis,
double &  level 
)
inline

Get diagnostic plane definition if it an even coorinate plane.

void ParticleDiagPlot::set_colormap_interpolation ( interpolation_e  interpolation)
inline

Set the type of interpolation used in colormap plot.

void ParticleDiagPlot::set_dot_size ( double  size)
inline

Set dot size for scatter plot.

void ParticleDiagPlot::set_emittance_ellipse ( bool  enable)
inline

Enable/disable emittance fit for emittance plots?

void ParticleDiagPlot::set_histogram_m ( size_t  m)
inline

Set number of histogram bins in y-direction to use for colormap plot.

void ParticleDiagPlot::set_histogram_n ( size_t  n)
inline

Set number of histogram bins in x-direction to use for colormap plot.

void ParticleDiagPlot::set_plot ( particle_diag_plot_type_e  type,
trajectory_diagnostic_e  diagx,
trajectory_diagnostic_e  diagy 
)
inline

Set plot type and diagnostic axes of plot.

void ParticleDiagPlot::set_type ( particle_diag_plot_type_e  type)
inline

Set plot type.

void ParticleDiagPlot::set_view ( coordinate_axis_e  axis,
double  level 
)
inline

Set diagnostic plane.


The documentation for this class was generated from the following file: