aboutsummaryrefslogtreecommitdiff
path: root/src/geometry.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-10-21 11:53:32 -0700
committerThomas White <taw@physics.org>2012-02-22 15:27:03 +0100
commitf7d612eb193e718490276b05b55af72cc3e70aac (patch)
treed870de57986f3e80a3350425bc58e72225c364ff /src/geometry.c
parent66d003e06152b1da64f28658818771ffa5999286 (diff)
s/hit/cpeak/
Avoid confusion over the use of the word 'hit'.
Diffstat (limited to 'src/geometry.c')
-rw-r--r--src/geometry.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/geometry.c b/src/geometry.c
index 09865822..cca2d050 100644
--- a/src/geometry.c
+++ b/src/geometry.c
@@ -22,24 +22,24 @@
#include "peaks.h"
-#define MAX_HITS (1024)
+#define MAX_CPEAKS (1024)
-struct reflhit *find_intersections(struct image *image, UnitCell *cell,
- double divergence, double bandwidth,
- int *n, int output)
+struct cpeak *find_intersections(struct image *image, UnitCell *cell,
+ double divergence, double bandwidth,
+ int *n, int output)
{
double asx, asy, asz;
double bsx, bsy, bsz;
double csx, csy, csz;
- struct reflhit *hits;
+ struct cpeak *cpeaks;
int np = 0;
int hmax, kmax, lmax;
double mres;
signed int h, k, l;
- hits = malloc(sizeof(struct reflhit)*MAX_HITS);
- if ( hits == NULL ) {
+ cpeaks = malloc(sizeof(struct cpeak)*MAX_CPEAKS);
+ if ( cpeaks == NULL ) {
*n = 0;
return NULL;
}
@@ -118,11 +118,11 @@ struct reflhit *find_intersections(struct image *image, UnitCell *cell,
if ( !found ) continue;
- hits[np].h = h;
- hits[np].k = k;
- hits[np].l = l;
- hits[np].x = xda;
- hits[np].y = yda;
+ cpeaks[np].h = h;
+ cpeaks[np].k = k;
+ cpeaks[np].l = l;
+ cpeaks[np].x = xda;
+ cpeaks[np].y = yda;
np++;
if ( output ) {
@@ -134,7 +134,7 @@ struct reflhit *find_intersections(struct image *image, UnitCell *cell,
}
*n = np;
- return hits;
+ return cpeaks;
}
@@ -145,7 +145,7 @@ double partiality(struct image *image, signed int h, signed int k, signed int l)
}
-double integrate_all(struct image *image, struct reflhit *hits, int n)
+double integrate_all(struct image *image, struct cpeak *cpeaks, int n)
{
double itot = 0.0;
int i;
@@ -154,7 +154,7 @@ double integrate_all(struct image *image, struct reflhit *hits, int n)
float x, y, intensity;
- if ( integrate_peak(image, hits[i].x, hits[i].y, &x, &y,
+ if ( integrate_peak(image, cpeaks[i].x, cpeaks[i].y, &x, &y,
&intensity, NULL, NULL, 0, 0) ) continue;
itot += intensity;