aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2008-01-18 10:48:37 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2008-01-18 10:48:37 +0000
commit3a2ad78bf87b86ccc9a8ee7856a3ffbc261dcb7e (patch)
treeaa0fc350d711bf59965fdaec55b07e96fd43c005
parent8efb2ecb23ae3d3bbe49366154c2c669820ff693 (diff)
Generally fix things
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@258 bf6ca9ba-c028-0410-8290-897cf20841d1
-rw-r--r--src/iprtest.c6
-rw-r--r--src/refine.c10
-rw-r--r--src/reflections.c3
3 files changed, 15 insertions, 4 deletions
diff --git a/src/iprtest.c b/src/iprtest.c
index 7f9541d..6ff7651 100644
--- a/src/iprtest.c
+++ b/src/iprtest.c
@@ -117,9 +117,9 @@ int main(int argc, char *argv[]) {
ctx->image = malloc(sizeof(ImageRecord));
ctx->image->image = NULL;
- ctx->image->tilt = 10.0;
- ctx->image->omega = 90.0;
- ctx->image->slop = 0.0;
+ ctx->image->tilt = deg2rad(25.0);
+ ctx->image->omega = deg2rad(90.0);
+ ctx->image->slop = deg2rad(0.0);
ctx->image->fmode = FORMULATION_PIXELSIZE;
ctx->image->pixel_size = 0.6e8;
ctx->image->camera_len = 0.0;
diff --git a/src/refine.c b/src/refine.c
index 4e5a3ab..3a01a9d 100644
--- a/src/refine.c
+++ b/src/refine.c
@@ -334,6 +334,11 @@ void refine_do_stack(ControlContext *ctx) {
return;
}
+ if ( ctx->images->n_images == 0 ) {
+ displaywindow_error("There are no images to refine against.", ctx->dw);
+ return;
+ }
+
for ( omega_offs=-2.0; omega_offs<=2.0; omega_offs+=0.01 ) {
double fit, warp;
@@ -387,6 +392,11 @@ void refine_do_image(ControlContext *ctx) {
return;
}
+ if ( ctx->images->n_images == 0 ) {
+ displaywindow_error("There are no images to refine against.", ctx->dw);
+ return;
+ }
+
ImageFeature *fitted;
fitted = refine_fit_image(ctx->cell, &ctx->images->images[ctx->dw->cur_image]);
diff --git a/src/reflections.c b/src/reflections.c
index 58a7992..3a8c271 100644
--- a/src/reflections.c
+++ b/src/reflections.c
@@ -235,7 +235,8 @@ ReflectionList *reflection_list_from_cell(Basis *basis) {
double x, y, z;
- if ( h != 0 ) continue;
+ /* Test mode */
+ //if ( h != 0 ) continue;
x = h*basis->a.x + k*basis->b.x + l*basis->c.x;
y = h*basis->a.y + k*basis->b.y + l*basis->c.y;