diff options
author | Thomas White <taw@physics.org> | 2016-01-29 15:47:10 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2016-01-29 15:47:10 +0100 |
commit | f2bf00dd32e79a06410b7a95fedaa2ee3bf33ef3 (patch) | |
tree | 334d10e49a45b857c7d6a9d18c2ebbf7eda043da /libcrystfel/src/felix.c | |
parent | d6b4d3d274012054dde84d03e1b19ade7223c3c9 (diff) |
felix: return the number of crystals
Diffstat (limited to 'libcrystfel/src/felix.c')
-rw-r--r-- | libcrystfel/src/felix.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |