aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-19 15:33:25 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commita0773c8a3c5eb6c13a89bab0772dc354ea00f0c7 (patch)
treeda91642f1c48343c3a4d0c364740eb5511cd8480 /libcrystfel
parent8d9a3b7167960045b22566d095e73588b13da3b6 (diff)
Push CBF/GZ split point further down
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/image.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 628ae543..bae1d47b 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -1578,7 +1578,7 @@ static struct image *read_mask_hdf5(DataTemplate *dtempl, const char *filename,
struct image *image_read_cbf(DataTemplate *dtempl, const char *filename,
- const char *event)
+ const char *event, int gz)
{
struct image *image;
float *data;
@@ -1595,7 +1595,7 @@ struct image *image_read_cbf(DataTemplate *dtempl, const char *filename,
return NULL;
}
- data = read_cbf_data(filename, 0, &w, &h);
+ data = read_cbf_data(filename, gz, &w, &h);
if ( data == NULL ) {
ERROR("Failed to read CBF data\n");
return NULL;
@@ -1612,13 +1612,6 @@ struct image *image_read_cbf(DataTemplate *dtempl, const char *filename,
}
-struct image *image_read_gzcbf(DataTemplate *dtempl, const char *filename,
- const char *event)
-{
- return NULL;
-}
-
-
static double get_value_hdf5(const char *name, const char *filename,
const char *event)
{
@@ -1870,10 +1863,10 @@ struct image *image_read(DataTemplate *dtempl, const char *filename,
image = image_read_hdf5(dtempl, filename, event);
} else if ( is_cbf_file(filename) > 0 ) {
- image = image_read_cbf(dtempl, filename, event);
+ image = image_read_cbf(dtempl, filename, event, 0);
} else if ( is_cbfgz_file(filename) ) {
- image = image_read_gzcbf(dtempl, filename, event);
+ image = image_read_cbf(dtempl, filename, event, 1);
} else {
ERROR("Unrecognised file type: %s\n", filename);