aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/predict-refine.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-04-24 16:52:16 +0200
committerThomas White <taw@physics.org>2023-07-28 13:22:04 +0200
commit99849c8ed87a424a76e4826ed39ad65cacfaecfb (patch)
tree23c1b0f505527cf7550f65e0f004d505e2efe2a9 /libcrystfel/src/predict-refine.c
parentc8fb149760f7a8ef4e018f22e79bcb48e1e3c444 (diff)
indexamajig: Hooks for Mille
Diffstat (limited to 'libcrystfel/src/predict-refine.c')
-rw-r--r--libcrystfel/src/predict-refine.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c
index 19c689cd..d45388b9 100644
--- a/libcrystfel/src/predict-refine.c
+++ b/libcrystfel/src/predict-refine.c
@@ -3,11 +3,11 @@
*
* Prediction refinement
*
- * Copyright © 2012-2021 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2023 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2020 Thomas White <taw@physics.org>
+ * 2010-2023 Thomas White <taw@physics.org>
* 2016 Valerio Mariani
*
* This file is part of CrystFEL.
@@ -37,6 +37,11 @@
#include "image.h"
#include "geometry.h"
#include "cell-utils.h"
+#include "predict-refine.h"
+
+#ifdef HAVE_MILLEPEDE
+#include <mille_c_wrap.h>
+#endif
/** \file predict-refine.h */
@@ -569,7 +574,7 @@ static void free_rps_noreflist(struct reflpeak *rps, int n)
}
-int refine_prediction(struct image *image, Crystal *cr)
+int refine_prediction(struct image *image, Crystal *cr, Mille *mille)
{
int n;
int i;
@@ -654,5 +659,29 @@ int refine_prediction(struct image *image, Crystal *cr)
return 1;
}
+ if ( mille != NULL ) {
+ printf("Mille mode!\n");
+ }
+
return 0;
}
+
+
+Mille *crystfel_mille_new(const char *outFileName,
+ int asBinary,
+ int writeZero)
+{
+ #ifdef HAVE_MILLEPEDE
+ return mille_new(outFileName, asBinary, writeZero);
+ #else
+ return NULL;
+ #endif
+}
+
+
+void crystfel_mille_free(Mille *m)
+{
+ #ifdef HAVE_MILLEPEDE
+ mille_free(m);
+ #endif
+}