aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/image.c3
-rw-r--r--libcrystfel/src/image.h2
-rw-r--r--libcrystfel/src/index.c2
-rw-r--r--libcrystfel/src/index.h6
-rw-r--r--libcrystfel/src/stream.c9
-rw-r--r--libcrystfel/src/stream.h10
6 files changed, 12 insertions, 20 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 1262aa12..3ba71118 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -1260,7 +1260,7 @@ void imagefile_close(struct imagefile *f)
/************************** New API (DataTemplate) ****************************/
-static struct image *image_new()
+struct image *image_new()
{
struct image *image;
@@ -1291,7 +1291,6 @@ static struct image *image_new()
/* Deprecated stuff */
image->beam = NULL;
- image->event = NULL;
image->det = NULL;
return image;
diff --git a/libcrystfel/src/image.h b/libcrystfel/src/image.h
index 4bee27ec..90cb823d 100644
--- a/libcrystfel/src/image.h
+++ b/libcrystfel/src/image.h
@@ -152,7 +152,6 @@ struct image
/** \name The filename and event ID for the image
* @{ */
char *filename;
- struct event *event; /* FIXME: Deprecated */
char *ev;
/** @} */
@@ -244,6 +243,7 @@ extern signed int is_cbf_file(const char *filename);
/* New API */
+extern struct image *image_new(void);
extern struct image *image_read(DataTemplate *dtempl, const char *filename,
const char *event);
extern void image_free(struct image *image);
diff --git a/libcrystfel/src/index.c b/libcrystfel/src/index.c
index 7e0dd9a9..c6a0a561 100644
--- a/libcrystfel/src/index.c
+++ b/libcrystfel/src/index.c
@@ -315,7 +315,7 @@ static void *prepare_method(IndexingMethod *m, UnitCell *cell,
IndexingPrivate *setup_indexing(const char *method_list, UnitCell *cell,
- struct detector *det, struct beam_params *beam,
+ const DataTemplate *dtempl,
float *tols, IndexingFlags flags,
struct taketwo_options *ttopts,
struct xgandalf_options *xgandalf_opts,
diff --git a/libcrystfel/src/index.h b/libcrystfel/src/index.h
index 0c899199..3331a4ef 100644
--- a/libcrystfel/src/index.h
+++ b/libcrystfel/src/index.h
@@ -144,17 +144,17 @@ extern char *indexer_str(IndexingMethod indm);
extern IndexingMethod get_indm_from_string(const char *method);
extern IndexingMethod get_indm_from_string_2(const char *method, int *err);
-#include "detector.h"
#include "cell.h"
#include "image.h"
#include "taketwo.h"
#include "xgandalf.h"
#include "pinkindexer.h"
#include "felix.h"
+#include "datatemplate.h"
extern IndexingPrivate *setup_indexing(const char *methods, UnitCell *cell,
- struct detector *det,
- struct beam_params *beam, float *ltl,
+ const DataTemplate *dtempl,
+ float *ltl,
IndexingFlags flags,
struct taketwo_options *ttopts,
struct xgandalf_options *xgandalf_opts,
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 875285e5..ccf1a632 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -840,17 +840,15 @@ static int write_crystal(Stream *st, Crystal *cr, int include_reflections)
/**
* \param st A \ref Stream
* \param i An \ref image structure
- * \param imfile A \ref imagefile structure
* \param include_peaks Whether to include peak search results in stream
* \param include_reflections Whether to include integration results in stream
- * \param ev A \ref event strucutre
*
* Writes a new chunk to \p st.
*
* \returns non-zero on error.
*/
-int write_chunk(Stream *st, struct image *i, struct imagefile *imfile,
- int include_peaks, int include_reflections, struct event *ev)
+int write_chunk(Stream *st, struct image *i,
+ int include_peaks, int include_reflections)
{
int j;
char *indexer;
@@ -879,7 +877,8 @@ int write_chunk(Stream *st, struct image *i, struct imagefile *imfile,
fprintf(st->fh, "beam_divergence = %.2e rad\n", i->div);
fprintf(st->fh, "beam_bandwidth = %.2e (fraction)\n", i->bw);
- imagefile_copy_fields(imfile, i->copyme, st->fh, ev);
+ /* FIXME: Better way of doing this */
+ //imagefile_copy_fields(imfile, i->copyme, st->fh, ev);
if ( i->det != NULL ) {
diff --git a/libcrystfel/src/stream.h b/libcrystfel/src/stream.h
index f3e4d7e8..18a983c9 100644
--- a/libcrystfel/src/stream.h
+++ b/libcrystfel/src/stream.h
@@ -121,14 +121,8 @@ extern int read_chunk_2(Stream *st, struct image *image,
StreamReadFlags srf);
extern int stream_has_old_indexers(Stream *st);
-extern int write_chunk(Stream *st, struct image *image, struct imagefile *imfile,
- int include_peaks, int include_reflections,
- struct event *ev);
-
-extern int write_chunk_2(Stream *st, struct image *image,
- struct imagefile *imfile,
- int include_peaks, int include_reflections,
- struct event *ev);
+extern int write_chunk(Stream *st, struct image *image,
+ int include_peaks, int include_reflections);
extern void write_command(Stream *st, int argc, char *argv[]);
extern void write_geometry_file(Stream *st, const char *geom_filename);