From 120cb93c4b323bed4b9f57f22b4e150122647f83 Mon Sep 17 00:00:00 2001 From: Andrew Aquila Date: Wed, 4 Jan 2012 17:50:12 +0100 Subject: modify powder_plot to use 1/d instead of q at all printed locations and man page modify powder_plot to add command line to header --- src/powder_plot.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/powder_plot.c b/src/powder_plot.c index 736a9b99..d8a3f6d7 100644 --- a/src/powder_plot.c +++ b/src/powder_plot.c @@ -693,13 +693,13 @@ static void show_help(const char *s) " -p, --pdb= Get unit cell from PDB file. (.hkl files only)\n" " -y, --symmetry= The symmetry of crystal (.hkl files only)\n" " -s, --bins=n Makes histogram with n bins (default is 100).\n" -" --spacing= Use 'type' to select the q spacing.\n" +" --spacing= Use 'type' to select the 1/d spacing.\n" " Choose from:\n" " linear : linear (default)\n" -" q2 : even spacing in Wilson plots\n" +" wilson : even spacing in Wilson plots\n" " volume : constant volume\n" -" --q-max=n The maximum q to be considered in plot.\n" -" --q-min=n The minimum q to be considered in plot.\n" +" --max=n The maximum 1/d to be considered in plot.\n" +" --min=n The minimum 1/d to be considered in plot.\n" " -d, --data= Use to select the kind of stream data in histogram.\n" " Choose from:\n" " reflection : uses peak positons from indexed\n" @@ -716,8 +716,8 @@ static void show_help(const char *s) " table included in the HDF5 file.\n" " --only-indexed Use with -data=peaks or h5 if you want to use the\n" " peak list of only indexed patterns\n" -" --no-q-scaling Use with .hkl files if you want to not scale the\n" -" powder by 1/q^2\n" +" --no-d-scaling Use with .hkl files if you want to not scale the\n" +" powder by d^2\n" " --ring-corr Use if you want to scale the powder plot to\n" " correct for the fractional area sampled of the\n" " powder ring\n" @@ -785,13 +785,13 @@ int main(int argc, char *argv[]) {"pdb", 1, NULL, 'p'}, {"symmetry", 1, NULL, 'y'}, {"bins", 1, NULL, 's'}, - {"q-max", 1, NULL, 1 }, - {"q-min", 1, NULL, 2 }, + {"max", 1, NULL, 1 }, + {"min", 1, NULL, 2 }, {"spacing", 1, NULL, 3 }, {"no-sat-corr", 0, &config_satcorr, 0 }, {"sat-corr", 0, &config_satcorr, 1 }, {"only-indexed", 0, &only_indexed, 1 }, - {"no-q-scaling", 0, &q_scaling, 0 }, + {"no-d-scaling", 0, &q_scaling, 0 }, {"ring-corr", 0, &ring_corr, 1 }, {"use-redundancy", 0, &use_redundancy, 1 }, {"data", 1, NULL, 'd'}, @@ -853,7 +853,7 @@ int main(int argc, char *argv[]) case 3 : if (strcmp(optarg, "linear") == 0 ) { hist_info.spacing = LINEAR; - } else if (strcmp(optarg, "q2") == 0 ) { + } else if (strcmp(optarg, "wilson") == 0 ) { hist_info.spacing = q2; } else if (strcmp(optarg, "volume") == 0) { hist_info.spacing = VOLUME; @@ -1095,8 +1095,8 @@ int main(int argc, char *argv[]) } 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", + ERROR("the minimum 1/d value of: %e " + "is greator then your max 1/d value of: %e\n", hist_info.q_min, hist_info.q_max); return 1; } @@ -1207,8 +1207,14 @@ int main(int argc, char *argv[]) fh = stdout; } + /* Print header */ + fprintf(fh, "Command line:"); + for ( i=0; i