aboutsummaryrefslogtreecommitdiff
path: root/src/process_image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-03-18 11:17:12 +0100
committerThomas White <taw@physics.org>2015-04-20 15:50:39 +0200
commit0f8947ac56036aec38f60710b2dcffa9e5499201 (patch)
tree8a40ec2e43885f71c5709a13ff4376ef3b9d09cd /src/process_image.c
parentc18a02f6e07ad21fee5c7e6a1fc0e6f64efba17c (diff)
Record profile radius before and after refinement
Diffstat (limited to 'src/process_image.c')
-rw-r--r--src/process_image.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/process_image.c b/src/process_image.c
index da9f3f4a..3123140d 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -317,7 +317,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
iargs->ir_inn, iargs->ir_mid, iargs->ir_out,
INTDIAG_NONE, 0, 0, 0, results_pipe);
- /* FIXME: Temporary to monitor R during refinement */
+ /* Measure R before refinement */
for ( i=0; i<image.n_crystals; i++ ) {
refine_radius(image.crystals[i], image.features);
}
@@ -328,22 +328,28 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
for ( i=0; i<image.n_crystals; i++ ) {
+ double old_R, new_R;
+ char notes[1024];
+
if ( refine_prediction(&image, image.crystals[i]) ) {
ERROR("Prediction refinement failed.\n");
crystal_set_user_flag(image.crystals[i], 1);
continue;
}
- STATUS("R before: %e",
- crystal_get_profile_radius(image.crystals[i]));
+ old_R = crystal_get_profile_radius(image.crystals[i]);
/* Reset the profile radius and estimate again with
* better geometry */
crystal_set_profile_radius(image.crystals[i], 0.02e9);
refine_radius(image.crystals[i], image.features);
- STATUS(" after: %e\n",
- crystal_get_profile_radius(image.crystals[i]));
+ new_R = crystal_get_profile_radius(image.crystals[i]);
+
+ snprintf(notes, 1024, "predict_refine/R old "
+ "= %.5f new = %.5f nm^-1",
+ old_R/1e9, new_R/1e9);
+ crystal_set_notes(image.crystals[i], notes);
}