diff options
author | Kenneth Beyerlein <kenneth.beyerlein@desy.de> | 2014-01-30 17:40:59 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2015-09-15 13:46:57 +0200 |
commit | f4aed5030aed63c13c857c6955fa09ff06763261 (patch) | |
tree | fb3e18182afc2882ca45a07963bc282bb411d6af /src | |
parent | 2e0b645d773d569101b54d535a5d97d6624d8afe (diff) |
Implement Felix Indexer
Diffstat (limited to 'src')
-rw-r--r-- | src/indexamajig.c | 24 | ||||
-rw-r--r-- | src/process_image.h | 1 |
2 files changed, 24 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index e5b6e19b..164fa071 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -140,6 +140,11 @@ static void show_help(const char *s) " --no-refls-in-stream Do not record integrated reflections in the stream.\n" " --int-diag=<cond> Show debugging information about reflections.\n" " --no-refine Skip the prediction refinement step.\n" +"\nLow-level options for the felix indexer:\n\n" +" --felix-options Change the default arguments passed to the indexer.\n" +" Given as a list of comma separated list of \n" +" indexer specific, key word arguments.\n" +" Example: \"arg1=10,arg2=500\" \n" ); } @@ -192,6 +197,7 @@ int main(int argc, char *argv[]) char *geom_filename = NULL; struct beam_params beam; int have_push_res = 0; + int len; /* Defaults */ iargs.cell = NULL; @@ -236,6 +242,7 @@ int main(int argc, char *argv[]) iargs.fix_bandwidth = -1.0; iargs.fix_divergence = -1.0; iargs.predict_refine = 1; + iargs.felix_options = NULL; /* Long options */ const struct option longopts[] = { @@ -294,6 +301,7 @@ int main(int argc, char *argv[]) {"fix-profile-radius", 1, NULL, 22}, {"fix-bandwidth", 1, NULL, 23}, {"fix-divergence", 1, NULL, 24}, + {"felix-options", 1, NULL, 25}, {0, 0, NULL, 0} }; @@ -463,6 +471,20 @@ int main(int argc, char *argv[]) } break; + case 25 : + /* Remove leading and trailing quotes */ + len = strlen(optarg); + if ( optarg[len-1] == '\'' || optarg[len-1] == '\"' ){ + optarg[len-1] = 0; + } + if ( optarg[0] == '\'' || optarg[0] == '\"' ){ + iargs.felix_options = strdup( optarg+1 ); + } + else { + iargs.felix_options = strdup( optarg ); + } + break; + case 0 : break; @@ -712,7 +734,7 @@ int main(int argc, char *argv[]) /* Prepare the indexer */ if ( indm != NULL ) { ipriv = prepare_indexing(indm, iargs.cell, iargs.det, - iargs.tols); + iargs.tols, iargs.felix_options); if ( ipriv == NULL ) { ERROR("Failed to prepare indexing.\n"); return 1; diff --git a/src/process_image.h b/src/process_image.h index 0d5ca1b7..60da7cb8 100644 --- a/src/process_image.h +++ b/src/process_image.h @@ -89,6 +89,7 @@ struct index_args float fix_bandwidth; float fix_divergence; int predict_refine; + char *felix_options; }; |