aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/refine.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/refine.c b/src/refine.c
index 25c4243..99dcebe 100644
--- a/src/refine.c
+++ b/src/refine.c
@@ -171,17 +171,23 @@ static ImageFeature *refine_fit_image(Basis *cell, ImageRecord *image, Reflectio
mapping_rotate(dax, day, 0.0, &dlx, &dly, &dlz, image->omega, image->tilt);
printf("a changed by %+7.5f %+7.5f %+7.5f nm^-1 in reciprocal space (%+10.5f %+10.5f %+10.5f %%)\n", dlx/1e9, dly/1e9, dlz/1e9,
100*dlx/cell->a.x, 100*dly/cell->a.y, 100*dlz/cell->a.z);
- cell->a.x += dlx; cell->a.y += dly; cell->a.z += dlz;
+ if ( dlx/cell->a.x < 0.1 ) cell->a.x += dlx;
+ if ( dly/cell->a.y < 0.1 ) cell->a.y += dly;
+ if ( dlz/cell->a.z < 0.1 ) cell->a.z += dlz;
mapping_rotate(dbx, dby, 0.0, &dlx, &dly, &dlz, image->omega, image->tilt);
printf("b changed by %+7.5f %+7.5f %+7.5f nm^-1 in reciprocal space (%+10.5f %+10.5f %+10.5f %%)\n", dlx/1e9, dly/1e9, dlz/1e9,
100*dlx/cell->b.x, 100*dly/cell->b.y, 100*dlz/cell->b.z);
- cell->b.x += dlx; cell->b.y += dly; cell->b.z += dlz;
+ if ( dlx/cell->b.x < 0.1 ) cell->b.x += dlx;
+ if ( dly/cell->b.y < 0.1 ) cell->b.y += dly;
+ if ( dlz/cell->b.z < 0.1 ) cell->b.z += dlz;
mapping_rotate(dcx, dcy, 0.0, &dlx, &dly, &dlz, image->omega, image->tilt);
printf("c changed by %+7.5f %+7.5f %+7.5f nm^-1 in reciprocal space (%+10.5f %+10.5f %+10.5f %%)\n", dlx/1e9, dly/1e9, dlz/1e9,
100*dlx/cell->c.x, 100*dly/cell->c.y, 100*dlz/cell->c.z);
- cell->c.x += dlx; cell->c.y += dly; cell->c.z += dlz;
+ if ( dlx/cell->c.x < 0.1 ) cell->c.x += dlx;
+ if ( dly/cell->c.y < 0.1 ) cell->c.y += dly;
+ if ( dlz/cell->c.z < 0.1 ) cell->c.z += dlz;
return NULL;