Added a basic 'refine' function for the current centroid refinement sprint. Its interface is * beam          (dxtbx model) * goniometer    (dxtbx model) * crystal       (dgw model) * detector      (dxtbx model) * image_width   (radians) * sweep_range   (pair of values in radius) * hkls          (list of triplets) * svecs         (list of matrix.col or tuple elems) * d1s           (list of values in mm)  * sigd1s        (list of values in mm) * d2s           (list of values in mm) * sigd2s        (list of values in mm) * angles        (list of values in radians) * sigangles     (list of values in radians)
Added a basic 'refine' function for the current centroid refinement sprint. Its interface is
* beam          (dxtbx model)
* goniometer    (dxtbx model)
* crystal       (dgw model)
* detector      (dxtbx model)
* image_width   (radians)
* sweep_range   (pair of values in radius)
* hkls          (list of triplets)
* svecs         (list of matrix.col or tuple elems)
* d1s           (list of values in mm) 
* sigd1s        (list of values in mm)
* d2s           (list of values in mm)
* sigd2s        (list of values in mm)
* angles        (list of values in radians)
* sigangles     (list of values in radians)

The interface is not ideal. This is just an initial working version.

The function sets up and performs refinement using Gauss Newton iterations from lstbx, then returns the models as (beam, goniometer, crystal, detector). The return of models is not strictly necessary, because they are effectively passed by reference into the function. Maybe this is bad and we should do a copy first?

dials/dials,dials/dials,dials/dials,dials/dials,dials/dials