# Optimisation

## Final polishing

• After running through all steps of XDS (including space group determination), one might want to
```cp GXPARM.XDS XPARM.XDS
mv CORRECT.LP CORRECT.LP.old
grep -v REIDX XDS.INP > XDS.INP.new
mv XDS.INP.new XDS.INP
```
and re-run the INTEGRATE and CORRECT steps. This has the advantage that the refined geometry parameters (from CORRECT) are recycled into INTEGRATE, which sometimes leads to better R-factors.

• Wilson outliers: look through the list of reflections labeled as "aliens" in CORRECT.LP. Decide whether they follow a slowly decaying non-Wilson distribution (resulting in many reflections with Z > 8 instead of almost none in the case of a Wilson distribution), or whether the top ones are true outliers. The latter occurs most often from ice reflections (these may even be there when no ice rings are visible).
My personal rule of thumb is that when the integer parts of Z ("int(Z)") are the numbers 8, 9, ... n, but there are no aliens (or just a single one) with int(Z) = n+1, then I consider all aliens with Z > n+1 as outliers. A different rule of thumb would be to simply consider aliens with Z of 20 or more as outliers.
Outliers should be put (i.e. copied) into REMOVE.HKL, and CORRECT then should be re-run.
It is useful to inspect the list of aliens after re-running CORRECT; maybe a few more of those should be put into REMOVE.HKL. But this process of rejecting Wilson outliers usually converges very quickly.
• Another way to judge Wilson outliers is to identify resolution ranges that deviate from 1. in the table HIGHER ORDER MOMENTS OF WILSON DISTRIBUTION OF ACENTRIC DATA in CORRECT.LP. "Aliens" that are put into REMOVE.HKL will lower the values in these resolution ranges!
• SCALEPACK users: don't confuse this process of rejecting Wilson outliers with the iterative procedure of rejecting scaling outliers that is usually done when using SCALEPACK. Scaling outliers are handled non-iteratively in XDS; the only way to influence XDS in this respect is by modifying WFAC1.