Plotting particles

With Warp, the user has full access to the particle data and can plot the data in most any way imaginable either by using diagnostic functions in Warp or by constructing plots not already defined by retrieving particle data in the interpreter, calculating what is desired, and plotting the results using basic plotting functions. There are many canned routines to plot particle phase-space projections. These routines are written to be flexible and can be accessed as methods of a species instance. The names of the primary plotting routines all start with the prefix "pp" and then have the axis names following.

beam = Species(type=Potassium,charge_state=+1,name="Beam ions (K+)")

beam.ppzx()

will make a projection "scatter" plot of particle x versus z for the beam species. There are also

beam.ppzvz()

to plot the z-vz phase space projection as z versus vz, and

beam.ppxxp()

to plot the x-x' phase space projection as x' = vx/vz versus x. A list of these plots can be found in the scripts file warpplots.py.