\documentclass[a4paper, 11pt]{article}

%% FIXME need a metaUML diagram in here explaining how this works...

\begin{document}

\section{Introduction}

This document describes the implementation of the CCP4 Scaler - this uses 
standard CCP4 programs to present the xia2dpa Scaler interface, including:

\begin{itemize}
\item{\textsc{Pointless}}
\item{\textsc{Cad}, \textsc{Sortmtz}, \textsc{Reindex}, \textsc{Mtzdump}
\textsc{Mtz2various}}
\item{\textsc{Scala}}
\end{itemize}

\noindent
This number of programs is necessary to provide the full functionality,
including implicit reindexing to the correct setting, implicit determination
of pointgroup, implicit combination and separation of reflection files.

This document describes how this module works and what is going on.

\section{Detecting Radiation Damage A: Within A Sweep}

Use Scala - look at $R_{\rm{merge}}$ vs. batch. Don't forget that there 
are cases which Ed has given me where this behaves strangely - also need
a benchmark for this (e.g. TS03 INFL, LREM curves.)

\section{Detecting Radiation Damage B: Between Sweeps}

Use Scaleit - look at the relative $B$ factor between data sets.

\section{Deciding Resolution Limits}

Should the resolution limits be decided as one limit for all data sets or
a number of limits? Need to decide what I am going to do with the data 
afterwards (in particular, how does solve/resolve cope?)

Right, what is actually implemented is a resolution limit where 
$I/\sigma \sim 2$ is found from the merged data - this is then set in the 
integrater and perhaps the integration is repeated. This consideration is
made \emph{per wavelength} so all sweeps contributing to a given wavelength
will be limited to the same resolution - I am assuming that the weighting
done by Scala should handle this.

As to solve/resolve? It will have to cope.

\section{Setting Error Parameters}

In integration the errors are usually underestimated (Evans, sometime.) 
Scala includes standard deviation inflation parameters SdAdd, SdFac and SdB
for full and partial reflections for each run - there are therefore, in 
principle, 6 parameters for each run to be adjusted. However, the SdFac
(an overall scaling) is automatically determined by Scala, leaving the 
other four. SdB, which corrects the overall curvature, is usually a number
around 10, while the SdAdd of typically 0.02 (the default) affects the 
overall shape and gradient of the curve.

In the summary the standard deviations for each integration bin should 
be $\sim 1$. This is achieved by searching for a best SdB for full and
partial, then searching with the best SdB's for SdAdd, then researching for 
SdB just in case this has changed. This seems to work well.

However, if the data are radiation damaged then this is not appropriate,
because the measured spread will be larger than the error on the reflections - 
this must be factored in!

\end{document}
