aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-09-07 15:50:41 +0200
committerThomas White <taw@physics.org>2018-09-07 15:50:41 +0200
commit6ea010ba017579d0197f45c940f03d04800e24e7 (patch)
tree7a0c22bafaaab5ce5f7f39a538f219917ff384d9 /src
parenta61dc5721a2896267dcd783389908bf9f54ff21a (diff)
partialator: Add option to disable deltaCChalf
Diffstat (limited to 'src')
-rw-r--r--src/partialator.c7
-rw-r--r--src/rejection.c11
-rw-r--r--src/rejection.h6
3 files changed, 15 insertions, 9 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 113535e0..fa07eab7 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -318,6 +318,7 @@ static void show_help(const char *s)
" --no-scale Disable scale factor (G, B) refinement.\n"
" --no-Bscale Disable B factor scaling.\n"
" --no-pr Disable orientation/physics refinement.\n"
+" --no-deltacchalf Disable rejection based on deltaCChalf.\n"
" -m, --model=<model> Specify partiality model.\n"
" --min-measurements=<n> Minimum number of measurements to require.\n"
" --no-polarisation Disable polarisation correction.\n"
@@ -912,6 +913,7 @@ int main(int argc, char *argv[])
int scaleflags = 0;
double min_res = 0.0;
int do_write_logs = 0;
+ int no_deltacchalf = 0;
/* Long options */
const struct option longopts[] = {
@@ -950,6 +952,7 @@ int main(int argc, char *argv[])
{"no-free", 0, &no_free, 1},
{"output-every-cycle", 0, &output_everycycle, 1},
{"no-logs", 0, &no_logs, 1},
+ {"no-deltacchalf", 0, &no_deltacchalf, 1},
{0, 0, NULL, 0}
};
@@ -1412,7 +1415,7 @@ int main(int argc, char *argv[])
}
/* Check rejection and write figures of merit */
- check_rejection(crystals, n_crystals, full, max_B);
+ check_rejection(crystals, n_crystals, full, max_B, no_deltacchalf);
show_all_residuals(crystals, n_crystals, full);
if ( do_write_logs ) {
@@ -1443,7 +1446,7 @@ int main(int argc, char *argv[])
push_res, 1);
} /* else full still equals reference */
- check_rejection(crystals, n_crystals, full, max_B);
+ check_rejection(crystals, n_crystals, full, max_B, no_deltacchalf);
show_all_residuals(crystals, n_crystals, full);
if ( do_write_logs ) {
diff --git a/src/rejection.c b/src/rejection.c
index 01ed2cf0..371216a9 100644
--- a/src/rejection.c
+++ b/src/rejection.c
@@ -3,11 +3,11 @@
*
* Crystal rejection for scaling
*
- * Copyright © 2012-2015 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2018 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2015 Thomas White <taw@physics.org>
+ * 2010-2018 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -254,13 +254,16 @@ static void show_duds(Crystal **crystals, int n_crystals)
}
-void check_rejection(Crystal **crystals, int n, RefList *full, double max_B)
+void check_rejection(Crystal **crystals, int n, RefList *full, double max_B,
+ int no_deltacchalf)
{
int i;
int n_acc = 0;
/* Check according to delta CC½ */
- if ( full != NULL ) check_deltacchalf(crystals, n, full);
+ if ( !no_deltacchalf && (full != NULL) ) {
+ check_deltacchalf(crystals, n, full);
+ }
for ( i=0; i<n; i++ ) {
if ( fabs(crystal_get_Bfac(crystals[i])) > max_B ) {
diff --git a/src/rejection.h b/src/rejection.h
index 8979313b..5a0c3e9f 100644
--- a/src/rejection.h
+++ b/src/rejection.h
@@ -3,11 +3,11 @@
*
* Crystal rejection for scaling
*
- * Copyright © 2012-2015 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2018 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2015 Thomas White <taw@physics.org>
+ * 2010-2018 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -39,6 +39,6 @@
extern void early_rejection(Crystal **crystals, int n);
extern void check_rejection(Crystal **crystals, int n, RefList *full,
- double max_B);
+ double max_B, int no_deltacchalf);
#endif /* REJECTION_H */