From 6a5422356c15962726df2261aa53354b0ff12662 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 14 Jul 2010 17:58:55 +0200 Subject: 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. --- src/render_hkl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/render_hkl.c') 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; -- cgit v1.2.3