aboutsummaryrefslogtreecommitdiff
path: root/src/stream.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-02-09 16:08:27 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:14 +0100
commitda51525409db6ac1ac41460d2ce5a4eea26775de (patch)
treec0dd4bbe931f614e395c28b07e18ce1273683eef /src/stream.c
parent467009dbfad7d41231067baa5961e02f8e31d8d0 (diff)
The per-shot wavelength is needed for scaling and post refinement
Diffstat (limited to 'src/stream.c')
-rw-r--r--src/stream.c6
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 ) ) {