From 164f9d793ce5127333367fdc8764f0fe4fb5c833 Mon Sep 17 00:00:00 2001 From: Richard Kirian Date: Fri, 12 Aug 2011 10:39:57 -0700 Subject: powder_plot.c: ignore geometry and beam when input is hkl file --- src/powder_plot.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'src/powder_plot.c') 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", -- cgit v1.2.3