diff options
Diffstat (limited to 'src/pattern_sim.c')
-rw-r--r-- | src/pattern_sim.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/pattern_sim.c b/src/pattern_sim.c index 91c5247e..5d59d71b 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -290,21 +290,6 @@ int main(int argc, char *argv[]) return 1; } - if ( intfile == NULL ) { - /* Gentle reminder */ - STATUS("You didn't specify the file containing the "); - STATUS("reflection intensities (with --intensities).\n"); - STATUS("I'll simulate a flat intensity distribution.\n"); - intensities = NULL; - counts = NULL; - phases = NULL; - } else { - counts = new_list_count(); - phases = new_list_phase(); - intensities = read_reflections(intfile, counts, phases); - free(intfile); - } - if ( grad_str == NULL ) { STATUS("You didn't specify a gradient calculation method, so" " I'm using the 'mosaic' method, which is fastest.\n"); @@ -332,6 +317,25 @@ int main(int argc, char *argv[]) return 1; } + if ( intfile == NULL ) { + /* Gentle reminder */ + STATUS("You didn't specify the file containing the "); + STATUS("reflection intensities (with --intensities).\n"); + STATUS("I'll simulate a flat intensity distribution.\n"); + intensities = NULL; + counts = NULL; + phases = NULL; + } else { + counts = new_list_count(); + if ( grad == GRADIENT_PHASED ) { + phases = new_list_phase(); + } else { + phases = NULL; + } + intensities = read_reflections(intfile, counts, phases); + free(intfile); + } + /* Define image parameters */ image.width = 1024; image.height = 1024; |