Commit 9530a395 authored by Thomas White's avatar Thomas White
Browse files

Remove private option structures from iargs

parent 7251c3d8
......@@ -70,10 +70,6 @@ struct _indexingprivate
UnitCell *target_cell;
double tolerance[6];
struct taketwo_options *ttopts;
struct xgandalf_options *xgandalf_opts;
struct pinkIndexer_options *pinkIndexer_opts;
int n_methods;
IndexingMethod *methods;
void **engine_private;
......@@ -241,7 +237,8 @@ static void *prepare_method(IndexingMethod *m, UnitCell *cell,
struct detector *det, struct beam_params *beam,
struct xgandalf_options *xgandalf_opts,
struct pinkIndexer_options* pinkIndexer_opts,
struct felix_options *felix_opts)
struct felix_options *felix_opts,
struct taketwo_options *taketwo_opts)
{
char *str;
IndexingMethod in = *m;
......@@ -278,7 +275,7 @@ static void *prepare_method(IndexingMethod *m, UnitCell *cell,
break;
case INDEXING_TAKETWO :
priv = taketwo_prepare(m, cell);
priv = taketwo_prepare(m, taketwo_opts, cell);
break;
case INDEXING_XGANDALF :
......@@ -419,7 +416,8 @@ IndexingPrivate *setup_indexing(const char *method_list, UnitCell *cell,
det, beam,
xgandalf_opts,
pinkIndexer_opts,
felix_opts);
felix_opts,
ttopts);
if ( ipriv->engine_private[i] == NULL ) return NULL;
......@@ -466,10 +464,6 @@ IndexingPrivate *setup_indexing(const char *method_list, UnitCell *cell,
}
for ( i=0; i<6; i++ ) ipriv->tolerance[i] = tols[i];
ipriv->ttopts = ttopts;
ipriv->xgandalf_opts = xgandalf_opts;
ipriv->pinkIndexer_opts = pinkIndexer_opts;
STATUS("List of indexing methods:\n");
for ( i=0; i<n; i++ ) {
char *str = indexer_str(methods[i]);
......@@ -649,7 +643,7 @@ static int try_indexer(struct image *image, IndexingMethod indm,
case INDEXING_TAKETWO :
set_last_task(last_task, "indexing:taketwo");
r = taketwo_index(image, ipriv->ttopts, mpriv);
r = taketwo_index(image, mpriv);
break;
case INDEXING_PINKINDEXER :
......
......@@ -159,6 +159,7 @@ struct Seed
struct taketwo_private
{
IndexingMethod indm;
struct taketwo_options *opts;
UnitCell *cell;
int serial_num; /**< Serial of last image, -1 if unassigned */
unsigned int xtal_num; /**< last number of crystals recorded */
......@@ -2121,8 +2122,7 @@ static void partial_taketwo_cleanup(struct taketwo_private *tp)
/* CrystFEL interface hooks */
int taketwo_index(struct image *image, const struct taketwo_options *opts,
void *priv)
int taketwo_index(struct image *image, void *priv)
{
Crystal *cr;
UnitCell *cell;
......@@ -2172,7 +2172,7 @@ int taketwo_index(struct image *image, const struct taketwo_options *opts,
rlps[n_rlps].v = 0.0;
rlps[n_rlps++].w = 0.0;
cell = run_taketwo(tp->cell, opts, rlps, n_rlps, tp);
cell = run_taketwo(tp->cell, tp->opts, rlps, n_rlps, tp);
free(rlps);
if ( cell == NULL ) return 0;
......@@ -2190,7 +2190,8 @@ int taketwo_index(struct image *image, const struct taketwo_options *opts,
}
void *taketwo_prepare(IndexingMethod *indm, UnitCell *cell)
void *taketwo_prepare(IndexingMethod *indm, struct taketwo_options *opts,
UnitCell *cell)
{
struct taketwo_private *tp;
......
......@@ -41,10 +41,10 @@
typedef struct taketwo_options TakeTwoOptions;
extern struct argp taketwo_argp;
extern void *taketwo_prepare(IndexingMethod *indm, UnitCell *cell);
extern void *taketwo_prepare(IndexingMethod *indm, struct taketwo_options *opts,
UnitCell *cell);
extern const char *taketwo_probe(UnitCell *cell);
extern int taketwo_index(struct image *image,
const struct taketwo_options *opts, void *priv);
extern int taketwo_index(struct image *image, void *priv);
extern void taketwo_cleanup(IndexingPrivate *pp);
#endif /* TAKETWO_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment