From f2bf00dd32e79a06410b7a95fedaa2ee3bf33ef3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 29 Jan 2016 15:47:10 +0100 Subject: felix: return the number of crystals --- libcrystfel/src/felix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcrystfel/src/felix.c b/libcrystfel/src/felix.c index 2a6a0e44..18f60345 100644 --- a/libcrystfel/src/felix.c +++ b/libcrystfel/src/felix.c @@ -128,6 +128,7 @@ static int read_felix(struct felix_private *gp, struct image *image, int ngv; char line[1024]; int r; + int n_crystals = 0; fh = fopen(filename, "r"); if ( fh == NULL ) { @@ -215,6 +216,7 @@ static int read_felix(struct felix_private *gp, struct image *image, */ image_add_crystal(image, cr); + n_crystals++; } while ( !feof(fh) ); @@ -229,7 +231,7 @@ static int read_felix(struct felix_private *gp, struct image *image, } } - return 0; + return n_crystals; } -- cgit v1.2.3