Routines to create and read the optical constants library.

-----------------------------------------------------------------------------

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    
    Optical constants (f1,f2) are stored in the library file F12LIB.FULL, which 
can be read by the program READLIB.  Here is a historical rundown of where 
things come from:

		    	     READLIB
				^
				|
			    F12LIB.FULL
				^
				|
			     GENLIB
				^
			       / \
			      /   \
			PRELIB1   PRELIB2
			   /        \
			  /          \
	      f1, f2 from CXRO	      f1, f2 from LLL 
	        (30-10000eV)		(10-100keV)
	[.CXROF1F2]*.F12 + BUILD    [.CXROF1F2]XSECT.DAT + INTRPOL

GENLIB generates the keyed access library F12LIB.FULL, from the two ASCI file 
PRELIB%.DAT :

 a) PRELIB1.DAT - is generated by BUILD, which simply reads in the individual 
		  element files *.F12 and stores all of them in PRELIB1.
		  Since CXRO use a log energy scale, with 301 points from 
		  30 to 10,000 eV, the equation for the energy axis is :

			               ((i-1)/300*log10(10000/30)) 
			hv = 30.0 * 10^                             , i = 1, 301

 b) PRELIB2.DAT - is generated by interpolation using the cross-section data 
		  from XSECT.DAT.  In order to keep the same energy scale, a 
		  set of energy value is calculated using the above equation 
		  and stored in ENERGY.DAT.  They are then read by INTRPOL 
		  which actually does the interpolation.  A convenient listing
		  of all the elements is in ELEMENT.DAT, also read by INTRPOL.

		  Since XSECT only starts from Li, I've generated (f1,f2) for
		  H and He using the program HHE.FOR.

NOTE that there may be artificial 'edge' at 10keV, where the two PRELIB file 
meet.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

-----------------------------------------------------------------------------


         The Atomic Scattering Factor, f1+i*f2, for 94 Elements and
               for the 100 to 2000 eV Photon Energy Region (*)

            B. L. Henke, P. Lee, T. J. Tanaka, R. L. Shimabukuro,
                      B. K. Fujikawa, and H. T. Yamada

         University of Hawaii, Department of Physics and Astronomy, 
                         Honolulu, Hawaii 96822


     In a recent work (1), a "state of the art" evaluation and fitting of the
best available experimental and theoretical photoabsorption cross sections has
been presented for the 30 to 10,000 eV region.  Using the quantum dispersion
relations, the atomic scattering factors were uniquely determined from the
photoabsorption cross section data for the low-energy x-rays.  In Ref. 1, the
original data were given at fifty laboratory wavelengths along with
compilation references and a description of the fitting procedures. Presented
here are the f1 and f2 values which have been interpolated at regular
intervals.
     As discussed recently by Henke (2,3), the f1 and f2 parameters may be
applied to calculate the low-energy x-ray interactions--absorption,
scattering, specular and Bragg reflection.
     The corresponding value for the photoabsorption cross section is related
to f2 by E*mu(E)=K*f2.  (The data file contains K values.)  For E*mu(E) in
eV-barns/atom units, K is equal to 6.987E+07 for all atoms.
     For the shorter wavelengths and for the larger angles of scattering, the
accuracy of these atomic scattering factors might be improved by the inclusion
of two small correction terms for relativistic and charge distribution
effects.  Such corrections can become of relative importance when the
magnitude of the scattering factor has been appreciably reduced by anomalous
dispersion.  As is discussed in Refs. 1 and 2, the modified scattering factor
becomes simply 
          f = f1 - delta f sub r - delta f0 + i*f2,
where the relativistic correction, delta f sub r, is equal to
(5/3)*ABS(E(tot))/(m*c**2), which has been tabulated by Cromer and
Liberman (4) for Z=3 to Z=98; and the charge distribution correction, delta f0
is equal to (Z - f0), where f0 is the atomic form factor which recently has
been tabulated as a function of (sin(theta)/lambda) by Hubbell and Overbo (5).
(note that theta(Hubbell) = 2*theta(Henke).)  For (sin(theta)/lambda) less
than or equal to .05 A**-1, f0 is approximately equal to Z, and for
(sin(theta)/lambda) approximately equal to 0.1 A**-1, f0 is approximately
0.9*Z for most elements. An estimate of the value for the relativistic
correction, delta f sub r, may be given by (1,2)
          delta f sub r=5/3*(E(tot)/m*c**2)
                       =2.19E-06*Z**3 + 1.03E-04*Z**2



     The data are presented here at 125 values of photon energy, E (eV) with
