aboutsummaryrefslogtreecommitdiff
path: root/src/render_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-07-14 17:58:55 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:53 +0100
commit6a5422356c15962726df2261aa53354b0ff12662 (patch)
treeb6c5ae80b837bda38957cef07816b511515ffdcb /src/render_hkl.c
parent6a476e010468f27e02df6bb90a1ea197bd9d039d (diff)
Reduce the scope of "count"
Lists of counts had pervaded every corner of CrystFEL, being used as markers for the presence of reflections. Now we have a better way of doing this, the ReflItemList, and few parts of the suite apart from process_hkl have any business knowing how many observations were made of a particular reflection.
Diffstat (limited to 'src/render_hkl.c')
-rw-r--r--src/render_hkl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/render_hkl.c b/src/render_hkl.c
index 60153652..829ceb4e 100644
--- a/src/render_hkl.c
+++ b/src/render_hkl.c
@@ -128,10 +128,10 @@ static void render_za(UnitCell *cell, double *ref, unsigned int *c,
switch ( wght ) {
case WGHT_I :
- val = lookup_intensity(ref, h, k, 0) / (float)ct;
+ val = lookup_intensity(ref, h, k, 0);
break;
case WGHT_SQRTI :
- val = lookup_intensity(ref, h, k, 0) / (float)ct;
+ val = lookup_intensity(ref, h, k, 0);
val = (val>0.0) ? sqrt(val) : 0.0;
break;
case WGHT_COUNTS :
@@ -290,7 +290,6 @@ int main(int argc, char *argv[])
UnitCell *cell;
char *infile;
double *ref;
- unsigned int *cts;
int config_povray = 0;
int config_zoneaxis = 0;
int config_sqrt = 0;
@@ -303,6 +302,7 @@ int main(int argc, char *argv[])
int wght;
int colscale;
char *cscale = NULL;
+ unsigned int *cts;
/* Long options */
const struct option longopts[] = {
@@ -417,8 +417,10 @@ int main(int argc, char *argv[])
ERROR("Couldn't load unit cell from %s\n", pdb);
return 1;
}
+ ref = new_list_intensity();
cts = new_list_count();
- ref = read_reflections(infile, cts, NULL);
+ ReflItemList *items = read_reflections(infile, ref, NULL, cts);
+ delete_items(items);
if ( ref == NULL ) {
ERROR("Couldn't open file '%s'\n", infile);
return 1;