diff options
author | Thomas White <taw@physics.org> | 2014-11-14 15:47:33 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-11-14 15:47:33 +0100 |
commit | e0a717ebe6981cd14f268056bdcdc7ba53dfe029 (patch) | |
tree | 1564a1a9b360a3f888c360950f5f178f7c9e6648 /libcrystfel/src/detector.c | |
parent | f98c55524c74647ac999746929b8206f1ab178c0 (diff) |
Allow geometry files to not contain photon_energy
Diffstat (limited to 'libcrystfel/src/detector.c')
-rw-r--r-- | libcrystfel/src/detector.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/libcrystfel/src/detector.c b/libcrystfel/src/detector.c index a7da92bb..486fb32e 100644 --- a/libcrystfel/src/detector.c +++ b/libcrystfel/src/detector.c @@ -828,11 +828,7 @@ static void parse_toplevel(struct detector *det, struct beam_params *beam, det->defaults.coffset = atof(val); } else if ( strcmp(key, "photon_energy") == 0 ) { - if ( beam == NULL ) { - ERROR("Geometry file contains a reference to " - "photon_energy, which is inappropriate in this " - "situation.\n"); - } else if ( strncmp(val, "/", 1) == 0 ) { + if ( strncmp(val, "/", 1) == 0 ) { beam->photon_energy = 0.0; beam->photon_energy_from = strdup(val); } else { @@ -841,11 +837,7 @@ static void parse_toplevel(struct detector *det, struct beam_params *beam, } } else if ( strcmp(key, "photon_energy_scale") == 0 ) { - if ( beam == NULL ) { - ERROR("Geometry file contains a reference to " - "photon_energy_scale, which is inappropriate in " - "this situation.\n"); - } else { + if ( beam != NULL ) { beam->photon_energy_scale = atof(val); } @@ -1282,12 +1274,6 @@ struct detector *get_detector_geometry(const char *filename, } } - if ( (beam != NULL) && (beam->photon_energy < -0.5) ) { - STATUS("Photon energy must be specified (note: this is now " - "done in the 'geometry' file)\n"); - reject = 1; - } - for ( x=0; x<=max_fs; x++ ) { for ( y=0; y<=max_ss; y++ ) { if ( find_panel(det, x, y) == NULL ) { |