aboutsummaryrefslogtreecommitdiff
path: root/src/pattern_sim.c
diff options
context:
space:
mode:
authorValerio Mariani <valerio.mariani@desy.de>2014-03-25 17:35:07 +0100
committerThomas White <taw@physics.org>2014-09-05 18:01:52 +0200
commitc194bf7746e3635571808856f29434499eec55b7 (patch)
tree6e52ae148b10bf46c4ca97badb06b2cfd44a55ed /src/pattern_sim.c
parentc7e4b7acbd624723c5973431c0101fe92bc3089d (diff)
Refactoring of peaks and reflections I/O
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r--src/pattern_sim.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c
index 361a3bcd..98dee1b6 100644
--- a/src/pattern_sim.c
+++ b/src/pattern_sim.c
@@ -469,6 +469,12 @@ int main(int argc, char *argv[])
ERROR("You need to specify a geometry file with --geometry\n");
return 1;
}
+ image.det = get_detector_geometry(geometry);
+ if ( image.det == NULL ) {
+ ERROR("Failed to read detector geometry from '%s'\n", geometry);
+ return 1;
+ }
+ free(geometry);
if ( beamfile == NULL ) {
ERROR("You need to specify a beam parameter file"
@@ -509,7 +515,7 @@ int main(int argc, char *argv[])
RefList *reflections;
- reflections = read_reflections(intfile);
+ reflections = read_reflections2(intfile, image.det);
if ( reflections == NULL ) {
ERROR("Problem reading input file %s\n", intfile);
return 1;
@@ -536,13 +542,6 @@ int main(int argc, char *argv[])
}
- image.det = get_detector_geometry(geometry);
- if ( image.det == NULL ) {
- ERROR("Failed to read detector geometry from '%s'\n", geometry);
- return 1;
- }
- free(geometry);
-
image.beam = get_beam_parameters(beamfile);
if ( image.beam == NULL ) {
ERROR("Failed to read beam parameters from '%s'\n", beamfile);