You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »

Z-plots are plots of the values of beamline elements (y axis), plotted with respect to their longitudinal position in the beamline (x-axis). It's called a Z-plot because of the coordinate system used in accelerators, where Z is the longitudinal axis of the beamline. So Z position is plotted on the x-axis - yes I know it sounds confusing but it really is simple.

See example below.

Getting a z-plot

There are 2 ways: use the basic scripts, or use the canned plots and EDM interface:

Z-plot scripts

There are two scripts which can be used to get z-plots. One is for modeled devices (plotz) and the other is for devices that have no model (plotz_devices):

$ plotz QUAD EACT                            ! Plots all QUADs' EACT by Z.
$ plotz '(.cor|quad):(in20|li2[1-5])' bdes   ! Plots BDES of all quads and correctors

$ plotz_devices -l VGXX:% P                  ! Plots all combined Vacuum Guages (on a log plot)
$ plotz_devices -l PICM:LTU%:% P1_LOSS       ! All the PICM P1_LOSSes in the LTU

Note that they differ in two important respects: plotz can take a full regular expression, plotz_devices can't (plotz_devices can take only a pattern with a '%' wildcard).

Put regular expressions in quotes. This stop the unix shell from trying to interpret it.

Zplot plots

An example of all the EACT (Estimated Energy) at each Quadrupole (QUAD) in the 52SL2 beamline. This was generated by plotz -b 52 QUAD EACT.

Zooming, unzooming, logs, rulers etc.

See the top left of the plot for help with zooming (MB3) and unzoom (hit 'a'), log plotting, toggling the grid and toggling ruler mode.

Defining what to z-plot

For modelled devices, you can supply any part of the device you want to match, with a regular expression. For instance "QUAD BDES" is enough because QUAD will match in the "type" part of the name.

See here for a cheat sheet to regular expressions regular-expressions-cheat-sheet-v1.pdf.

For unmodelled devices, you can't use regular expressions, but you can use the simpler "%" wildcard (not "*" because * would be interpreted by the shell). For instance, to get all the vacuum gauge settings, use "VGXX:%".

(Why can only plotz take a regular expression?
Answer: Because plotz sources its list of devices from an aida acquisition of the beamline model, so that it can get area and Z data. It can then parse this beamline with a regular expression. But plotz_devices has to use aidalist to get a list of all devices (since they're not modelled and therefore not in a formal list of beamline device), and aidalist, being an Oracle query, takes only the % wildcard. aidalist could take a regular expression too, and pass that on to Oracle to perform the search, but performance tests found that Oracle takes ~40 seconds to do a regular expression search on AIDA_NAMES, wheres it can do a simple wildcard in <1 second)

EDM screens and canned z-plots

A number of predefined Z-plots are available from EDM panels off lclshome.

(locations to be inserted)

To close a plot window, please set focus to the "Z-plot" window, and hit Enter. Closing the gnuplot window itself is NOT enough to stop gnuplot from running in the background!

Buttons at the top of the EDM screen can launch small wrapper programs for plotz and plotz_devices.

Interactive zplot of Modelled Devices

To get an interactive session with plotz, hit this button on EDM:

This will bring up an interactive dialog session like this:

Note: when using the interactive plotz session, you don't need quotes around a regular expression.

When you have finished plotting z-plots, type "exit" to close the interactive window.

Interactive zplot of Unmodelled Devices

To get an interactive session with plotz_devices, hit this button on EDM:

This will bring up an interactive dialog session like this:

  • No labels