aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/integration.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-05-28 18:11:01 +0200
committerThomas White <taw@physics.org>2013-05-28 18:11:29 +0200
commit2c34acf304930286ab165b5059bbf8782333390d (patch)
tree806910e91b487436ed1a30df9cea54b87c987f7c /libcrystfel/src/integration.c
parenta2e0045930dfc005160ec8d10becde3847cd8048 (diff)
Add "-cen"
Diffstat (limited to 'libcrystfel/src/integration.c')
-rw-r--r--libcrystfel/src/integration.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index e9ba259d..d6fc6ce5 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -1062,6 +1062,7 @@ static void measure_all_intensities(IntegrationMethod meth, RefList *list,
* in overall data block */
int cfs, css; /* Corner coordinates */
int saturated;
+ int r;
set_redundancy(refl, 0);
@@ -1089,7 +1090,12 @@ static void measure_all_intensities(IntegrationMethod meth, RefList *list,
/* Which reference profile? */
bx->rp = 0;//bx->pn;
- if ( center_and_check_box(&ic, bx, &saturated) ) {
+ if ( meth & INTEGRATION_CENTER ) {
+ r = center_and_check_box(&ic, bx, &saturated);
+ } else {
+ r = check_box(&ic, bx, &saturated);
+ }
+ if ( r ) {
delete_box(&ic, bx);
continue;
}
@@ -1489,6 +1495,7 @@ static void integrate_rings(IntegrationMethod meth, Crystal *cr,
double sigma, snr;
int saturated;
double one_over_d;
+ int r;
set_redundancy(refl, 0);
@@ -1513,7 +1520,12 @@ static void integrate_rings(IntegrationMethod meth, Crystal *cr,
bx->p = p;
bx->pn = pn;
- if ( center_and_check_box(&ic, bx, &saturated) ) {
+ if ( meth & INTEGRATION_CENTER ) {
+ r = center_and_check_box(&ic, bx, &saturated);
+ } else {
+ r = check_box(&ic, bx, &saturated);
+ }
+ if ( r ) {
delete_box(&ic, bx);
continue;
}
@@ -1615,6 +1627,15 @@ IntegrationMethod integration_method(const char *str, int *err)
} else if ( strcmp(methods[i], "sat") == 0) {
meth |= INTEGRATION_SATURATED;
+ } else if ( strcmp(methods[i], "nosat") == 0) {
+ meth &= ~INTEGRATION_SATURATED;
+
+ } else if ( strcmp(methods[i], "cen") == 0) {
+ meth |= INTEGRATION_CENTER;
+
+ } else if ( strcmp(methods[i], "nocen") == 0) {
+ meth &= ~INTEGRATION_CENTER;
+
} else {
ERROR("Bad integration method: '%s'\n", str);
if ( err != NULL ) *err = 1;