\section{Glossary of Program Variables} \label{App:Glossary}

This appendix describes and lists the Program Variables {\ifeffit} 
expects you to use.  It is a compilation of the Program Variables used as
default input and output from the commands listed in
chapter~{\ref{Ch:Commands}}.  It also describes common conventions used for
the naming of arrays generated by the commands.

\subsection{Scalar Naming Conventions}\label{App:Glossary:scalars}

The tables below list the commonly used scalars and text strings
Program Variables, giving a very brief description of the expected
meaning for the variables and the commands that use this variable
either as input or output.  More details about the meaning and use of
these variables can be found in the entry for each command.

\begin{center}
  \begin{tabular}{lll} 
    \noalign{\smallskip}    
    \multicolumn{3}{l}{\hspace{-5mm}\large\textsf{General and System Variables}}\\ 
    \noalign{\smallskip}    
    Program Variable      &  Description  & Used in Commands \\
    {\tt{\$column\_label}}   &    data column label  & {\cmnd{read\_data}} \\
    {\tt{\$commentchar}}     &    comment character  & {\cmnd{read\_data}}, {\cmnd{write\_data}}\\
    {\tt{\&echo\_lines}}     &  number of lines to {\cmnd{echo}}  &     {\cmnd{echo}}, {\cmnd{load}}  \\
    {\tt{\$filename}}        &     file name for input & {\cmnd{read\_data}} \\
    {\tt{\$group}}          &         default group name & many \\
    {\tt{\$history\_file}} &  name command history file & {\cmnd{history}}\\
    {\tt{\$\&install\_dir}}&  installation directory  & {\cmnd{f1f2}}\\
    {\tt{\&pause\_ignore}} &  ignore {\cmnd{pause}} commands  &   {\cmnd{pause}}\\
    {\tt{\&screen\_echo}}  & screen echo setting & {\cmnd{echo}}, {\cmnd{log}}, {\cmnd{macro}}\\
    {\tt{\&sync\_level}}   &  synchronization level & {\cmnd{save}}, {\cmnd{set}}, {\cmnd{show}}\\
    {\tt{\$1}} \ldots {\tt{\$9}}  &   macro arguments &  at  macro execution \\
    %%
    \noalign{\medskip}
    \multicolumn{3}{l}{\hspace{-5mm}\large\textsf{Plotting}}\\ 
    \noalign{\smallskip}    
    Program Variable &  Description  & Used in Commands \\
    {\tt{cursor\_x}}  &  cursor $x$ coordinate  & {\cmnd{cursor}}, {\cmnd{zoom}}\\
    {\tt{cursor\_y}}  &  cursor $y$ coordinate  & {\cmnd{cursor}}, {\cmnd{zoom}}\\
    {\tt{\$plot\_device}} &  plotting device    &  {\cmnd{plot}}\\
    {\tt{\$plot\_file}}   &  filename for hardcopy plot  &  {\cmnd{plot}}\\
    {\tt{\$plot\_title}}  &  title for plot   &  {\cmnd{plot}}\\
    {\tt{\$plot\_xlabel}} &  label for x-axis &  {\cmnd{plot}}\\
    {\tt{\$plot\_ylabel}} &  label for y-axis &  {\cmnd{plot}}\\
    %% 
    \noalign{\medskip}
    \multicolumn{3}{l}{\hspace{-5mm}\large\textsf{FEFF Paths}}\\ 
    \noalign{\smallskip}    
    Program Variable &  Description  & Used in Commands \\
    {\tt{\$feff\_file}}     &   name of {\feff} file & {\cmnd{path}}\\
    {\tt{path\_index}}     &   path index     &  {\cmnd{path}}\\
    {\tt{reff}}   &  $R$ of  a {\feff} path &  {\cmnd{get\_path}} \\
    %%
  \end{tabular}
\end{center}
\indexvar{reff} \indexvar{\$column\_label} \indexvar{\$commentchar}
\indexvar{\&echo\_lines} \indexvar{\$filename} \indexvar{\$group}
\indexvar{\$history\_file} \indexvar{\$\&install\_dir}
\indexvar{\&pause\_ignore} \indexvar{\&screen\_echo}


