diff options
author | Thomas White <taw@physics.org> | 2010-02-02 18:12:29 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-02-02 18:12:29 +0100 |
commit | 7df59f9bc7acedb5f8aa01ad12f2f22d271a0f58 (patch) | |
tree | 9bc98ff31e5f37068169cf82cd645877ce22ea5f /src/dirax.c | |
parent | 9fed7cd780eb4912602f76323a0430a48cfd0834 (diff) |
Tidy up options
This also simplifies quite a lot of code
Diffstat (limited to 'src/dirax.c')
-rw-r--r-- | src/dirax.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/dirax.c b/src/dirax.c index 4161c79c..6b77d888 100644 --- a/src/dirax.c +++ b/src/dirax.c @@ -309,34 +309,10 @@ static gboolean dirax_readable(GIOChannel *dirax, GIOCondition condition, } -void run_dirax(struct image *image, int no_index) +void run_dirax(struct image *image) { unsigned int opts; int saved_stderr; - FILE *fh; - int i; - - fh = fopen("xfel.drx", "w"); - if ( !fh ) { - ERROR("Couldn't open temporary file xfel.drx\n"); - return; - } - fprintf(fh, "%f\n", 0.5); /* Lie about the wavelength. */ - - for ( i=0; i<image_feature_count(image->features); i++ ) { - - struct imagefeature *f; - - f = image_get_feature(image->features, i); - if ( f == NULL ) continue; - - fprintf(fh, "%10f %10f %10f %8f\n", - f->rx/1e10, f->ry/1e10, f->rz/1e10, 1.0); - - } - fclose(fh); - - if ( no_index ) return; saved_stderr = dup(STDERR_FILENO); image->dirax_pid = forkpty(&image->dirax_pty, NULL, NULL, NULL); |