diff options
author | Thomas White <taw@physics.org> | 2012-03-06 16:14:41 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-03-06 16:16:27 +0100 |
commit | f6d70f85254e87852c715b533073a09a85d3e99a (patch) | |
tree | 5604b9fbcf8613c1937abccae4dee3976d6c0380 | |
parent | d21f2eb608431cd11b93aa96de3c792713829b44 (diff) |
powder_plot: remove --data=d option, because 1/d is no longer in the files
-rw-r--r-- | doc/man/powder_plot.1 | 5 | ||||
-rw-r--r-- | src/powder_plot.c | 69 |
2 files changed, 4 insertions, 70 deletions
diff --git a/doc/man/powder_plot.1 b/doc/man/powder_plot.1 index 43cc1660..9120b72f 100644 --- a/doc/man/powder_plot.1 +++ b/doc/man/powder_plot.1 @@ -66,10 +66,7 @@ generated in a variety of different ways. You can choose which one with Use peak positions from indexed reflections .IP \fBhkl\fR .PD -Use the Miller indicies from indexed reflections, combined with a unit cell from PDB file provided with -p. -.IP \fBd\fR -.PD -Use the 1/d values in the stream for indexed reflections, which were calculated at the time of indexing using the unit cell for the individual crystal. The individual unit cell should be close to the actual cell, meaning that this option should give a result close to "hkl". +Use the Miller indices from indexed reflections, combined with a unit cell from PDB file provided with -p. .IP \fBpeaks\fR .PD Use peak positions from peak search diff --git a/src/powder_plot.c b/src/powder_plot.c index 5be08d8e..f7c6b561 100644 --- a/src/powder_plot.c +++ b/src/powder_plot.c @@ -70,8 +70,7 @@ enum { PLOT_PEAKS, PLOT_HKL, PLOT_REFL, - PLOT_H5, - PLOT_D + PLOT_H5 }; enum { @@ -426,59 +425,6 @@ static unsigned int process_stream_reflection(FILE *fh, struct image *image, } -static unsigned int process_stream_d(FILE *fh, struct image *image, - struct histogram_info *info, - struct bin_stats *histdata, - unsigned int *n_patterns) -{ - int h, k, l, rval; - unsigned int i = 0; - unsigned int n_peaks = 0; - Reflection *refl; - RefListIterator *iter; - double intensity, q; - unsigned int processing_total; - - processing_total = count_patterns(fh); - rewind(fh); - - do { - - /* Get data from next chunk */ - rval = read_chunk(fh, image); - if ( rval ) continue; - - if ( image->reflections != NULL ) { - - (*n_patterns)++; - - for ( refl = first_refl(image->reflections, &iter); - refl != NULL; - refl = next_refl(refl, iter) ) - { - get_indices(refl, &h, &k, &l); - intensity = get_intensity(refl); - q = 2.0 * resolution(image->indexed_cell, - h, k, l); - if ( !add_d_to_histogram(q, intensity, info, - histdata)) n_peaks++; - } - } - - free(image->filename); - reflist_free(image->reflections); - image_feature_list_free(image->features); - cell_free(image->indexed_cell); - - i++; - progress_bar(i, processing_total, "Processing"); - - } while ( rval == 0 ); - - return n_peaks; -} - - static unsigned int process_stream_hkl(FILE *fh, struct image *image, struct histogram_info *info, struct bin_stats *histdata, @@ -923,10 +869,11 @@ int main(int argc, char *argv[]) } if ( datatype == NULL ) { - data_type = PLOT_D; + data_type = PLOT_HKL; if ((hist_info.q_min < 0.0) || (hist_info.q_max < 0.0)) { need_geometry = 1; } + need_pdb = 1; } else if ( strcmp(datatype, "reflection") == 0 ) { data_type = PLOT_REFL; @@ -936,12 +883,6 @@ int main(int argc, char *argv[]) data_type = PLOT_HKL; need_pdb = 1; - } else if ( strcmp(datatype, "d") == 0 ) { - data_type = PLOT_D; - if ((hist_info.q_min < 0.0) || (hist_info.q_max < 0.0)) { - need_geometry = 1; - } - } else if ( strcmp(datatype, "peaks") == 0 ) { data_type = PLOT_PEAKS; need_geometry = 1; @@ -1159,10 +1100,6 @@ int main(int argc, char *argv[]) n_peaks = process_stream_reflection(fh, &image, &hist_info, histdata, &n_patterns); break; - case PLOT_D : - n_peaks = process_stream_d(fh, &image, &hist_info, - histdata, &n_patterns); - break; case PLOT_HKL : n_peaks = process_stream_hkl(fh, &image, &hist_info, histdata, cell, &n_patterns); |