diff options
Diffstat (limited to 'src/stream.c')
-rw-r--r-- | src/stream.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stream.c b/src/stream.c index 950069fb..d6a91be9 100644 --- a/src/stream.c +++ b/src/stream.c @@ -147,7 +147,7 @@ static UnitCell *read_orientation_matrix_rick(FILE *fh) } -int find_chunk(FILE *fh, UnitCell **cell, char **filename) +int find_chunk(FILE *fh, UnitCell **cell, char **filename, double *ev) { char line[1024]; char *rval = NULL; @@ -159,6 +159,10 @@ int find_chunk(FILE *fh, UnitCell **cell, char **filename) chomp(line); + if ( strncmp(line, "photon_energy_eV = ", 19) == 0 ) { + *ev = atof(line+19); + } + /* Look for the first line of a chunk */ if ( (strncmp(line, "Reflections from indexing", 25) != 0) && (strncmp(line, "## h5FilePath:", 14) != 0 ) ) { |