aboutsummaryrefslogtreecommitdiff
path: root/src/indexamajig.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-04-16 19:18:41 +0200
committerThomas White <taw@physics.org>2010-04-16 19:20:47 +0200
commitca7215bc0355d78d6a5f3ff4fcb629c614f5b201 (patch)
tree4e0ffb7a88ffb802e00a8c18ead87469fd51de42 /src/indexamajig.c
parentd0ef10cc38b8abda688d3024c6f60a8e9074cb7e (diff)
Push output stream mutex down, and improve output of --near-bragg and --dump-peaks
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r--src/indexamajig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 47d9a971..d61e6af5 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -189,6 +189,7 @@ static struct image *get_simage(struct image *template, int alternate)
image->lambda = ph_en_to_lambda(eV_to_J(1.8e3));
image->features = template->features;
image->filename = template->filename;
+ image->indexed_cell = template->indexed_cell;
return image;
}
@@ -296,7 +297,7 @@ static void *process_image(void *pargsv)
search_peaks(&image);
if ( image_feature_count(image.features) < 5 ) goto done;
- if ( config_dumpfound ) dump_peaks(&image);
+ if ( config_dumpfound ) dump_peaks(&image, pargs->output_mutex);
/* Not indexing nor writing xfel.drx?
* Then there's nothing left to do. */
@@ -319,9 +320,8 @@ static void *process_image(void *pargsv)
if ( config_nearbragg ) {
/* Use original data (temporarily) */
simage->data = data_for_measurement;
- pthread_mutex_lock(pargs->output_mutex);
- output_intensities(simage, image.indexed_cell);
- pthread_mutex_unlock(pargs->output_mutex);
+ output_intensities(simage, image.indexed_cell,
+ pargs->output_mutex);
simage->data = NULL;
}