aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-09 17:35:20 -0800
committerThomas White <taw@physics.org>2013-02-09 17:35:20 -0800
commit5a98496730bbbee2bd5e6da6eff416bd9c8c051f (patch)
tree23d7e7c9bd2dc99876b2e71591545d8eeeca9def
parent8adbbf7d02c66607c435a26d3cab9d28b640f9f1 (diff)
Add '--res-cutoff'
-rw-r--r--libcrystfel/src/peaks.c9
-rw-r--r--libcrystfel/src/peaks.h2
-rw-r--r--src/im-sandbox.c3
3 files changed, 8 insertions, 6 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 31eea0cb..6c09053b 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -714,7 +714,8 @@ static struct integr_ind *sort_reflections(RefList *list, UnitCell *cell,
static void integrate_crystal(Crystal *cr, struct image *image, int use_closer,
int bgsub, double min_snr,
double ir_inn, double ir_mid, double ir_out,
- int integrate_saturated, int **bgMasks)
+ int integrate_saturated, int **bgMasks,
+ int res_cutoff)
{
RefList *reflections;
struct integr_ind *il;
@@ -831,7 +832,7 @@ static void integrate_crystal(Crystal *cr, struct image *image, int use_closer,
}
//STATUS("%5.2f A, %5.2f, av %5.2f\n",
// 1e10/il[i].res, snr, av);
- //if ( av < 1.0 ) break;
+ if ( res_cutoff && (av < 1.0) ) break;
}
}
@@ -846,7 +847,7 @@ static void integrate_crystal(Crystal *cr, struct image *image, int use_closer,
void integrate_reflections(struct image *image, int use_closer, int bgsub,
double min_snr,
double ir_inn, double ir_mid, double ir_out,
- int integrate_saturated)
+ int integrate_saturated, int res_cutoff)
{
int i;
int **bgMasks;
@@ -870,7 +871,7 @@ void integrate_reflections(struct image *image, int use_closer, int bgsub,
for ( i=0; i<image->n_crystals; i++ ) {
integrate_crystal(image->crystals[i], image, use_closer,
bgsub, min_snr, ir_inn, ir_mid, ir_out,
- integrate_saturated, bgMasks);
+ integrate_saturated, bgMasks, res_cutoff);
}
for ( i=0; i<image->det->n_panels; i++ ) {
diff --git a/libcrystfel/src/peaks.h b/libcrystfel/src/peaks.h
index b00edf00..6be728fe 100644
--- a/libcrystfel/src/peaks.h
+++ b/libcrystfel/src/peaks.h
@@ -45,7 +45,7 @@ extern void search_peaks(struct image *image, float threshold,
extern void integrate_reflections(struct image *image,
int use_closer, int bgsub, double min_snr,
double ir_inn, double ir_mid, double ir_out,
- int integrate_saturated);
+ int integrate_saturated, int res_cutoff);
extern int peak_sanity_check(struct image *image, Crystal **crystals,
int n_cryst);
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index 17dc3dc6..7494a527 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -340,7 +340,8 @@ static void process_image(const struct index_args *iargs,
iargs->ir_inn,
iargs->ir_mid,
iargs->ir_out,
- iargs->integrate_saturated);
+ iargs->integrate_saturated,
+ iargs->res_cutoff);
write_chunk(st, &image, hdfile,
iargs->include_peaks, iargs->include_reflections);