/FUNCTION

Operations with Functions. Creation and plotting.

/FUNCTION/FUN1 id ufunc ncx xmin xmax [ chopt ]

ID C Histogram Identifier
UFUNC C Name of the function
NCX I Number of channels D=100 R=1:
XMIN R Low edge D=0.
XMAX R Upper edge D=100.
CHOPT C Options D='C'

CHOPT:

'' '' Create the histogram (don't draw).
'C' Draw a smooth curve.
'S' Superimpose plot on top of existing picture.
'E' Draw error bars and current marker.
'E0' Draw error bars without symbols clipping.
'E1' Draw small lines at the end of the error bars.
'E2' Draw error rectangles.
'E3' Draw a filled area through the end points of the vertical error bars.
'E4' Draw a smoothed filled area through the end points of the vertical error bars.
'A' Axis labels and tick marks are not drawn.

Create a one dimensional histogram and fill the bins with the values of a (single-valued) function.

The function UFUNC may be given in two ways:

- As an expression of the variable X in case of a simple function. Example:

PAW > FUN1 10 SIN(X)/X 100 0 10

- As a COMIS function in a text file (ftest.f for example). The file ftest.f contains:

FUNCTION FTEST(X) FTEST=SIN(X)/X END PAW > FUN1 10 FTEST.F(X) 100 0 10

- If the extension ".f77" is used (the file still having the extension ".f") the local fortran compiler is invoked.

- If the extension ".c" is used the local C compiler is invoked.

/FUNCTION/FUN2 id ufunc ncx xmin xmax ncy ymin ymax [ chopt ]

ID C Histogram (2-Dim) Identifier
UFUNC C Name of the function
NCX I Number of channels in X D=40 R=1:
XMIN R Low edge in X D=0.
XMAX R Upper edge in X D=40.
NCY I Number of channels in Y D=40 R=1:
YMIN R Low edge in Y D=0.
YMAX R Upper edge in Y D=40.
CHOPT C Options D='SURF'

CHOPT:

'' '' Create the histogram (don't draw).
'S' Superimpose plot on top of existing picture.
'A' Axis labels and tick marks are not drawn.
'BOX' Draw 2-Dim with proportional boxes.
'COL' Draw 2-Dim with a color table.
'Z' Used with COL or SURF, it draws the color map.
'SURF' Draw as a surface plot (angles are set via the command angle).
'SURF1' Draw as a surface with color levels
'SURF2' Same as SURF1 but without cell lines.
'SURF3' Same as SURF but with the contour plot (in color) on top.
'SURF4' Draw as a surface with Gouraud shading.
'LEGO' Draw as a lego plot (angles are set via the command angle).
'LEGO1' Draw lego plot with light simulation.
'LEGO2' Draw lego plot with color levels.
'BB' Suppress the Back Box on 3D plots.
'FB' Suppress the Front Box on 3D plots.
'CONT' Draw 2-Dim as a contour plot (15 levels).
'TEXT' Draw 2-Dim as a table.
'CHAR' Draw 2-Dim with characters (a la HBOOK).
'CYL' Cylindrical coordinates for 3D plots.
'POL' Polar coordinates for 3D plots.
'SPH' Spherical coordinates for 3D plots.
'PSD' Pseudo-rapidity/phi coordinates for 3D plots.

Create a two dimensional histogram and fill the bins with the values of a (two-valued) function.

The function UFUNC may be given in two ways:

- As an expression of the variables x and y in case of a simple function. Example:

PAW > FUN2 10 ABS(SIN(X**2+Y**2)) 40 -2 2 40 -2 2 CONT

- As a COMIS function in a text file (ftest.f for example) The file ftest.f contains:

FUNCTION FTEST(X,Y) FTEST=ABS(SIN(X**2+Y**2)) END PAW > FUN2 10 FTEST.F(X,Y) 40 -2 2 40 -2 2 CONT

- If the extension ".f77" is used (the file still having the extension ".f") the local fortran compiler is invoked.

- If the extension ".c" is used the local C compiler is invoked.

/FUNCTION/DRAW ufunc [ chopt ]

UFUNC C Name of function
CHOPT C Options D=' '

Draw the function UFUNC in the current ranges specified by the command: RANGE XLOW XUP YLOW YUP ZLOW ZUP and with THETHA and PHI angles specified by the command ANGLE THETA PHI. The number of points to evaluate the function between XLOW, XUP YLOW, YUP, and ZLOW, ZUP can be changed by the command POINTS NPX NPY NPZ.

The function UFUNC may be given in two ways:

- As an expression of the variables X, Y, Z in the case of a simple function. Example:

PAW > FUN/DRAW X*Y*Z | equivalent to : PAW > FUN/DRAW X*Y*Z=0 PAW > FUN/DRAW X**2+Y**2+Z**2=1 PAW > FUN/DRAW X**2+Y**2=1-Z**2

- As a COMIS function in a text file (ftest.f for example) The file ftest.f contains:

FUNCTION FTEST(X,Y,Z) IF(X.LE.0..AND.Y.LE.0.)THEN FTEST=(X+0.5)**2+(Y+0.5)**2+(Z+0.5)**2-0.2 ELSE FTEST=(X-0.5)**2+(Y-0.5)**2+(Z-0.5)**2-0.1 ENDIF END PAW > RANGE -1 1 -1 1 -1 1 | Define the range as a cube between -1 1 in | the 3 directions PAW > POINTS 20 20 20 | FUN/DRAW will use 20 points in the 3 | directions PAW > FUN/DRAW FTEST.FOR | Draw 2 spheres centered on (-0.5,-0.5,-0.5) | and (0.5,0.5,0.5) with the radius SQRT(0.2) | and SQRT(0.1)

/FUNCTION/PLOT ufunc xlow xup [ chopt ]

UFUNC C Name of function
XLOW R Lower limit
XUP R Upper limit
CHOPT C Options D='C'

CHOPT:

'C' Draw a smooth curve.
'S' Superimpose plot on top of existing picture.
'+' Add contents of ID to last plotted histogram.
'L' Connect channel contents by a line.
'P' Draw the current polymarker at each channel.
'*' Draw a * at each channel.

Plot single-valued function UFUNC between XLOW and XUP. The function UFUNC may be given in two ways:

-An expression of the variable x in case of a simple function. Example:

FUN/PLOT sin(x)/x 0 10

-UFUNC is the name of a COMIS function in a text file with the name UFUNC.F or UFUNC.FOR (UNIX, VMS). For example, if the file FTEST.F contains:

FUNCTION FTEST(X) FTEST=SIN(X)*EXP(-0.1*X) END

Then,

FUN/PLOT FTEST.F(X) 0 10

will interpret the Fortran code in the file FTEST.F and draw the function for x between 0 and 10.

The number of points to evaluate the function between XLOW and XUP can be changed by the command /FUN/POINTS. Only 1-Dim functions are supported. For 2-Dim use FUN2.

- If the extension ".f77" is used (the file still having the extension ".f") the local fortran compiler is invoked.

- If the extension ".c" is used the local C compiler is invoked.

/FUNCTION/POINTS [ npx npy npz ]

NPX I Number of points on X axis D=20 R=2:1000
NPY I Number of points on Y axis D=20 R=2:1000
NPZ I Number of points on Z axis D=20 R=2:1000

Change the number of points to be used by FUN/DRAW and FUN/PLOT. Note that the default for NPX is 20 for 3-Dim plots (FUN/DRAW) but it is 100 for 1-Dim plots (FUN/PLOT).

/FUNCTION/RANGE [ xlow xup ylow yup zlow zup ]

XLOW R X Lower limit D=-1.
XUP R X Upper limit D=1.
YLOW R Y Lower limit D=-1.
YUP R Y Upper limit D=1
ZLOW R Z Lower limit D=-1.
ZUP R Z Upper limit D=1.

Change the range used by FUN/DRAW.

/FUNCTION/ANGLE [ theta phi ]

THETA R Angle THETA in degrees D=30.
PHI R Angle PHI in degrees D=30.

Change the angle used by FUN/DRAW and HISTO/PLOT.