aboutsummaryrefslogtreecommitdiff
path: root/src/pattern_sim.c
diff options
context:
space:
mode:
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);