diff options
author | Andrew Aquila <andrew.aquila@cfel.de> | 2012-01-04 17:50:12 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:42 +0100 |
commit | 120cb93c4b323bed4b9f57f22b4e150122647f83 (patch) | |
tree | 4998294681cd971c9e6a4b9bb2935bf08d97ec92 | |
parent | 2afacc630111287633d2f9d753f47058fb991639 (diff) |
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
-rw-r--r-- | doc/man/powder_plot.1 | 14 | ||||
-rw-r--r-- | src/powder_plot.c | 32 |
2 files changed, 26 insertions, 20 deletions
diff --git a/doc/man/powder_plot.1 b/doc/man/powder_plot.1 index 45f10eca..029e3be3 100644 --- a/doc/man/powder_plot.1 +++ b/doc/man/powder_plot.1 @@ -20,10 +20,10 @@ This program takes as input the data stream from "indexamajig" or an hkl file, or an HDF5 file. It sums the many individual intensities, Bragg peaks or pixel locations in the HDF5 file, together to form a 1D powder histogram. -The output of powder_plot consists of a two line header followed by a tab +The output of powder_plot consists of a three line header followed by a tab delimited list of 6 values: - q of the histogram bin + 1/d of the histogram bin where d is the Bragg law d spacing in meters the total number of peaks (N) the total intensity in the N peaks the mean intensity of the N peaks @@ -43,17 +43,17 @@ selected. .SH HISTOGRAM OPTIONS -You can choose to set the min and maximum q value [units are inverse meters] -with: --q_min=<number> and --q_max=<number> The default value is to use the +You can choose to set the min and maximum 1/d value [units are inverse meters] +with: --min=<number> and --max=<number> The default value is to use the entire detector setup in the .geom file (loaded with the -g flag). You can also adjust the number of histogram bins with: --bins=<intiger> -Scaling can be set to produce linearly, quadratically or cubicly spaced q +Scaling can be set to produce linearly, quadratically or cubicly spaced 1/d values using: --spacing=<type> possible types are: linear : linear (default) - q2 : even spacing in Wilson plots (quadratic) + wilson : even spacing in Wilson plots (quadratic) volume : constant volume (cubic) .SH DATA TYPE OPTIONS @@ -75,7 +75,7 @@ and peaks (regardless if they indexed). A few other implemented flags to give better control are: --no-sat-corr Don't correct values of saturated peaks using a table included in the HDF5 file. --only-indexed Use with -data=peaks or h5 if you want to use the peak list of only indexed patterns. (Useful for seeing changes from patterns that do not index.) - --no-q-scaling Use with .hkl files if you want to not scale the powder by 1/q^2 + --no-d-scaling Use with .hkl files if you want to not scale the powder by d^2 --ring-corr Use if you want to scale the powder plot to correct for the fractional area sampled of the powder ring. (Useful for detectors with gaps.) --use-redundancy Use with .hkl files if you want to use the number of measurements and not the number of symmetrical equivalent reflections as the number of time a reflection occurs in the powder 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=<file> Get unit cell from PDB file. (.hkl files only)\n" " -y, --symmetry=<sym> The symmetry of crystal (.hkl files only)\n" " -s, --bins=n Makes histogram with n bins (default is 100).\n" -" --spacing=<type> Use 'type' to select the q spacing.\n" +" --spacing=<type> 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=<type> 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<argc; i++ ) { + fprintf(fh, " %s", argv[i]); + } + fprintf(fh, "\n"); fprintf(fh, "I read %i patterns with %i peaks\n", n_patterns, n_peaks); - fprintf(fh, "q\tN\ttotal\tmean\tstd dev\t std dev of mean\n"); + fprintf(fh, "1/d(m^-1)\tN\ttotal\tmean\tstd dev\t std dev of mean\n"); for( i=0; i<hist_info.histsize; i++ ) { fprintf(fh, "%5e\t%i\t%5e\t%5e\t%5e\t%5e\n", |