aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-01-19 13:17:40 +0100
committerThomas White <taw@physics.org>2018-02-27 17:12:41 +0100
commit0f24c4fb9451f1c32fb89534b37bf7f804e37d99 (patch)
tree1a55f6dd1ba4c477e6aecd3141a298dcd420eb58
parentd813960912ddc76d5cff0501b4f7783c3eeca95d (diff)
indexamajig: Add --overpredict
-rw-r--r--doc/man/indexamajig.15
-rw-r--r--libcrystfel/src/integration.c26
-rw-r--r--libcrystfel/src/integration.h6
-rw-r--r--src/indexamajig.c3
-rw-r--r--src/process_image.c4
-rw-r--r--src/process_image.h1
6 files changed, 41 insertions, 4 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
index a434bf05..3f49701f 100644
--- a/doc/man/indexamajig.1
+++ b/doc/man/indexamajig.1
@@ -409,6 +409,11 @@ Show detailed information about reflection integration when \fIcondition\fR is m
.PD
When \fBrescut\fR is in the integration method, integrate \fIn\fR nm^-1 higher than the apparent resolution limit of each individual crystal. If \fBrescut\fR is not used, this option has no effect. \fIn\fR can be negative to integrate \fIlower\fR than the apparent resolution limit. The default is \fB--push-res=0\fR, but note that the default integration method does \fInot\fR include \fBrescut\fR, so no per-pattern resolution cutoff is used. Note that you can also apply this cutoff at the merging stage using \fBprocess_hkl --push-res\fR.
+.PD 0
+.IP \fB--overpredict\fR
+.PD
+Over-predict reflections. This is needed to provide a buffer zone when using post-refinement, but makes it difficult to judge the accuracy of the predictions because there are so many reflections. It will also reduce the quality of the merged data if you merge without partiality estimation.
+
.SH OUTPUT OPTIONS
.PD 0
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index 96eec92a..c18ae110 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -1651,12 +1651,12 @@ static void integrate_rings(IntegrationMethod meth,
}
-void integrate_all_4(struct image *image, IntegrationMethod meth,
+void integrate_all_5(struct image *image, IntegrationMethod meth,
PartialityModel pmodel, double push_res,
double ir_inn, double ir_mid, double ir_out,
IntDiag int_diag,
signed int idh, signed int idk, signed int idl,
- pthread_mutex_t *term_lock)
+ pthread_mutex_t *term_lock, int overpredict)
{
int i;
int *masks[image->det->n_panels];
@@ -1668,6 +1668,12 @@ void integrate_all_4(struct image *image, IntegrationMethod meth,
RefList *list;
double res;
+ double saved_R = crystal_get_profile_radius(image->crystals[i]);
+
+ if ( overpredict ) {
+ crystal_set_profile_radius(image->crystals[i],
+ saved_R * 5);
+ }
res = estimate_resolution(crystal_get_cell(image->crystals[i]),
image->features);
@@ -1676,6 +1682,10 @@ void integrate_all_4(struct image *image, IntegrationMethod meth,
list = predict_to_res(image->crystals[i], res+push_res);
crystal_set_reflections(image->crystals[i], list);
+ if ( overpredict ) {
+ crystal_set_profile_radius(image->crystals[i], saved_R);
+ }
+
}
for ( i=0; i<image->det->n_panels; i++ ) {
@@ -1721,6 +1731,18 @@ void integrate_all_4(struct image *image, IntegrationMethod meth,
}
+void integrate_all_4(struct image *image, IntegrationMethod meth,
+ PartialityModel pmodel, double push_res,
+ double ir_inn, double ir_mid, double ir_out,
+ IntDiag int_diag,
+ signed int idh, signed int idk, signed int idl,
+ pthread_mutex_t *term_lock)
+{
+ integrate_all_5(image, meth, pmodel, 0.0, ir_inn, ir_mid, ir_out,
+ int_diag, idh, idk, idl, 0, 0);
+}
+
+
void integrate_all_3(struct image *image, IntegrationMethod meth,
PartialityModel pmodel, double push_res,
double ir_inn, double ir_mid, double ir_out,
diff --git a/libcrystfel/src/integration.h b/libcrystfel/src/integration.h
index 2dd6139a..3bf11ee8 100644
--- a/libcrystfel/src/integration.h
+++ b/libcrystfel/src/integration.h
@@ -130,6 +130,12 @@ extern void integrate_all_4(struct image *image, IntegrationMethod meth,
signed int idh, signed int idk, signed int idl,
pthread_mutex_t *term_lock);
+extern void integrate_all_5(struct image *image, IntegrationMethod meth,
+ PartialityModel pmodel, double push_res,
+ double ir_inn, double ir_mid, double ir_out,
+ IntDiag int_diag,
+ signed int idh, signed int idk, signed int idl,
+ pthread_mutex_t *term_lock, int overpredict);
#ifdef __cplusplus
}
diff --git a/src/indexamajig.c b/src/indexamajig.c
index c5249db3..a6651497 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -174,6 +174,7 @@ static void show_help(const char *s)
" --int-radius=<r> Set the integration radii. Default: 4,5,7.\n"
" --int-diag=<cond> Show debugging information about reflections\n"
" --push-res=<n> Integrate higher than apparent resolution cutoff\n"
+" --overpredict Over-predict reflections (for post-refinement)\n"
"\nOutput options:\n\n"
" --no-non-hits-in-stream\n"
" Do not include non-hit frames in the stream\n"
@@ -281,6 +282,7 @@ int main(int argc, char *argv[])
iargs.int_diag = INTDIAG_NONE;
iargs.copyme = new_imagefile_field_list();
iargs.min_peaks = 0;
+ iargs.overpredict = 0;
if ( iargs.copyme == NULL ) {
ERROR("Couldn't allocate HDF5 field list.\n");
return 1;
@@ -343,6 +345,7 @@ int main(int argc, char *argv[])
{"check-peaks", 0, &if_peaks, 1},
{"no-retry", 0, &if_retry, 0},
{"no-multi", 0, &if_multi, 0},
+ {"overpredict", 0, &iargs.overpredict, 1},
/* Long-only options which don't actually do anything */
{"no-sat-corr", 0, &iargs.satcorr, 0},
diff --git a/src/process_image.c b/src/process_image.c
index 498b3398..cb1d65a3 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -301,12 +301,12 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
/* Integrate! */
time_accounts_set(taccs, TACC_INTEGRATION);
sb_shared->pings[cookie]++;
- integrate_all_4(&image, iargs->int_meth, PMODEL_SCSPHERE,
+ integrate_all_5(&image, iargs->int_meth, PMODEL_SCSPHERE,
iargs->push_res,
iargs->ir_inn, iargs->ir_mid, iargs->ir_out,
iargs->int_diag, iargs->int_diag_h,
iargs->int_diag_k, iargs->int_diag_l,
- &sb_shared->term_lock);
+ &sb_shared->term_lock, iargs->overpredict);
streamwrite:
time_accounts_set(taccs, TACC_WRITESTREAM);
diff --git a/src/process_image.h b/src/process_image.h
index 861ee203..6d170a39 100644
--- a/src/process_image.h
+++ b/src/process_image.h
@@ -100,6 +100,7 @@ struct index_args
float fix_profile_r;
float fix_bandwidth;
float fix_divergence;
+ int overpredict;
int profile; /* Whether or not to do wall clock profiling */
struct taketwo_options taketwo_opts;
struct felix_options felix_opts;