aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Hogan-Lamarre <pascal.hogan@gmail.com>2020-09-16 22:35:42 -0400
committerPascal Hogan-Lamarre <pascal.hogan@gmail.com>2020-09-16 22:35:42 -0400
commitc97685fbeca127373ffb0a6cc1f2222e12a91f1e (patch)
treec8ab29bd04a1a997a3339781f959b1f13c488e9e
parent5963ae8133473b5957f607cbc6fd9a5ccefa34f9 (diff)
if-conditions that prevent modification of the profile_radius read from file
-rw-r--r--libcrystfel/src/index.c4
-rw-r--r--src/process_image.c11
2 files changed, 11 insertions, 4 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index c8e34b23..e0e8ff05 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -664,7 +664,9 @@ static int try_indexer(struct image *image, IndexingMethod indm,
Crystal *cr = image->crystals[this_crystal];
crystal_set_image(cr, image);
- crystal_set_profile_radius(cr, 0.02e9);
+ if ( indm != INDEXING_FILE){
+ crystal_set_profile_radius(cr, 0.02e9);
+ }
crystal_set_mosaicity(cr, 0.0);
/* Pre-refinement unit cell check if requested */
diff --git a/src/process_image.c b/src/process_image.c
index 1e6bb814..003886c4 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -430,15 +430,20 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
}
} else {
for ( i=0; i<image.n_crystals; i++ ) {
- crystal_set_profile_radius(image.crystals[i], 0.02e9);
+ if ( image.indexed_by != INDEXING_FILE){
+ crystal_set_profile_radius(image.crystals[i], 0.02e9);
+ }
crystal_set_mosaicity(image.crystals[i], 0.0);
}
}
+
if ( iargs->fix_profile_r < 0.0 ) {
for ( i=0; i<image.n_crystals; i++ ) {
- if ( refine_radius(image.crystals[i], &image) ) {
- ERROR("WARNING: Radius determination failed\n");
+ if ( image.indexed_by != INDEXING_FILE){
+ if ( refine_radius(image.crystals[i], &image) ) {
+ ERROR("WARNING: Radius determination failed\n");
+ }
}
}
}