diff options
author | Richard Kirian <rkirian@asu.edu> | 2011-08-12 10:39:57 -0700 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:36 +0100 |
commit | 164f9d793ce5127333367fdc8764f0fe4fb5c833 (patch) | |
tree | 278538c6050beed7d3695f3eaa4feb3987f36ee2 /src | |
parent | 872e1f3b14e08198545e0de9a5b2bc226f0611df (diff) |
powder_plot.c: ignore geometry and beam when input is hkl file
Diffstat (limited to 'src')
-rw-r--r-- | src/powder_plot.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/powder_plot.c b/src/powder_plot.c index c668814e..754ca459 100644 --- a/src/powder_plot.c +++ b/src/powder_plot.c @@ -930,6 +930,9 @@ int main(int argc, char *argv[]) if ( image.reflections != NULL ) { file_type = FILE_HKL; need_pdb = 1; + need_geometry = 0; + need_beam = 0; + image.lambda = 0.0; } else { ERROR("Couldn't recognise %s as reflection list," " stream or image.\n", filename); @@ -986,6 +989,11 @@ int main(int argc, char *argv[]) return 1; } + if ( file_type == FILE_HKL ) { + need_geometry = 0; + need_beam = 0; + } + /* Get geometry, beam and pdb files and parameters as needed */ if ( need_geometry ) { if ( geometry == NULL ) { @@ -1049,12 +1057,20 @@ int main(int argc, char *argv[]) free(sym_str); /* Set up histogram info*/ - if (hist_info.q_min < 0.0 ) { - hist_info.q_min = smallest_q(&image); - } - if (hist_info.q_max < 0.0 ) { - hist_info.q_max = largest_q(&image); + if ( file_type == FILE_HKL ) { + /* get q range from Miller indices in hkl + file. */ + resolution_limits(image.reflections, cell, + &hist_info.q_min, &hist_info.q_max); + } else { + if (hist_info.q_min < 0.0 ) { + hist_info.q_min = smallest_q(&image); + } + if (hist_info.q_max < 0.0 ) { + hist_info.q_max = largest_q(&image); + } } + if ( hist_info.q_min >= hist_info.q_max ) { ERROR("the minimum q value of: %e " "is greator then your max q value of: %e\n", |