|
Userplot
Name: userplot - set up custom
plotting
Description:
userplot sets up user-defined plot expressions
in multiple plotting windows
First, the user is asked whether
plotting of custom output expressions is desired. If not, the value plotted
during scanning reverts to raw counts in the DET
counter. If custom plotting is desired, a short menu of options pops up:
Defined user expressions:
Plot Expression File Screen Plot Label
number to plot output output window
* indicates primary expression in a given window
Options:
a - add expression
r - remove expression
c - change characteristics
q - quit
Option (p)?
If you wish to add an
expression, choose option (a) and the screen will show:
Your userplot expression may be any combination of valid Spec
variables, arithmetic functions, motor positions, counters,
and constants. When using motor positions or counters in an
expression, give their mnemonics. Indicate mnemonics by
separating them from other characters with spaces.
Hit any key to continue.
After you continue the screen will
show a list of the current counter configurations. You may now type in your
expression separating variables from other variables
with spaces.
An expression is defined using the a option. An expression may consist of any
combination of variables, arithmetic functions, motor positions, and
counters. To include a motor position or counter value in an expression,
type the mnemonic of the motor or counter in the expression, separated from
other words and characters by spaces. For example, below is an expression
where the number taken from the counter flour
is squared, and added to the position of the motor sampx times a variable k.
flour * flour + k * sampx
It would also have been valid to write
pow( flour,
2) + (k * sampx )
making use of the Spec function
pow for raising a number to a power. See the Spec reference guide (pp.
13-14 of the Spec functions reference) for a
listing of valid Spec arithmetic functions. The value of the variable k may
be set from the Spec command level, or it may be an internal variable from a
scan.
You will also be asked
other questions:
Print this number to the screen (YES)?
Print this number to the datafile (YES)?
Plot this expression (YES)?
In which window (1)?
Make this the primary expression in this window (YES)?
Once the expression has been entered,
the user is asked the name of the expression. The user is also asked whether
the value is to be printed to the screen and/or the datafile. This choice is
presented so that important values may be printed to the datafile but not
allowed to clutter the screen, or so that a quick look at trends in the data
can be taken without unduly enlarging the datafile. You will also be asked
if you wish to plot the expression, and in which window.
You can have up to 5 windows available
for plotting and can even resize them all to be visible at once. The
primary expression is the one that the peak,
COM, & FWHM get calculated for and sent to the data file if you choose so in
setscans.
After adding 4 user-defined plots your
main userplot menu will look something like
this:
Defined user expressions:
Plot Expression File Screen Plot Label
number to plot output output window
1 A_PE yes yes 2 A line posn(mm)
1 A_PE / 25.4 yes yes *2 A line posn(inches)
2 B_PE / 25.4 / 12 / 6 yes yes *1 B line posn(fathoms)
3 C_PE / 25.4 / 12 / 3 / 220 yes yes *3 C line posn(furlongs)
* indicates primary expression in a given window
Options:
a - add expression
r - remove expression
c - change characteristics
q - quit
Option (p)?
Note that in window 2, there are 2
versions of A_PE but only the one with the * will have the Peak, COM,
& FWHM calculated at the end of the scan.
Other options on the
main menu include:
-
r
option, which deletes a single expression,
-
c
option, which is used to change the expression that will be plotted. Once
you choose c you will be asked:
and then
presented with a screen similar to the following:
Modifying the following expression:
Plot Expression File Screen Plot Label
number to plot output output window
1 A_PE / 25.4 yes yes *2 A line posn (inches)
* indicates primary expression in a given window
Operations:
e -- change expression
f -- toggle file output on/off
s -- toggle screen output on/off
w -- change plot window
p -- make this the primary plot in window
l -- change label
q -- quit (return to main menu)
Choice (q)?
One common expression used in EXAFS is log ( I0 / I1 )
To disable plotting of all expressions
and resume plotting the DET counter, answer 'no' to the initial question of whether you
want your expression plotted.
Last Update:
2006-09-21
|