diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/iprtest.c | 6 | ||||
-rw-r--r-- | src/refine.c | 10 | ||||
-rw-r--r-- | src/reflections.c | 3 |
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; |