diff options
author | Thomas White <taw@physics.org> | 2019-09-23 15:17:25 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-09-23 15:17:25 +0200 |
commit | 9530a39509e7ff61ba091766978b0e201f88c993 (patch) | |
tree | 4eac5c30840eb6177ce71afc1127286f9313674a | |
parent | 7251c3d83cc0bce49597ec41f97f930d5f70fb78 (diff) |
Remove private option structures from iargs
-rw-r--r-- | libcrystfel/src/index.c | 18 | ||||
-rw-r--r-- | libcrystfel/src/taketwo.c | 9 | ||||
-rw-r--r-- | libcrystfel/src/taketwo.h | 6 |
3 files changed, 14 insertions, 19 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index 049c3ba0..016767a9 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -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 : diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/taketwo.c index 893791e4..63840d2b 100644 --- a/libcrystfel/src/taketwo.c +++ b/libcrystfel/src/taketwo.c @@ -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; diff --git a/libcrystfel/src/taketwo.h b/libcrystfel/src/taketwo.h index c489228f..b1479faa 100644 --- a/libcrystfel/src/taketwo.h +++ b/libcrystfel/src/taketwo.h @@ -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 */ |