diff options
author | Thomas White <taw@physics.org> | 2024-10-15 17:02:35 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-10-16 11:11:13 +0200 |
commit | 9894ff9ba5d7231e7db628bae68bd379d9ab9b19 (patch) | |
tree | 086f6a7f61f485a400df770ab4022a928605d799 /libcrystfel | |
parent | 33f930dcf6b0fc0895efa0d9ccd09c2f5c2ac98b (diff) |
Fix up indentation style and comments
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/index.c | 32 | ||||
-rw-r--r-- | libcrystfel/src/index.h | 6 | ||||
-rw-r--r-- | libcrystfel/src/indexers/smallcell.h | 17 |
3 files changed, 27 insertions, 28 deletions
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c index c684cc1f..1d98afb7 100644 --- a/libcrystfel/src/index.c +++ b/libcrystfel/src/index.c @@ -163,8 +163,8 @@ char *base_indexer_str(IndexingMethod indm) break; case INDEXING_SMALLCELL : - strcpy(str, "smallcell"); - break; + strcpy(str, "smallcell"); + break; default : strcpy(str, "(unknown)"); @@ -236,8 +236,8 @@ static void *prepare_method(IndexingMethod *m, UnitCell *cell, break; case INDEXING_SMALLCELL : - priv = smallcell_prepare(m, smallcell_opts, cell); - break; + priv = smallcell_prepare(m, smallcell_opts, cell); + break; case INDEXING_FELIX : priv = felix_prepare(m, cell, felix_opts); @@ -338,7 +338,7 @@ IndexingPrivate *setup_indexing(const char *method_list, struct pinkindexer_options *pinkIndexer_opts, struct felix_options *felix_opts, struct fromfile_options *fromfile_opts, - struct smallcell_options *smallcell_opts, + struct smallcell_options *smallcell_opts, struct asdf_options *asdf_opts) { IndexingPrivate *ipriv; @@ -502,8 +502,8 @@ void cleanup_indexing(IndexingPrivate *ipriv) break; case INDEXING_SMALLCELL : - smallcell_cleanup(ipriv->engine_private[n]); - break; + smallcell_cleanup(ipriv->engine_private[n]); + break; case INDEXING_TAKETWO : taketwo_cleanup(ipriv->engine_private[n]); @@ -631,11 +631,11 @@ static int try_indexer(struct image *image, IndexingMethod indm, break; case INDEXING_SMALLCELL : - set_last_task("indexing:smallcell"); - profile_start("smallcell"); - r = smallcell_index(image, mpriv); - profile_end("smallcell"); - break; + set_last_task("indexing:smallcell"); + profile_start("smallcell"); + r = smallcell_index(image, mpriv); + profile_end("smallcell"); + break; case INDEXING_FELIX : set_last_task("indexing:felix"); @@ -1147,9 +1147,9 @@ IndexingMethod get_indm_from_string_2(const char *str, int *err) return method; } else if ( strcmp(bits[i], "smallcell") == 0) { - if ( have_method ) return warn_method(str); - method = INDEXING_SMALLCELL; - return method; + if ( have_method ) return warn_method(str); + method = INDEXING_SMALLCELL; + return method; } else if ( strcmp(bits[i], "latt") == 0) { method = set_lattice(method); @@ -1253,7 +1253,7 @@ void default_method_options(struct taketwo_options **ttopts, struct pinkindexer_options **pinkIndexer_opts, struct felix_options **felix_opts, struct fromfile_options **fromfile_opts, - struct smallcell_options **smallcell_opts, + struct smallcell_options **smallcell_opts, struct asdf_options **asdf_opts) { taketwo_default_options(ttopts); diff --git a/libcrystfel/src/index.h b/libcrystfel/src/index.h index 69bc61c7..69bd9ace 100644 --- a/libcrystfel/src/index.h +++ b/libcrystfel/src/index.h @@ -83,7 +83,7 @@ typedef enum { INDEXING_TAKETWO = 9, /**< Use built-in TakeTwo algorithm */ INDEXING_XGANDALF = 10, /**< Use XGANDALF (via optional library) */ INDEXING_PINKINDEXER = 11,/**< Use PinkIndexer (via optional library) */ - INDEXING_SMALLCELL = 12,/**< Use Smallcell */ + INDEXING_SMALLCELL = 12, /**< Use Smallcell */ INDEXING_ERROR = 255, /**< Special value for unrecognised indexing * engine */ @@ -237,7 +237,7 @@ extern void default_method_options(struct taketwo_options **ttopts, struct pinkindexer_options **pinkIndexer_opts, struct felix_options **felix_opts, struct fromfile_options **fromfile_opts, - struct smallcell_options **smallcell_opts, + struct smallcell_options **smallcell_opts, struct asdf_options **asdf_opts); extern IndexingPrivate *setup_indexing(const char *methods, @@ -252,7 +252,7 @@ extern IndexingPrivate *setup_indexing(const char *methods, struct pinkindexer_options *pinkIndexer_opts, struct felix_options *felix_opts, struct fromfile_options *fromfile_opts, - struct smallcell_options *smallcell_opts, + struct smallcell_options *smallcell_opts, struct asdf_options *asdf_opts); extern const IndexingMethod *indexing_methods(IndexingPrivate *p, int *n); diff --git a/libcrystfel/src/indexers/smallcell.h b/libcrystfel/src/indexers/smallcell.h index 726a998f..8ce5753a 100644 --- a/libcrystfel/src/indexers/smallcell.h +++ b/libcrystfel/src/indexers/smallcell.h @@ -1,16 +1,15 @@ /* * smallcell.h * - * Perform indexing from solution file + * Re-implementation of graph theory indexing algorithm for small unit cells + * borrowed from cctbx.small_cell * - * Copyright © 2020-2021 Max-Planck-Gesellschaft - * zur Förderung der Wissenschaften e.V. - * Copyright © 2021 Deutsches Elektronen-Synchrotron DESY, + * Copyright © 2024 Deutsches Elektronen-Synchrotron DESY, * a research centre of the Helmholtz Association. * * Authors: - * 2020 Pascal Hogan-Lamarre <pascal.hogan.lamarre@mail.utoronto.ca> - * 2021 Thomas White <thomas.white@desy.de> + * 2024 Isabel Costello <isabel.costello@desy.de> + * 2024 Thomas White <thomas.white@desy.de> * * This file is part of CrystFEL. * @@ -32,13 +31,13 @@ #ifndef SMALLCELL_H #define SMALLCELL_H -#include <argp.h> - #include "image.h" +#include "cell.h" +#include "index.h" extern int smallcell_default_options(struct smallcell_options **opts_ptr); extern void *smallcell_prepare(IndexingMethod *indm, - struct smallcell_options *opts, UnitCell *cell); + struct smallcell_options *opts, UnitCell *cell); extern int smallcell_index(struct image *image, void *mpriv); extern void smallcell_cleanup(void *mpriv); |