53 lines
2.3 KiB
TeX
53 lines
2.3 KiB
TeX
\subsection{Integrate}
|
|
For four circle diffractometers it is usefull to be able to integrate the
|
|
intensity of the peak from a collected counting profile. This module does
|
|
just this. It uses the method as described by Grant \& Gabe in J. Appl. Cryst
|
|
(1987), 11, 114-120. This method uses a moving window technique for finding
|
|
the limits of the peak. This method was choosen for reason of its
|
|
simplicity. The authors state, that the results are comparable to the
|
|
Lehmann Larsen method used elsewhere. This is a utility module. Just a
|
|
single function is implemented:
|
|
|
|
\begin{flushleft} \small
|
|
\begin{minipage}{\linewidth} \label{scrap1}
|
|
\verb@"integrate.h"@ {\footnotesize ? }$\equiv$
|
|
\vspace{-1ex}
|
|
\begin{list}{}{} \item
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@/*--------------------------------------------------------------------------@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ I N T E G R A T E@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ Peak integration follwing the method described by Grant & Gabe in@\\
|
|
\mbox{}\verb@ J. Appl. Cryst (1978), 11, 114-120.@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ Mark Koennecke, March 1998@\\
|
|
\mbox{}\verb@----------------------------------------------------------------------------*/@\\
|
|
\mbox{}\verb@#ifndef GABEINTEGRATE@\\
|
|
\mbox{}\verb@#define GABEINTEGRATE@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@#define INTEGLEFT -1@\\
|
|
\mbox{}\verb@#define INTEGRIGHT -2@\\
|
|
\mbox{}\verb@#define INTEGNOPEAK -3@\\
|
|
\mbox{}\verb@#define INTEGFUNNYBACK -4@\\
|
|
\mbox{}\verb@@\\
|
|
\mbox{}\verb@ int GabePeakIntegrate(int m, int iCounts, long lCounts[], @\\
|
|
\mbox{}\verb@ float *fIntens, float *fVariance);@\\
|
|
\mbox{}\verb@#endif@\\
|
|
\mbox{}\verb@@$\diamond$
|
|
\end{list}
|
|
\vspace{-2ex}
|
|
\end{minipage}\\[4ex]
|
|
\end{flushleft}
|
|
Input to this routine is the number of counts and the counts themselves.
|
|
Then m, the number of lookahead points to use. As a result fIntens will
|
|
contain the summed Intensity and fVariance the sigma of the summed
|
|
intensity. The function retusn 1 for success or a negative error code in
|
|
case of trouble. These error codes are:
|
|
\begin{description}
|
|
\item[INTEGLEFT] no left side background found.
|
|
\item[INTEGRIGHT] nor right side background found.
|
|
\item[INTEGNOPEAK] The data does not contain a peak.
|
|
\item[INTEGFUNNYBACK] the data has a strange background.
|
|
\end{description}
|