diff options
author | Thomas White <taw@physics.org> | 2019-09-23 14:56:27 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-09-23 14:56:27 +0200 |
commit | 7251c3d83cc0bce49597ec41f97f930d5f70fb78 (patch) | |
tree | 4f0801ede67a2143cc05c86c314ecab40502e46a /libcrystfel/src/detector.c | |
parent | 7fcddbf213e2674871ef078a3b228a32fd9f488f (diff) | |
parent | aad71902c94b3bc21ab34b0e2c92972400921574 (diff) |
Merge branch 'tom/pinkindexer'
Diffstat (limited to 'libcrystfel/src/detector.c')
-rw-r--r-- | libcrystfel/src/detector.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index 201b9041..4d008e65 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -1070,6 +1070,19 @@ static void parse_toplevel(struct detector *det, struct beam_params *beam, } } + } else if ( strcmp(key, "photon_energy_bandwidth") == 0 ) { + if ( beam != NULL ) { + double v; + char *end; + v = strtod(val, &end); + if ( (val[0] != '\0') && (end[0] == '\0') ) { + beam->bandwidth = v; + } else { + ERROR("Invalid value for " + "photon_energy_bandwidth\n"); + } + } + } else if ( strcmp(key, "photon_energy_scale") == 0 ) { if ( beam != NULL ) { beam->photon_energy_scale = atof(val); @@ -1202,6 +1215,7 @@ struct detector *get_detector_geometry_from_string(const char *string, beam->photon_energy = 0.0; beam->photon_energy_from = NULL; beam->photon_energy_scale = 1.0; + beam->bandwidth = 0.00000001; } det->n_panels = 0; |