logarithmically spaced intervals by taking the integer part of the energy as
given by
                    E=100*10**(N*LOG10(20)/124) eV.     (equation 1)
This expression may be used for convenient computer calculation and plotting
of functions of f1 and f2 as indexed here by N, where N is between 0 and 124
inclusive. (f1 and f2 have been precisely interpolated for the truncated E
values.)
     The scattering factor data are stored as REAL*4 values in an unformatted
FORTRAN direct access file called "F12B.DAT" which contains 284 records, each
125 double words (4 bytes) long.  If data for the element with atomic number Z
is desired, then the 125 f1 values are located in record 3*Z+1; f2 data are
found in record 3*Z+2.  The energies associated with the f1 and f2 values are
located in the first record of the file (stored as REAL*4 values).  The energy
for the i-th f1 or f2 value can also be calculated by using the above equation
(1), where N is i-1. Record 3*Z contains the following information:

                    1.  atomic number of element (INTEGER*2)
                    2.  chemical symbol of element (INTEGER*2)
                    3.  atomic weight (REAL*4)
                    4.  mu(barns/atom)/mu(cm**2/gram) (REAL*4)
                    5.  K (energy*mu/f2 in eV*cm**2/gram) (REAL*4)

     The data cannot be accessed in PDP-BASIC 11 as a virtual array because it
exceeds the maximum array size. It can only be accessed by a version of BASIC
which permits a virtual array dimensioned X(283,124). (0 is an acceptable
subscript.)
     Sample FORTRAN programs have been included in the files "F12SUB.FOR"
(subroutine F1F2 and function IZ) and "INTRAC.FOR".  Descriptions of these
programs can be found in their respective listings.
     The RSX-11 and VMS operating systems require input files to be in the
FILES-11 format.  Hence it is necessary to convert the files on the library
data floppy disk to this format as they are read in on a RX02 floppy disk
device.  The file transfer utility FLX is used.  This utility is described at
length in the RSX-11 and VAX/VMS reference manuals so only the appropriate
commands will be described here.  After starting FLX  you will be prompted for
a command with the letters FLX>.    For the example it is assumed that the
floppy is mounted on device DY1: and the files will be read in onto the user's
disk.  After allocating and mounting the disk use the following commands: 
FLX>DY1:/RT/LI>  This will list the files on the disk.  Except for F12B.DAT,
all files are formatted ASCII.  Let NAME.TXT be a sample ASCII file name, then
each ASCII file is read in with the command: FLX>=DY1:NAME.TXT/RT.  The data
library file is read in thie the command:  FLX>=DY1:F12B.DAT/RT/IM:500.  (Note
the decimal point in 500.  Absolutely mandatory).  After the files are read
in, all programs can be applied without modifications.



_______________________
(*) The data on this disk are taken from the Monterey Conference Proceedings
    appendix (see references 2 and 3); however, the f1/f2 data as originally
    presented in the Monterey Conference Proceedings have been re-evaluated
    and some small improvements in the fittings have been included here in the
    photon energy region below about 300 eV for 26 elements as based, in part,
    upon newly acquired photoabsorption data.  The data are identical with the
    data in the report "On the Prediction and Application of Low Energy X-ray
    Interactions" (unpublished).

(1) "Low Energy X-Ray Interaction Coefficients: Photoabsorption, Scattering
    and Reflection," B. L. Henke, P. Lee, T. J. Tanaka, R. L. Shimabukuro and
    B. K. Fujikawa, Atomic Data and Nuclear Data Tables Vol. 27, (1982).

(2) "Low Energy X-Ray Interactions: Photoionization, Scattering, Specular and
    Bragg Reflection," B. L. Henke, AIP Conference Proceedings No. 75, Low
    Energy X-Ray Diagnostics-1981, Monterey (American Institute of Physics,
    New York, 1981).

(3) "Low Energy X-ray Spectroscopy with Crystals and Multilayers," B. L.
    Henke, AIP  Conference Proceedings No. 75, Low Energy X-Ray
    Diagnostics-1981, Monterey (American Institute of Physics, New York,
    1981).

(4) D. T. Cromer and D. Liberman, J. Chem. Phys. 53, 1891 (1970).

(5) J. H. Hubbell and I. Overbo, J. Phys. Chem. Ref. Data 8, 69 (1979).

