All the above is relevant ONLY to taking the average intensity. For other purposes the correct procedure is likely to differ. For example if one is interested in the individual normalised structure amplitudes for direct methods (i.e. not just the mean), then the sqrt(1/e) factor clearly SHOULD be applied to the individual amplitudes. Also if one is calculating higher moments of Z (= normalised I) then the deviations will not cancel (there's nothing in the energy conservation law that says that energy^n is conserved if n is not 0 or 1). In the rotation axis case each large on-axis positive deviation tends to be offset by several small off-axis deviations, so in that case the optimal procedure would appear to be to multiply the on-axis Is by m/e before summing for the higher moments (say n >= 2), e.g.:
SM(N) = SM(N) + M*(FI/E)**N
NM(N) = NM(N) + M
For the screw-axis case with the sys. abs. omitted the situation is again different and requires different code; IMO we should distribute an amount I/e from each axial reflection equally among the omitted sys. abs. and then include them as though they were all present:
SM(N) = SM(N) + M*E*(FI/E)**N
NM(N) = NM(N) + M*E
One further issue needs to be addressed (TRUNCATE is not short of issues - the ones I mention here are only a fraction!). The code for calculating the moments in TRUNCATE is:
C---- Sums for moments of I
F = FFA(1)/WEIGHT
IF(F.GT.0.0) SMMEMM(1,NT,ICEN) = SMMEMM(1,NT,ICEN) + sqrt(F)
IF(F.GT.0.0) SMMEMM(3,NT,ICEN) = SMMEMM(3,NT,ICEN) + F*sqrt(F)
SMMIMM(1,NT,ICEN) = SMMIMM(1,NT,ICEN) + F
SMMIMM(2,NT,ICEN) = SMMIMM(2,NT,ICEN) + F**2
SMMIMM(3,NT,ICEN) = SMMIMM(3,NT,ICEN) + F**3
SMMIMM(4,NT,ICEN) = SMMIMM(4,NT,ICEN) + F**4
NMMNUM(NT,ICEN) = NMMNUM(NT,ICEN) + 1
Notwithstanding that the WEIGHT factor (aka epsilon) probably should not be applied to the lower moments, and the multiplicity factor probably should be applied everywhere, there is still a problem here. F is the uncorrected intensity but IMO we should be using the corrected intensity (i.e. by F & W's Bayesian procedure): why else are we calculating the correction if not to apply it? The uncorrected intensities may be negative which adds spurious noise to the moments (a negative intensity makes the same contribution to an even moment as an equal positive intensity: this cannot possibly be correct). However using the corrected Is brings another problem: when calculating the moments we should be using the expected values based on the posterior probability distribution of the Is. This means integrating the moments over all expected Is > 0, multiplied by the probability density. This is non-trivial, however there is a way using the parabolic cylinder functions U(a,x) (
http://en.wikipedia.org/wiki/Parabolic_cylinder_functions). The nice thing about this method is one can generalise it to calculate the Bayesian-corrected F and I as well as arbitrary moments and get rid of F & W's cubic spline interpolation code with the slightly worrying warning (see NEGIAS & NEGICS s/rs in TRUNCATE):
C---- Accuracy - better than 5 percent (i think).
With the PCFs the code becomes both much simpler and much more accurate (to REAL*4 precision, so ~ 0.0001% accuracy!).
I should also say that I believe that CTRUNCATE is not immune from these issues: it seems to be a straight translation at least in part from Fortran to C++ (though I'm far from being a C++ expert so I'll leave fixing CTRUNCATE to those who know what they're doing!).
Sorry about the length of this: at least you can't say I didn't consult you!
Cheers
-- Ian