aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-06 16:45:08 +0100
committerThomas White <taw@physics.org>2010-01-06 16:45:08 +0100
commita9adb8fc595b232524fad7101d3c17af6347d959 (patch)
treede8c82cdec3ff42557cfd1f1c4f6811fceba7066
parent7d6baa8ad9915fc58c4e992cc04d62681ddb559d (diff)
Break off indexing peak search
-rw-r--r--src/dirax.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/dirax.c b/src/dirax.c
index 02837c9d..c9c5f010 100644
--- a/src/dirax.c
+++ b/src/dirax.c
@@ -371,13 +371,10 @@ static int map_position(struct image *image, double x, double y,
}
-void index_pattern(struct image *image)
+static void search_peaks(struct image *image)
{
FILE *fh;
- unsigned int opts;
- int saved_stderr;
int x, y;
- GMainLoop *ml;
fh = fopen("xfel.drx", "w");
if ( !fh ) {
@@ -407,6 +404,17 @@ void index_pattern(struct image *image)
}
fclose(fh);
+}
+
+
+void index_pattern(struct image *image)
+{
+ unsigned int opts;
+ int saved_stderr;
+ GMainLoop *ml;
+
+ /* Do peak search and splurge out 'xfel.drx' */
+ search_peaks(image);
saved_stderr = dup(STDERR_FILENO);
image->dirax_pid = forkpty(&image->dirax_pty, NULL, NULL, NULL);