{ \medskip  } 

\begin{center}
\indexvar{e0} \indexvar{edge\_step} \indexvar{norm\_c0} \indexvar{norm\_c1}
\indexvar{norm\_c2} \indexvar{norm1} \indexvar{norm2}
\indexvar{norm\_order} \indexvar{pre\_offset} \indexvar{pre\_slope}
\indexvar{pre1} \indexvar{pre2} \indexvar{rbkg} 
  \begin{tabular}{lll} 
    \noalign{\medskip}    
    \multicolumn{3}{l}{\hspace{-5mm}\large\textsf{Pre-Edge and Spline}} \\
    \noalign{\smallskip}    
     \multicolumn{3}{l}{\hspace{2mm} Used in commands
     {\cmnd{pre\_edge}}, and {\cmnd{spline}}}     \\ 
    \noalign{\smallskip}    
    Program Variable  &  Description  & Used in Commands \\
    {\tt{e0}}         &  $E_0$, where $k=0$  &    \\
    {\tt{edge\_step}} &  $\Delta \mu(E_0)$, edge step   & \\
    {\tt{norm\_c0}}   &  normaliztion parameter & \\
    {\tt{norm\_c1}}   &  normaliztion parameter & \\
    {\tt{norm\_c2}}   &  normaliztion parameter & \\
    {\tt{norm1}}      &  normalization range &  \\
    {\tt{norm2}}      &  normalization range &  \\
    {\tt{norm\_order}}&  order of normalization polynomial &  \\
    {\tt{pre\_offset}}&  offset of pre-edge line   & \\
    {\tt{pre\_slope}} &  slope  of pre-edge line   & \\
    {\tt{pre1}}       &  pre-edge range  &  \\
    {\tt{pre2}}       &  pre-edge range &   \\
    {\tt{rbkg}}       &  $R_{\rm bkg}$ for XAFS spline  & {\cmnd{spline}} \\
    \multicolumn{3}{l}{(see also Fourier transform parameters for {\cmnd{spline}})}\\
    \noalign{\medskip} 
     \multicolumn{3}{l}{\hspace{-5mm}\large\textsf{Fourier Transform}} \\
     \noalign{\smallskip}    
     \multicolumn{3}{l}{\hspace{2mm} Used in commands
     {\cmnd{chi\_noise}}, {\cmnd{feffit}}, {\cmnd{fftf}}, and {\cmnd{fftr}}}  \\ 
     \noalign{\smallskip}    
     Program Variable &  Description  & Used in Commands \\
     {\tt{\$altwindow}} & alternate window array &  \\ 
     {\tt{dk1}}  & $dk_1$        & \\
     {\tt{dk2}}  & $dk_2$        & \\
     {\tt{dr1}}  & $dR_1$        & \\ 
     {\tt{dr2}}  & $dR_2$        & \\ 
     {\tt{kmax}} & $k_{\rm max}$ & \\
     {\tt{kmin}} & $k_{\rm min}$ & \\ 
     {\tt{kweight}}  & $k$-weight $w$ &  \\
     {\tt{kwindow}}      &     $k\rightarrow R$ window type   &\\
     {\tt{rmax}}         &     $R_{\rm max}$    & \\
     {\tt{rmin}}         &     $R_{\rm min}$    & \\
     {\tt{rwindow}}      &     $R\rightarrow q$ window type   &  \\
     {\tt{dk1\_spl}}     &     $dk_1$           & {\cmnd{spline}}\\ 
     {\tt{dk2\_spl}}     &     $dk_2$           & {\cmnd{spline}}\\ 
     {\tt{kmax\_spl}}    &     $k_{\rm max}$    & {\cmnd{spline}}\\ 
     {\tt{kmin\_spl}}    &     $k_{\rm min}$    & {\cmnd{spline}}\\ 
     {\tt{kweight\_spl}} &     $k$-weight $w$   & {\cmnd{spline}}\\ 
   \end{tabular}
