aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-18 12:00:22 +0100
committerThomas White <taw@physics.org>2021-03-19 12:04:50 +0100
commitdcdce375c16c709161d57cbae551feb7b842db34 (patch)
tree428ed8f0f90fc30e277313dc15c8325602865f4b /src
parentfdfa088f97aa2525b9b19e9383cbc203b354b61d (diff)
FromFile indexer: Option processing
This give FromFile its own private command-lien option processing, like the other indexers. It removes the ability to auto-generate the solution filename, but I don't think there's a way to do that without breaking abstractions.
Diffstat (limited to 'src')
-rw-r--r--src/gui_index.c4
-rw-r--r--src/indexamajig.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/gui_index.c b/src/gui_index.c
index 85a9f9c3..145d0f1e 100644
--- a/src/gui_index.c
+++ b/src/gui_index.c
@@ -486,6 +486,7 @@ static void run_indexing_once(struct crystfelproject *proj)
XGandalfOptions *xgandalf_opts;
PinkIndexerOptions *pinkIndexer_opts;
FelixOptions *felix_opts;
+ FromFileOptions *fromfile_opts;
char *old_cwd;
char *tmpdir;
int r;
@@ -514,7 +515,8 @@ static void run_indexing_once(struct crystfelproject *proj)
default_method_options(&taketwoopts,
&xgandalf_opts,
&pinkIndexer_opts,
- &felix_opts);
+ &felix_opts,
+ &fromfile_opts);
ipriv = setup_indexing(methods, cell,
proj->indexing_params.tols,
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 7f73cef6..d5d3d31a 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -97,6 +97,7 @@ struct indexamajig_arguments
FelixOptions **felix_opts_ptr;
XGandalfOptions **xgandalf_opts_ptr;
PinkIndexerOptions **pinkindexer_opts_ptr;
+ FromFileOptions **fromfile_opts_ptr;
};
@@ -135,6 +136,7 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
state->child_inputs[1] = args->felix_opts_ptr;
state->child_inputs[2] = args->xgandalf_opts_ptr;
state->child_inputs[3] = args->pinkindexer_opts_ptr;
+ state->child_inputs[4] = args->fromfile_opts_ptr;
break;
case 'h' :
@@ -601,6 +603,7 @@ int main(int argc, char *argv[])
FelixOptions *felix_opts = NULL;
XGandalfOptions *xgandalf_opts = NULL;
PinkIndexerOptions *pinkindexer_opts = NULL;
+ FromFileOptions *fromfile_opts = NULL;
double wl_from_dt;
/* Defaults for "top level" arguments */
@@ -628,6 +631,7 @@ int main(int argc, char *argv[])
args.felix_opts_ptr = &felix_opts;
args.xgandalf_opts_ptr = &xgandalf_opts;
args.pinkindexer_opts_ptr = &pinkindexer_opts;
+ args.fromfile_opts_ptr = &fromfile_opts;
/* Defaults for process_image arguments */
args.iargs.cell = NULL;
@@ -818,6 +822,7 @@ int main(int argc, char *argv[])
{&felix_argp, 0, NULL, -2},
{&xgandalf_argp, 0, NULL, -2},
{&pinkIndexer_argp, 0, NULL, -2},
+ {&fromfile_argp, 0, NULL, -2},
{0}
};
@@ -996,7 +1001,7 @@ int main(int argc, char *argv[])
xgandalf_opts,
pinkindexer_opts,
felix_opts,
- args.filename);
+ fromfile_opts);
free(args.filename);