aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-06-20 17:17:08 +0200
committerThomas White <taw@physics.org>2019-06-21 15:37:24 +0200
commit4479b302e18238fdaae3eb8a02626dd4c8f8cf3b (patch)
treec915847a663d9d07de19ef8462c094cdba4b276d /src
parente8f3015616bc7232085b3ae5ceb94f82a941c56e (diff)
partialator: Add --force-lambda
Diffstat (limited to 'src')
-rw-r--r--src/partialator.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 4ea1e5e6..82580e4c 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -336,7 +336,8 @@ static void show_help(const char *s)
" -w <pg> Apparent point group for resolving ambiguities.\n"
" --operator=<op> Indexing ambiguity operator for resolving.\n"
" --force-bandwidth=<n> Set all bandwidths to <n> (fraction).\n"
-" --force-radius=<n> Set all profile radii to <n> nm^-1.\n");
+" --force-radius=<n> Set all profile radii to <n> nm^-1.\n"
+" --force-lambda=<n> Set all wavelengths to <n> A.\n");
}
@@ -953,6 +954,7 @@ int main(int argc, char *argv[])
char *operator = NULL;
double force_bandwidth = -1.0;
double force_radius = -1.0;
+ double force_lambda = -1.0;
char *audit_info;
int scaleflags = 0;
double min_res = 0.0;
@@ -985,6 +987,7 @@ int main(int argc, char *argv[])
{"force-bandwidth", 1, NULL, 10},
{"force-radius", 1, NULL, 11},
{"min-res", 1, NULL, 12},
+ {"force-lambda", 1, NULL, 13},
{"no-scale", 0, &no_scale, 1},
{"no-Bscale", 0, &no_Bscale, 1},
@@ -1154,6 +1157,17 @@ int main(int argc, char *argv[])
min_res = 1e10/min_res;
break;
+ case 13 :
+ errno = 0;
+ force_lambda = strtod(optarg, &rval);
+ if ( *rval != '\0' ) {
+ ERROR("Invalid value for --force-lambda.\n");
+ return 1;
+ }
+ force_lambda *= 1e-10;
+ break;
+
+
case 0 :
break;
@@ -1444,6 +1458,9 @@ int main(int argc, char *argv[])
if ( force_radius > 0.0 ) {
crystal_set_profile_radius(cr, force_radius);
}
+ if ( force_lambda > 0.0 ) {
+ crystal_get_image(cr)->lambda = force_lambda;
+ }
update_predictions(cr);
calculate_partialities(cr, pmodel);
}