\indexvar{\$altwindow}
\indexvar{dk1} \indexvar{dk2} \indexvar{dr1} \indexvar{dr2} \indexvar{kmax}
\indexvar{kmin} \indexvar{kweight} \indexvar{kwindow} \indexvar{rmax}
\indexvar{rmin} \indexvar{rwindow} \indexvar{dk1\_spl} \indexvar{dk2\_spl}
\indexvar{kmax\_spl} \indexvar{kmin\_spl} \indexvar{kweight\_spl}
\end{center}


\begin{center}
  \begin{tabular}{lll} 
     \noalign{\smallskip}    
     \multicolumn{3}{l}{\hspace{-5mm}\large\textsf{Fitting}} \\
     \noalign{\smallskip}    
     Program Variable     &  Description  & Used in Commands \\
     {\tt{chi\_square}}   & fit statistic&     {\cmnd{feffit}}, {\cmnd{minimize}}\\
     {\tt{chi\_reduced}}  & fit statistic&     {\cmnd{feffit}}, {\cmnd{minimize}}\\
     {\tt{epsilon\_k}}    &  $\epsilon_k$, uncertainty in {\chik} & {\cmnd{chi\_noise}}, {\cmnd{feffit}}\\
     {\tt{epsilon\_r}}    &  $\epsilon_R$, uncertainty in {\chir} & {\cmnd{chi\_noise}}, {\cmnd{feffit}}\\
     {\tt{\&fit\_iteration}}  &  number of fit interations&     {\cmnd{feffit}}, {\cmnd{minimize}}\\
     {\tt{\$fit\_space}}  & fitting space & {\cmnd{feffit}}\\
     {\tt{n\_idp}}        & $N_{\rm idp}$ & {\cmnd{feffit}}\\
     {\tt{n\_varys}}      & number of variables  &  {\cmnd{feffit}}, {\cmnd{minimize}}\\
     {\tt{r\_factor}}     & fit statistic & {\cmnd{feffit}}\\
     %%
     \noalign{\smallskip{
         \indexvar{chi\_square}
         \indexvar{chi\_reduced} \indexvar{epsilon\_k} \indexvar{epsilon\_r}
         \indexvar{\&fit\_iteration} \indexvar{\$fit\_space} \indexvar{n\_idp}
         \indexvar{n\_varys} \indexvar{r\_factor} } 
       }
     \end{tabular}
\end{center}

\subsection{Array Naming Conventions}\label{App:Glossary:arrays}

Arrays created by commands will have predictable names, and depend
only on the current group name, held in the string variable
{\tt{\$group}}, or specified as a command argument.  By convention,
the prefix of the array name is the group name, and the suffix of the
array name contains a meaningful identification for the data.  The
following table lists the commonly used suffixes, their meaning, and
commands that use or create arrays with these suffixes.

\begin{center}
\begin{tabular}{lll} 
 Array suffix &  Description  & Used in Commands \\
 {\tt{energy}}     &  $E$   &    none\\
 {\tt{xmu}}        &  $\mu$ &    none\\
 {\tt{pre}}        &  pre-edge subtracted $\mu$ &    {\cmnd{pre\_edge}}, {\cmnd{spline}}\\
 {\tt{norm}}       &  normalized {\tt{pre}} &    {\cmnd{pre\_edge}}, {\cmnd{spline}}\\
 {\tt{bkg}}        &  background $\mu_0$   &    {\cmnd{spline}}\\
 {\tt{k}}          &  $k$  &    {\cmnd{spline}}, {\cmnd{fftf}}, {\cmnd{feffit}}\\
 {\tt{chi}}        &  $\chi$  &    {\cmnd{spline}}, {\cmnd{fftf}}, {\cmnd{feffit}}\\
 {\tt{win}}        &  $W_k$ ($k$-window function) &    {\cmnd{fftf}}, {\cmnd{feffit}}\\
 {\tt{chir\_mag}}  &  $|\chi(R)|$ &    {\cmnd{fftf}}\\
 {\tt{chir\_re}}   &  $\rm Re[\chi(R)]$ &    {\cmnd{fftf}}\\
 {\tt{chir\_im}}   &  $\rm Im[\chi(R)]$ &    {\cmnd{fftf}}\\
 {\tt{chir\_phase}} &  $\rm phase[\chi(R)]$ &    {\cmnd{fftf}}\\
\end{tabular}
\end{center}

