Commit 81ce39f9 authored by Thomas White's avatar Thomas White
Browse files

pattern_sim: Don't go looking for phases if they're not needed

This allows old reflection lists (without phases) to be used as long
as you don't want phased gradients.
parent c9d6dd11
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment