aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-09-22 16:30:23 +0200
committerThomas White <taw@physics.org>2017-09-22 16:31:21 +0200
commit0ba6ac905f656be5fbdda0f681e618789c1e3a27 (patch)
treea4d13a49df7c2b2f39d80d290bb909eb2405da48 /libcrystfel
parent7620fbe1a63a6ebb88cb573559dfddcdc4708750 (diff)
Don't send detector and tolerance to indexing methods
The detector isn't used for anything, and the tolerance is none of their business.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/asdf.c11
-rw-r--r--libcrystfel/src/asdf.h8
-rw-r--r--libcrystfel/src/dirax.c5
-rw-r--r--libcrystfel/src/dirax.h3
-rw-r--r--libcrystfel/src/felix.c3
-rw-r--r--libcrystfel/src/felix.h1
-rw-r--r--libcrystfel/src/index.c15
-rw-r--r--libcrystfel/src/mosflm.c5
-rw-r--r--libcrystfel/src/mosflm.h3
-rw-r--r--libcrystfel/src/taketwo.c5
-rw-r--r--libcrystfel/src/taketwo.h3
-rw-r--r--libcrystfel/src/xds.c5
-rw-r--r--libcrystfel/src/xds.h3
13 files changed, 21 insertions, 49 deletions
diff --git a/libcrystfel/src/asdf.c b/libcrystfel/src/asdf.c
index e65007c5..869d9256 100644
--- a/libcrystfel/src/asdf.c
+++ b/libcrystfel/src/asdf.c
@@ -62,7 +62,6 @@ struct fftw_vars {
struct asdf_private {
IndexingMethod indm;
- float *ltl;
UnitCell *template;
struct fftw_vars fftw;
};
@@ -1082,8 +1081,6 @@ int run_asdf(struct image *image, void *ipriv)
d_max = max(a, b, c) * 3 * 1e10;
double volume = cell_get_volume(dp->template);
- double vtol = (dp->ltl[0] + dp->ltl[1] + dp->ltl[2]) / 100 +
- dp->ltl[3] / 180 * M_PI;
/* Divide volume constraints by number of lattice points per
* unit cell since asdf always finds primitive cell */
@@ -1095,8 +1092,8 @@ int run_asdf(struct image *image, void *ipriv)
centering == 'I' ) latt_points_per_uc = 2;
else if ( centering == 'F' ) latt_points_per_uc = 4;
- volume_min = volume * (1 - vtol)/latt_points_per_uc;
- volume_max = volume * (1 + vtol)/latt_points_per_uc;
+ volume_min = volume * 0.9/latt_points_per_uc;
+ volume_max = volume * 1.1/latt_points_per_uc;
}
int n = image_feature_count(image->features);
@@ -1165,8 +1162,7 @@ int run_asdf(struct image *image, void *ipriv)
}
-void *asdf_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+void *asdf_prepare(IndexingMethod *indm, UnitCell *cell)
{
struct asdf_private *dp;
@@ -1176,7 +1172,6 @@ void *asdf_prepare(IndexingMethod *indm, UnitCell *cell,
dp = malloc(sizeof(struct asdf_private));
if ( dp == NULL ) return NULL;
- dp->ltl = ltl;
dp->template = cell;
dp->indm = *indm;
diff --git a/libcrystfel/src/asdf.h b/libcrystfel/src/asdf.h
index f130d63d..7f110960 100644
--- a/libcrystfel/src/asdf.h
+++ b/libcrystfel/src/asdf.h
@@ -45,9 +45,7 @@ extern "C" {
extern int run_asdf(struct image *image, void *ipriv);
-extern void *asdf_prepare(IndexingMethod *indm,
- UnitCell *cell, struct detector *det,
- float *ltl);
+extern void *asdf_prepare(IndexingMethod *indm, UnitCell *cell);
extern void asdf_cleanup(void *pp);
@@ -60,9 +58,7 @@ int run_asdf(struct image *image, void *ipriv)
}
-void *asdf_prepare(IndexingMethod *indm,
- UnitCell *cell, struct detector *det,
- float *ltl)
+void *asdf_prepare(IndexingMethod *indm, UnitCell *cell)
{
ERROR("This copy of CrystFEL was compiled without FFTW support.\n");
ERROR("To use asdf indexing, recompile with FFTW.\n");
diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c
index 764a6be1..f781d7e2 100644
--- a/libcrystfel/src/dirax.c
+++ b/libcrystfel/src/dirax.c
@@ -65,7 +65,6 @@ typedef enum {
struct dirax_private {
IndexingMethod indm;
- float *ltl;
UnitCell *template;
};
@@ -601,8 +600,7 @@ int run_dirax(struct image *image, void *ipriv)
}
-void *dirax_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+void *dirax_prepare(IndexingMethod *indm, UnitCell *cell)
{
struct dirax_private *dp;
@@ -612,7 +610,6 @@ void *dirax_prepare(IndexingMethod *indm, UnitCell *cell,
dp = malloc(sizeof(struct dirax_private));
if ( dp == NULL ) return NULL;
- dp->ltl = ltl;
dp->template = cell;
dp->indm = *indm;
diff --git a/libcrystfel/src/dirax.h b/libcrystfel/src/dirax.h
index 96ba6dbc..db03abf8 100644
--- a/libcrystfel/src/dirax.h
+++ b/libcrystfel/src/dirax.h
@@ -41,8 +41,7 @@ extern "C" {
extern int run_dirax(struct image *image, void *ipriv);
-extern void *dirax_prepare(IndexingMethod *indm,
- UnitCell *cell, struct detector *det, float *ltl);
+extern void *dirax_prepare(IndexingMethod *indm, UnitCell *cell);
extern void dirax_cleanup(void *pp);
diff --git a/libcrystfel/src/felix.c b/libcrystfel/src/felix.c
index 4c12778b..973b0513 100644
--- a/libcrystfel/src/felix.c
+++ b/libcrystfel/src/felix.c
@@ -649,8 +649,7 @@ static void parse_options(const char *options, struct felix_private *gp)
free(option);
}
-void *felix_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl, const char *options)
+void *felix_prepare(IndexingMethod *indm, UnitCell *cell, const char *options)
{
struct felix_private *gp;
diff --git a/libcrystfel/src/felix.h b/libcrystfel/src/felix.h
index c06e963a..40568d37 100644
--- a/libcrystfel/src/felix.h
+++ b/libcrystfel/src/felix.h
@@ -37,7 +37,6 @@
#include "cell.h"
extern void *felix_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl,
const char *options);
extern void felix_cleanup(IndexingPrivate *pp);
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index a9fff11a..9a0cb8cf 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -197,7 +197,6 @@ static char *friendly_indexer_name(IndexingMethod m)
static void *prepare_method(IndexingMethod *m, UnitCell *cell,
- struct detector *det, float *ltl,
const char *options)
{
char *str;
@@ -211,19 +210,19 @@ static void *prepare_method(IndexingMethod *m, UnitCell *cell,
break;
case INDEXING_DIRAX :
- priv = dirax_prepare(m, cell, det, ltl);
+ priv = dirax_prepare(m, cell);
break;
case INDEXING_ASDF :
- priv = asdf_prepare(m, cell, det, ltl);
+ priv = asdf_prepare(m, cell);
break;
case INDEXING_MOSFLM :
- priv = mosflm_prepare(m, cell, det, ltl);
+ priv = mosflm_prepare(m, cell);
break;
case INDEXING_XDS :
- priv = xds_prepare(m, cell, det, ltl);
+ priv = xds_prepare(m, cell);
break;
case INDEXING_DEBUG :
@@ -231,11 +230,11 @@ static void *prepare_method(IndexingMethod *m, UnitCell *cell,
break;
case INDEXING_FELIX :
- priv = felix_prepare(m, cell, det, ltl, options);
+ priv = felix_prepare(m, cell, options);
break;
case INDEXING_TAKETWO :
- priv = taketwo_prepare(m, cell, det, ltl);
+ priv = taketwo_prepare(m, cell);
break;
default :
@@ -360,7 +359,7 @@ IndexingPrivate *setup_indexing(const char *method_list, UnitCell *cell,
int j;
ipriv->engine_private[i] = prepare_method(&methods[i], cell,
- det, ltl, options);
+ options);
if ( ipriv->engine_private[i] == NULL ) return NULL;
diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c
index fa8fb18b..4cf21103 100644
--- a/libcrystfel/src/mosflm.c
+++ b/libcrystfel/src/mosflm.c
@@ -98,7 +98,6 @@ typedef enum {
struct mosflm_private {
IndexingMethod indm;
- float *ltl;
UnitCell *template;
};
@@ -818,8 +817,7 @@ int run_mosflm(struct image *image, void *ipriv)
}
-void *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+void *mosflm_prepare(IndexingMethod *indm, UnitCell *cell)
{
struct mosflm_private *mp;
@@ -830,7 +828,6 @@ void *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
mp = malloc(sizeof(struct mosflm_private));
if ( mp == NULL ) return NULL;
- mp->ltl = ltl;
mp->template = cell;
mp->indm = *indm;
diff --git a/libcrystfel/src/mosflm.h b/libcrystfel/src/mosflm.h
index 39ec5390..cd7804a8 100644
--- a/libcrystfel/src/mosflm.h
+++ b/libcrystfel/src/mosflm.h
@@ -43,8 +43,7 @@ extern "C" {
extern int run_mosflm(struct image *image, void *ipriv);
-extern void *mosflm_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl);
+extern void *mosflm_prepare(IndexingMethod *indm, UnitCell *cell);
extern void mosflm_cleanup(void *pp);
diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/taketwo.c
index f7a2fda9..757c6c52 100644
--- a/libcrystfel/src/taketwo.c
+++ b/libcrystfel/src/taketwo.c
@@ -70,7 +70,6 @@ struct SpotVec
struct taketwo_private
{
IndexingMethod indm;
- float *ltl;
UnitCell *cell;
};
@@ -1587,8 +1586,7 @@ int taketwo_index(struct image *image, const struct taketwo_options *opts,
}
-void *taketwo_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+void *taketwo_prepare(IndexingMethod *indm, UnitCell *cell)
{
struct taketwo_private *tp;
@@ -1631,7 +1629,6 @@ void *taketwo_prepare(IndexingMethod *indm, UnitCell *cell,
tp = malloc(sizeof(struct taketwo_private));
if ( tp == NULL ) return NULL;
- tp->ltl = ltl;
tp->cell = cell;
tp->indm = *indm;
diff --git a/libcrystfel/src/taketwo.h b/libcrystfel/src/taketwo.h
index 6c9d7513..e82dda68 100644
--- a/libcrystfel/src/taketwo.h
+++ b/libcrystfel/src/taketwo.h
@@ -43,8 +43,7 @@ struct taketwo_options
};
-extern void *taketwo_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl);
+extern void *taketwo_prepare(IndexingMethod *indm, UnitCell *cell);
extern int taketwo_index(struct image *image,
const struct taketwo_options *opts, void *priv);
extern void taketwo_cleanup(IndexingPrivate *pp);
diff --git a/libcrystfel/src/xds.c b/libcrystfel/src/xds.c
index e6309eb6..ba053d2f 100644
--- a/libcrystfel/src/xds.c
+++ b/libcrystfel/src/xds.c
@@ -61,7 +61,6 @@
struct xds_private
{
IndexingMethod indm;
- float *ltl;
UnitCell *cell;
};
@@ -593,8 +592,7 @@ int run_xds(struct image *image, void *priv)
}
-void *xds_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl)
+void *xds_prepare(IndexingMethod *indm, UnitCell *cell)
{
struct xds_private *xp;
@@ -625,7 +623,6 @@ void *xds_prepare(IndexingMethod *indm, UnitCell *cell,
*indm &= INDEXING_METHOD_MASK | INDEXING_USE_LATTICE_TYPE
| INDEXING_USE_CELL_PARAMETERS;
- xp->ltl = ltl;
xp->cell = cell;
xp->indm = *indm;
diff --git a/libcrystfel/src/xds.h b/libcrystfel/src/xds.h
index 094d6d2f..8777df10 100644
--- a/libcrystfel/src/xds.h
+++ b/libcrystfel/src/xds.h
@@ -44,8 +44,7 @@ extern "C" {
extern int run_xds(struct image *image, void *ipriv);
-extern void *xds_prepare(IndexingMethod *indm, UnitCell *cell,
- struct detector *det, float *ltl);
+extern void *xds_prepare(IndexingMethod *indm, UnitCell *cell);
extern void xds_cleanup(void *pp);