diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/check_hkl.c | 1 | ||||
-rw-r--r-- | src/compare_hkl.c | 1 | ||||
-rw-r--r-- | src/hrs-scaling.c | 1 | ||||
-rw-r--r-- | src/indexamajig.c | 1 | ||||
-rw-r--r-- | src/partial_sim.c | 17 | ||||
-rw-r--r-- | src/pattern_sim.c | 1 | ||||
-rw-r--r-- | src/post-refinement.c | 2 | ||||
-rw-r--r-- | src/powder_plot.c | 1 | ||||
-rw-r--r-- | src/render_hkl.c | 24 |
9 files changed, 34 insertions, 15 deletions
diff --git a/src/check_hkl.c b/src/check_hkl.c index 1dfe91a0..84cfdccf 100644 --- a/src/check_hkl.c +++ b/src/check_hkl.c @@ -43,6 +43,7 @@ #include "symmetry.h" #include "reflist.h" #include "reflist-utils.h" +#include "cell-utils.h" /* Number of bins for plot of resolution shells */ diff --git a/src/compare_hkl.c b/src/compare_hkl.c index b6a525fc..2b0e5f90 100644 --- a/src/compare_hkl.c +++ b/src/compare_hkl.c @@ -44,6 +44,7 @@ #include "statistics.h" #include "symmetry.h" #include "reflist-utils.h" +#include "cell-utils.h" /* Number of bins for plot of resolution shells */ diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c index 3ae0d563..399d5f90 100644 --- a/src/hrs-scaling.c +++ b/src/hrs-scaling.c @@ -37,7 +37,6 @@ #include <gsl/gsl_vector.h> #include <gsl/gsl_linalg.h> #include <gsl/gsl_eigen.h> -#include <gsl/gsl_blas.h> #include "image.h" #include "peaks.h" diff --git a/src/indexamajig.c b/src/indexamajig.c index 074be20a..4b3dcb5d 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -62,6 +62,7 @@ #include "geometry.h" #include "stream.h" #include "reflist-utils.h" +#include "cell-utils.h" #include "im-sandbox.h" diff --git a/src/partial_sim.c b/src/partial_sim.c index 62c72ceb..e9a7003e 100644 --- a/src/partial_sim.c +++ b/src/partial_sim.c @@ -40,14 +40,15 @@ #include <assert.h> #include <pthread.h> -#include <utils.h> -#include <reflist-utils.h> -#include <symmetry.h> -#include <beam-parameters.h> -#include <detector.h> -#include <geometry.h> -#include <stream.h> -#include <thread-pool.h> +#include "image.h" +#include "utils.h" +#include "reflist-utils.h" +#include "symmetry.h" +#include "beam-parameters.h" +#include "geometry.h" +#include "stream.h" +#include "thread-pool.h" +#include "cell-utils.h" /* Number of bins for partiality graph */ #define NBINS 50 diff --git a/src/pattern_sim.c b/src/pattern_sim.c index f9831e79..06a1f5e5 100644 --- a/src/pattern_sim.c +++ b/src/pattern_sim.c @@ -42,6 +42,7 @@ #include "diffraction.h" #include "diffraction-gpu.h" #include "cell.h" +#include "cell-utils.h" #include "utils.h" #include "hdf5-file.h" #include "detector.h" diff --git a/src/post-refinement.c b/src/post-refinement.c index 78c47d07..7410d931 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -37,7 +37,6 @@ #include <gsl/gsl_vector.h> #include <gsl/gsl_linalg.h> #include <gsl/gsl_eigen.h> -#include <gsl/gsl_blas.h> #include "image.h" #include "post-refinement.h" @@ -45,6 +44,7 @@ #include "symmetry.h" #include "geometry.h" #include "cell.h" +#include "cell-utils.h" /* Maximum number of iterations of NLSq to do for each image per macrocycle. */ diff --git a/src/powder_plot.c b/src/powder_plot.c index dd7f3f29..7917ccd0 100644 --- a/src/powder_plot.c +++ b/src/powder_plot.c @@ -51,6 +51,7 @@ #include "beam-parameters.h" #include "reflist-utils.h" #include "symmetry.h" +#include "cell-utils.h" struct bin_stats { diff --git a/src/render_hkl.c b/src/render_hkl.c index 9e7a6dda..7818b304 100644 --- a/src/render_hkl.c +++ b/src/render_hkl.c @@ -48,6 +48,7 @@ #include "render_hkl.h" #include "reflist.h" #include "reflist-utils.h" +#include "cell-utils.h" #define KEY_FILENAME "key.pdf" @@ -157,7 +158,7 @@ static void draw_circles(double xh, double xk, double xl, cairo_t *dctx, int wght, double boost, int colscale, UnitCell *cell, double radius, double theta, double as, double bs, double cx, double cy, - double scale, double max_val) + double scale, double max_val, signed int zone) { Reflection *refl; RefListIterator *iter; @@ -192,7 +193,7 @@ static void draw_circles(double xh, double xk, double xl, get_equiv(sym, m, i, ha, ka, la, &h, &k, &l); /* Is the reflection in the zone? */ - if ( h*zh + k*zk + l*zl != 0 ) continue; + if ( h*zh + k*zk + l*zl != zone ) continue; xi = (h*xh + k*xk + l*xl) / nx; yi = (h*yh + k*yk + l*yl) / ny; @@ -299,7 +300,7 @@ static void render_za(UnitCell *cell, RefList *list, int colscale, signed int xh, signed int xk, signed int xl, signed int yh, signed int yk, signed int yl, - const char *outfile, double scale_top) + const char *outfile, double scale_top, signed int zone) { cairo_surface_t *surface; cairo_t *dctx; @@ -415,7 +416,7 @@ static void render_za(UnitCell *cell, RefList *list, draw_circles(xh, xk, xl, yh, yk, yl, zh, zk, zl, list, sym, dctx, wght, boost, colscale, cell, max_r, theta, as, bs, cx, cy, scale, - max_val); + max_val, zone); /* Centre marker */ cairo_arc(dctx, (double)cx, @@ -609,6 +610,7 @@ int main(int argc, char *argv[]) char *outfile = NULL; double scale_top = -1.0; char *endptr; + long int zone = 0; /* Long options */ const struct option longopts[] = { @@ -625,6 +627,7 @@ int main(int argc, char *argv[]) {"counts", 0, &config_sqrt, 1}, {"colour-key", 0, &config_colkey, 1}, {"scale-top", 1, NULL, 2}, + {"zone", 1, NULL, 3}, {0, 0, NULL, 0} }; @@ -685,6 +688,17 @@ int main(int argc, char *argv[]) } break; + case 3 : + errno = 0; + zone = strtol(optarg, &endptr, 10); + if ( !( (optarg[0] != '\0') && (endptr[0] == '\0') ) + || (errno != 0) ) + { + ERROR("Invalid zone number ('%s')\n", optarg); + return 1; + } + break; + case 0 : break; @@ -804,7 +818,7 @@ int main(int argc, char *argv[]) } render_za(cell, list, boost, sym, wght, colscale, - rh, rk, rl, dh, dk, dl, outfile, scale_top); + rh, rk, rl, dh, dk, dl, outfile, scale_top, zone); free(pdb); free_symoplist(sym); |