
ref1.4.c  Reflectivity Curve Function
What is ref1.4.c?
ref1.4.c is a CPlot function
that calculates the reflectivity curve for a given set of parameters supplied
by parameters.dat in the current directory.
Function Specifics:

This function requires cplx.h to compile. cplx.h
is an include file for complex number data types and functions.

Ref1 sends 201 points to CPlot. The range is determined by the current
xaxis range.

initParam() loads the parameters from the data file. See
below for what the parameters mean.

The macros that talk to CPlot are from p_funct.h.
These macros are set_x, set_y, get_xmax(), etc. Descriptions of them
are found in the CPlot user manual.

The format for parameters.dat
is included in parameters.dat.
The Parameters:
P(1)  A scale for Q_{z}. Usually
equal to 1.
P(2)  Surface roughness
P(3)  A scale for y. Usually equal to 1.
P(4)  Electron density of the subphase.
P(5)  Absorbtion coefficient. Usually equal to 0.
P(6+3j)  Thickness of the layer. (j=0 corresponds to the first
layer)
P(7+3j)  Electron density of the layer.
P(8+3j)  Absorbtion coefficient of the layer. Usually equal
to 0.
C(1)  The number of layers.
C(2)  0 for reflectivity calculations, 1 for real space calculations.
C(3)  0 for linear calculations, 1 for logrithmic calculations.
C(4) 
C(5)  The k vector for xrays.
C(6)  1 to divide by Fresnel reflectivity, 0 if not.
C(7)  0 for xrays, 1 for neutrons.
C(8)  1 for phase output, 0 for normal.
Note: P(0) and
C(0), which are in parameters.dat, are not
used.
Michael S Kelley

