aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/stream.c')
-rw-r--r--libcrystfel/src/stream.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index 3cc1c0e8..c118e83b 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -782,8 +782,8 @@ int write_chunk(Stream *st, struct image *i, struct hdfile *hdfile,
fprintf(st->fh, "photon_energy_eV = %f\n",
J_to_eV(ph_lambda_to_en(i->lambda)));
- fprintf(st->fh, "beam_divergence = %.5f mrad\n", i->div*1e3);
- fprintf(st->fh, "beam_bandwidth = %.5f %%\n", i->bw*100.0);
+ fprintf(st->fh, "beam_divergence = %.2e rad\n", i->div);
+ fprintf(st->fh, "beam_bandwidth = %.2e (fraction)\n", i->bw);
copy_hdf5_fields(hdfile, i->copyme, st->fh, ev);
@@ -967,8 +967,8 @@ static void read_crystal(Stream *st, struct image *image, StreamReadFlags srf)
crystal_set_resolution_limit(cr, lim*1e9);
}
- if ( sscanf(line, "profile_radius = %f nm^-1", &rad) == 1 ) {
- crystal_set_profile_radius(cr, rad*1e9);
+ if ( sscanf(line, "profile_radius = %e m^-1", &rad) == 1 ) {
+ crystal_set_profile_radius(cr, rad);
}
if ( (strcmp(line, REFLECTION_START_MARKER) == 0)
@@ -1098,8 +1098,8 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf)
have_ev = 1;
}
- if ( sscanf(line, "beam_divergence = %f mrad", &div) == 1 ) {
- image->div = div/1e3;
+ if ( sscanf(line, "beam_divergence = %e rad", &div) == 1 ) {
+ image->div = div;
}
if ( sscanf(line, "beam_bandwidth = %f %%", &bw) == 1 ) {