diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2008-08-04 11:14:25 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2008-08-04 11:14:25 +0000 |
commit | d963362e6cb208ca730cf45b2b72ab3e86489907 (patch) | |
tree | 19fef54a76b1076a676810582ae9e7a3602d87df /src/refine.c | |
parent | 7274b3f1f8ca746fbf3f5224df2b7fae3710d525 (diff) |
Wrap long lines
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@284 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/refine.c')
-rw-r--r-- | src/refine.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/refine.c b/src/refine.c index b3ac84a..5de8df3 100644 --- a/src/refine.c +++ b/src/refine.c @@ -80,7 +80,8 @@ void refine_do_sequence(ControlContext *ctx) { reproject_lattice_changed(ctx); fit = refine_do_cell(ctx); - printf("RF: omega_offs=%f deg, fit=%f nm^-1\n", rad2deg(omega_offs), fit/DISPFACTOR); + printf("RF: omega_offs=%f deg, fit=%f nm^-1\n", rad2deg(omega_offs), + fit/DISPFACTOR); fit_vals[idx++] = fit; if ( fit < fit_best ) { fit_best = fit; @@ -254,21 +255,25 @@ static double refine_iteration(SimplexVertex *s, Deviation *d, int nf) { /* Is the worst vertex any better? */ fom_new = refine_mean_dev(d, nf, s, v_worst); - if ( REFINE_DEBUG ) printf("New mean deviation for the worst vertex after reflection is %f nm^-1\n", fom_new/DISPFACTOR); + if ( REFINE_DEBUG ) printf("New mean deviation for the worst vertex after reflection is %f nm^-1\n", + fom_new/DISPFACTOR); if ( fom_new > fom_worst ) { double fom_new_new; /* It's worse than before. Contract in 1D and see if that helps. */ if ( REFINE_DEBUG ) printf("Worse. Trying a 1D contraction...\n"); - refine_simplex_transform(s, v_worst, -0.5); /* Minus puts it back on the original side of the 'good' face */ + /* Minus puts it back on the original side of the 'good' face */ + refine_simplex_transform(s, v_worst, -0.5); fom_new_new = refine_mean_dev(d, nf, s, v_worst); - if ( REFINE_DEBUG ) printf("Mean deviation after 1D contraction is %f nm^-1\n", fom_new_new/DISPFACTOR); + if ( REFINE_DEBUG ) printf("Mean deviation after 1D contraction is %f nm^-1\n", + fom_new_new/DISPFACTOR); if ( fom_new_new > fom_second_worst ) { int i; - if ( REFINE_DEBUG ) printf("Not as good as the second worst vertex: contracting around the best vertex (%i)\n", v_best); + if ( REFINE_DEBUG ) printf("Not as good as the second worst vertex: contracting around the " + "best vertex (%i)\n", v_best); for ( i=0; i<=NUM_PARAMS; i++ ) { if ( i != v_best ) refine_simplex_contract(s, i, v_best); } @@ -346,7 +351,8 @@ double refine_do_cell(ControlContext *ctx) { int j; if ( !ctx->images->images[i].rflist ) { - ctx->images->images[i].rflist = reproject_get_reflections(&ctx->images->images[i], ctx->cell_lattice); + ctx->images->images[i].rflist = reproject_get_reflections(&ctx->images->images[i], + ctx->cell_lattice); } for ( j=0; j<ctx->images->images[i].rflist->n_features; j++ ) { @@ -385,7 +391,8 @@ double refine_do_cell(ControlContext *ctx) { /* Determine the difference vector */ dix = rf->partner->x - rf->x; diy = rf->partner->y - rf->y; - //printf("RF: Feature %3i: %3i %3i %3i dev = %+9.5f %+9.5f px ", j, d[f].h, d[f].k, d[f].l, dix, diy); + //printf("RF: Feature %3i: %3i %3i %3i dev = %+9.5f %+9.5f px ", j, d[f].h, d[f].k, d[f].l, + // dix, diy); old_x = rf->partner->x; old_y = rf->partner->y; @@ -437,7 +444,8 @@ double refine_do_cell(ControlContext *ctx) { if ( REFINE_DEBUG ) printf("------------------- Simplex method iteration %i -------------------\n", it); conv = refine_iteration(s, d, nf); if ( conv < tol ) { - if ( REFINE_DEBUG ) printf("RF: Converged after %i iterations (%f nm^-1)\n", it, conv/DISPFACTOR); + if ( REFINE_DEBUG ) printf("RF: Converged after %i iterations (%f nm^-1)\n", it, + conv/DISPFACTOR); break; } |