      Introduction to the XAFS program

      1:                                                                   
	  
          DATA_READING

          You may choose to read either raw_data
          or preformatted absorption or fluorescence (versus energy) data 
          or processed k^n * khi (k) data 
           
          If you choose to read raw_data, 
          the name of the raw_data file must contain 6 characters maximum 
          followed by the extension .dat 
           
          Otherwise, if you choose to read preformatted or processed data, 
          the data_file may have been created by the present program or not. 
           
          If created by the present program, enter the fileName without extension. 
           
          If not, it is recommed that the file name be of the form :  
           
          ccccccEn.dat if the data are preformatted data 
          or ccccccKn.dat if they are processed data. 
          c are characters, and n is a figure [0..9] 
           
          The reason for that is to allow the program to manage 
          filenames when you save several trials. 
           
          IN ALL CASES ENTER THE FILE_NAME WITHOUT EXTENSION 

           
          The Directory Structure is built from default_path C\USERS\...\EXAFS\PREP 
           
          default_path\xafs.exe is the location of the executable 
           
          default_path\data  is the directory for raw_data 
           
          default_path\leg   is the directory for .leg files 
             which contains the parameters used to format and process 
             the raw_data 
           
          default_path\res   is the directory for 
             preformatted_data,      ??????e?.dat 
             processed_data,         ??????k?.dat 
             and Fourier_transforms, ??????f?.dat 

          In addition, the programs creates a file ??????mp.xyz, where are stored,
             in text format, the data you save from the screen, using the tab key. 
             This file is closed either if you quit the program or go back to read a new data file.
             If empty, it is erased after closure. 
           
          c:\users\...\exafs\fitt\data  is the directory for 
             Inverse Fourier_transforms, to be fit with models 
           
          You may create your own structure from the default_one  
             by apping a new element ( \????... ) to the default_path  
             The program will manage to create the necessary subDirectories 
             except the path for raw_data which must pre_exist, with a file to read 

           
          When opening a RAW_DATA file, the program writes the 15 first lines 
          on the screen, assuming a maximum of 13 header_lines 
           
          Lines are numbered on the left in lowVideo mode 
          These lines are truncated to 80 characters, except the last-one 
          This allows you to know the number of numeric columns in the file 
           
          Answering the few questions asked by the program 
          makes it possible to read text_files in a variety of formats 
           
          The number of columns to read may be either 2 to 5
          If it is 2, it is assumed that the 1st-one contains the abscissae 
          and the other contains either I/Io or log(Io/I) 
           If it is >2, the columns contain what you decide when answering questions. 
          You may read an additionnal column where a quantity not related to exafs
          has been recorded (potential, current, temperature, ...)  
          If they are not not automaticaly read, the program asks for the offsets for I and Io 
          in order to compute either (I/Io) or ln(Io/I), 
          according to your previous answer about absorption or fluorescence 
           
          The program requires photon energy to be in eV 
          Enter the proper coefficient for conversion if necessary 

           
          Files of PREFORMATTED DATA (vs. energy) are assumed 
          to be located in the "\RES" directory. 
           
          They are assumed to consist of 2 COLUMNS 
          WITH a header with a    KNOWN nbr of lines if CREATED by THIS program 
          WITH a header with an UNKNOWN nbr of lines if NOT CREATED by THIS program 
           
          For files of PREFORMATTED DATA NOT CREATED by this program, one must enter  
          The number of header lines and the threshold energy in eV 
           
          Files of PROCESSED DATA (vs. wave number) are assumed 
          to be located in the "Aux" directory with access pathAux  
           
          They are also assumed to consist of 2 COLUMNS 
          WITH a header with a    KNOWN nbr of lines if CREATED by THIS program 
          WITH a header with an UNKNOWN nbr of lines if NOT CREATED by THIS program 
           
          For files of PROCESSED DATA NOT CREATED by this program, one must enter :  
          The number of header lines, the threshold energy in eV 
          the unit for wave_number and the power n of k^n * khi(k)  

      2:
           
          CLEANING OUTLIERS

          This step is not mandatory 
           
          An Outlier is not to be confused with a Glitch 
           
          It is an INDIVIDUAL point, not a GROUP of points 
          which lies outside the mean line 
           
          This program cleans ouliers by replacing them  
          by the average of the TWO adjacent pairs of points 
           
          Click twice on the outlier using the arrow_panel 
           
          To exit, Click twice again on the last outlier you cleaned 
           
      3:
           
          NOISE FILTERING

          Low_Pass Fourier_Filtering (LPFF) is mainly COSMETIC 
          and MIGHT BE AVOIDED unless situation is desperate 
           
          It work as follows 
           
          The program library contains 4 general_purpose Fourier filters :  
          Low_Pass, High_Pass, Band_Pass and Band_Cut 
           
          First You are prompted to choose the Low_Pass filter 
          Then the program computes the FFT of the Spectrum 
          You are then invited to click twice on the frequency 
          from which a damping will be applied to higher frequencies 
           
          To allow you to evaluate the result of your action 
          the programmes computes the damped spectrum by inverse FFT  
          and displays DAMPED and NON DAMPED spectra 
           
          You can re-do the whole process until you are satisfied 

      4:
           
          PREFORMATTING 
           
          This step is not mandatory 
             It is recommed when the "Atomic absorption" deviates markedly 
             from a smooth decreasing slope as it should be 
           
          It consists in building a first base_line which compensates for most 
             of the deviation just mentionned, and to prepare the replacement 
             of the wrong "Atomic absorption" by a theoretical Atomic absorption 
             function by Stobbe quoted by Heitler. 
           
          Three tools are provided to build this corrective Base_Line 
             Iterative_Smoothing, Polynomials, or Weighted Cubic_Spline 
             Weighted Cubic_Spline is known to be the most efficient 
           
          In practice, you are invited to select bonds for the corrective Base_line 
             and to choose the tool you wish to use. 
          Then follow the instructions on the screen and become familiar with the tools 
           
          The program displays the derivative of the Corrective Base_Line 
          to help you avoiding subtraction of EXAFS frequencies 

      5:
           
          DEGLITCH 
           
          This step is useful to suppress small glitches 
             It is not better than any other Glitch suppressor for Big Glitches 

           Two algoritms are available
           
          One works on the principle of High_Pass Fourier_Filtering 
           
          On the small energy range of the glitch, 
             the glitch profile is a low_frequency signal 
             on which may be superimposed noise at higher frequencies 
           
          In practice, it is useful to ask for Io display at the ning 
             to help deglitching 
           
          First, bracket the glitch very tightly 
             You get its FFT. Choose the High_Pass tool 
             Click somewhere on the high_frequency side of the FFT 
             to damp low frequencies 

          The other uses weighted cubic SpLines. 

	In that case you can select all glitches at a time. 
	The weight of cubic splines at the glitches is much less than elswhere.
            A convenient smoothing parameters gives you a rather well deglitched spectrum.
 
         Try until you are satisfied. 

      6:
           
          THRESHOLD ENERGY DETERMINATION 
           
          This step is mandatory 
           
          You are invited to Bracket Threshold 
           
          If you Click twice on the same point 
             Threshold is provisionnaly positionned at that point 
           
          Otherwise, a linear interpolation is performed to multiply  
             the density of points by 8. Then a slight cubic spline smoothing   
             is recommended to compute a good derivative of the Threshold line 
           
          The program looks for the maximum of this derivative,  
             and suggests you choose that point as the Threshold 
           
          But your are kept free to choose another point 
           
      7:
           
          EDGE HEIGHT
           
          This step is mandatory. 
	  It includes 
		- the determination of a pre-edge straight line, to be extrapolated
          up to the edge energy, 
		- and the determination of an after-edge base-line, to be also 
          extrapolated downto the edge energy. This base line MUST be determined VERY carefully. 

          Together with the edge energy, the edge height is used to correct the shape
          of the spectrum according to atomic absorption.       8:
           
          ATOMIC ABSORPTION 
           
          This is a necessary complementary step.
          The energy dependant atomic absorption is computed by a six_parameter polynomial_fit 
          to the normalized mu/rho output the fPrime_program of Cromer & Liberman, 
          implemented by Habenschuss). 
          The required parameters are read from a table Kpolyn.dat or Lpolyn.dat located in the 
          exafs\prep\data\atom\ directory. 
          Thus is provided a standardization of spectrum shape intended to avoid systematic
          errors at the normalization step, and to make comparisons easier an more significant.   
          The progarm displays the atomic absorption together with the shape renormalized data. 
           
          You are then invited to SAVE the spectrum, together with the atomic absorption. 

      9:
           
          AFTER_EDGE BASE_LINE 
           
          This Step is mandatory 
           
          It is totally classical 
           
          It provides you with with 4 tools 
             1. Low_Pass Fourier_Filtering 
             2. Polynomials 
             3. Iterative Smoothing 
             4. Weighted Cubic_Splines 
           
          As before, in the preformatting_step, 
             you may use 1 out of 3 Weight_laws for Cubic_Splines 
             This allows you to manage properly with the low_k  of the spectrum 
           
      10:
           
          EXAFS NORMALIZATION 
           
          You can Normalize EXAFS oscillations  
             either with respect to the computed Base_Line (recommed) 
             or with respect to a Constant (when necessary)
  
         You can also perform a complementary normalization in case your data
             are DAFS data, by multiplying khi (k) by a polynomial of degree 3 
             determined by its coefficients a0 + a1*k + a2*k*k + a3*k*k*k.
             These coefficients may be read from a file dafs.dat located 
             in the current \data\ directory or from the keyboard.   
           
          At the end of the routine 
             a Parabola is subtracted from the Base_Line 
             In order to make it oscillate around zero 
           
          In this way, its Fourier_Transform may be directly compared 
             to that of the signal 
           
     12:
           
          APODIZATION 
           
          You can choose amongst 3 types of apodization Windows 
           
             1. The Kaiser Window, which requires an "abruptness parameter"
             2. The Kaiser Window with a Plateau, which requires also an "abruptness parameter" 
             3. The Hamming Window which requires side_ranges for damping data 
             4. The Natural Window, which may be use for reference 
           
          Apodization range is best chosen at values where signal is close to zero  
             Its optimal bonds dep on the power of k used to compute k^n * khi(k) 
           
          The Fourier_Transform Algorith is purposely chosen as a Fourier_Integral 
             Not a FFT 
             Owing to the small size of data_files,  
             the drawbacks of the Fourier_Integral are compensated by its advantages 
