aboutsummaryrefslogtreecommitdiff
path: root/src/refine.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-11-23 12:56:46 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-11-23 12:56:46 +0000
commitecee32c22ba0b36bfc2f25e8394d3626922d0361 (patch)
treee8adc68b9b663c73b456aefb07bce38ca68821af /src/refine.c
parent058f40b511652002f0635c4f1c37a65e6fbcd156 (diff)
Remove vestigial graphing code
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@208 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/refine.c')
-rw-r--r--src/refine.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/refine.c b/src/refine.c
index 8202a21..bc81d7b 100644
--- a/src/refine.c
+++ b/src/refine.c
@@ -31,35 +31,6 @@
#include "imagedisplay.h"
#include "utils.h"
-/* Return the root sum squared deviation distance for all the "reprojectable" features in an image */
-static double refine_image_deviation(ImageRecord *image, ReflectionList *cell_lattice) {
-
- ImageFeatureList *rflist;
- ImageFeatureList *flist;
- int i;
- double total;
-
- rflist = reproject_get_reflections(image, cell_lattice);
- flist = image->features;
-
- reproject_partner_features(rflist, image);
-
- total = 0.0;
- for ( i=0; i<rflist->n_features; i++ ) {
-
- double d;
-
- d = rflist->features[i].partner_d;
- total += d*d;
-
- }
-
- image_feature_list_free(rflist);
-
- return sqrt(total);
-
-}
-
typedef enum {
INDEX_A = 1<<0,
INDEX_B = 1<<1,
@@ -237,43 +208,6 @@ static ImageFeature *refine_fit_image(Basis *cell, ImageRecord *image, Reflectio
}
-/* Display a graph of root sum squared deviation distance against some other parameter */
-static void refine_show_graph(ControlContext *ctx, int n) {
-
- GtkWidget *window;
- GtkWidget *graph;
- double old_tilt;
- double *values;
- size_t idx;
- double tilt;
-
- window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_window_set_default_size(GTK_WINDOW(window), 640, 256);
- gtk_window_set_title(GTK_WINDOW(window), "Refinement Graph");
- graph = gtk_value_graph_new();
-
- ctx->cell_lattice = reflection_list_from_cell(ctx->cell);
- old_tilt = ctx->images->images[n].tilt;
- values = malloc(401*sizeof(double));
- tilt = old_tilt-0.2;
- for ( idx=0; idx<401; idx++ ) {
- ctx->images->images[n].tilt = tilt;
- values[idx] = refine_image_deviation(&ctx->images->images[n], ctx->cell_lattice);
- tilt += 0.001;
- }
- ctx->images->images[n].tilt = old_tilt;
- gtk_value_graph_set_data(GTK_VALUE_GRAPH(graph), values, idx);
-
- gtk_container_add(GTK_CONTAINER(window), graph);
- gtk_widget_show_all(window);
-
-}
-
-static gint refine_graph(GtkWidget *step_button, ControlContext *ctx) {
- refine_show_graph(ctx, ctx->reproject_cur_image);
- return 0;
-}
-
static gint refine_step(GtkWidget *step_button, ControlContext *ctx) {
if ( (ctx->reproject_id) && (ctx->cell_lattice) ) {
@@ -456,7 +390,6 @@ void refine_open(ControlContext *ctx) {
GtkWidget *table;
GtkWidget *label;
GtkWidget *step_button;
- GtkWidget *graph_button;
GtkWidget *sequence_button;
if ( ctx->refine_window ) return;
@@ -483,10 +416,6 @@ void refine_open(ControlContext *ctx) {
gtk_table_attach_defaults(GTK_TABLE(table), step_button, 1, 2, 2, 3);
g_signal_connect(G_OBJECT(step_button), "clicked", G_CALLBACK(refine_step), ctx);
- graph_button = gtk_button_new_with_label("Show Graph of Deviation Against Parameter");
- gtk_table_attach_defaults(GTK_TABLE(table), graph_button, 1, 2, 3, 4);
- g_signal_connect(G_OBJECT(graph_button), "clicked", G_CALLBACK(refine_graph), ctx);
-
label = gtk_label_new("Sequencing");
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
gtk_label_set_markup(GTK_LABEL(label), "<span weight=\"bold\">Sequencing</span>");