aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R. Beyerlein <ken.beyerlein@gmail.com>2017-12-07 23:10:51 +0100
committerThomas White <taw@physics.org>2018-02-08 16:32:08 +0100
commitec8804fbba5b4e6565fc2d42341ee837e968f89d (patch)
treecef0c2caf965c199013e08179e10c0a8f59bee68
parentaf83c9f590349612fa3cff378ae165b33c0fe8f5 (diff)
Add Felix option felix-max-inter-angle
-rw-r--r--libcrystfel/src/felix.c9
-rw-r--r--libcrystfel/src/felix.h1
-rw-r--r--src/indexamajig.c10
3 files changed, 17 insertions, 3 deletions
diff --git a/libcrystfel/src/felix.c b/libcrystfel/src/felix.c
index 73a1423f..913e8513 100644
--- a/libcrystfel/src/felix.c
+++ b/libcrystfel/src/felix.c
@@ -60,8 +60,6 @@
#define FELIX_VERBOSE 0
-#define MAX_MEAN_IA 0.25
-#define MIN_NGV 15
#define MIN_NGV_UNIQUE 10
@@ -90,6 +88,7 @@ struct felix_private
float sigma_omega; /* related to "uncertainties" */
int n_sigmas;
int force4frustums;
+ float max_internal_angle;
/*Felix v0.3 options*/
int orispace_frustum;
@@ -209,7 +208,7 @@ static int read_felix(struct felix_private *gp, struct image *image,
/* Poor indexing criterion for Felix v0.3 */
- if ( mean_ia > MAX_MEAN_IA || ngv < MIN_NGV ){
+ if ( mean_ia > gp->max_internal_angle ){
crystal_set_user_flag(cr, 1);
}
@@ -661,6 +660,7 @@ void *felix_prepare(IndexingMethod *indm, UnitCell *cell,
gp->maxtime = 120.0;
gp->tthrange_min = deg2rad(0.0);
gp->tthrange_max = deg2rad(30.0);
+ gp->max_internal_angle = 0.25;
if ( opts->ttmin > 0.0 ) {
gp->tthrange_min = opts->ttmin;
@@ -691,6 +691,9 @@ void *felix_prepare(IndexingMethod *indm, UnitCell *cell,
if (opts->domega > 0.0 ) {
gp->domega = opts -> domega;
}
+ if (opts->max_internal_angle > 0){
+ gp->max_internal_angle = opts->max_internal_angle;
+ }
return (IndexingPrivate *)gp;
}
diff --git a/libcrystfel/src/felix.h b/libcrystfel/src/felix.h
index 4cb9c266..32980071 100644
--- a/libcrystfel/src/felix.h
+++ b/libcrystfel/src/felix.h
@@ -47,6 +47,7 @@ struct felix_options
double test_fraction;
double sigma;
double domega;
+ double max_internal_angle;
};
extern void *felix_prepare(IndexingMethod *indm, UnitCell *cell,
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 29870957..964e6d04 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -299,6 +299,7 @@ int main(int argc, char *argv[])
iargs.felix_opts.test_fraction = -1.0;
iargs.felix_opts.sigma = -1.0;
iargs.felix_opts.domega = -1.0;
+ iargs.felix_opts.max_internal_angle = -1.0;
/* Long options */
const struct option longopts[] = {
@@ -391,6 +392,7 @@ int main(int argc, char *argv[])
{"felix-sigma", 1, NULL, 43},
{"serial-start", 1, NULL, 44},
{"felix-domega", 1, NULL, 45},
+ {"felix-max-inter-angle", 1, NULL, 46},
{0, 0, NULL, 0}
};
@@ -709,6 +711,14 @@ int main(int argc, char *argv[])
}
break;
+ case 46:
+ if ( sscanf(optarg, "%lf", &iargs.felix_opts.max_internal_angle) != 1 )
+ {
+ ERROR("Invalid value for --felix-max-inter-angle\n");
+ return 1;
+ }
+ break;
+
case 0 :
break;