ref1.4.c - Reflectivity Curve Function

What is ref1.4.c?

        ref1.4.c is a C-Plot 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 C-Plot.  The range is determined by the current x-axis range.
  • initParam() loads the parameters from the data file.  See below for what the parameters mean.
  • The macros that talk to C-Plot are from p_funct.h.  These macros are set_x, set_y, get_xmax(), etc.  Descriptions of them are found in the C-Plot user manual.
  • The format for parameters.dat is included in parameters.dat.

The Parameters:
    P(1) - A scale for Qz.  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 x-rays.
    C(6) - 1 to divide by Fresnel reflectivity, 0 if not.
    C(7) - 0 for x-rays, 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