diff options
author | Thomas White <taw@physics.org> | 2010-07-14 17:58:55 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:26:53 +0100 |
commit | 6a5422356c15962726df2261aa53354b0ff12662 (patch) | |
tree | b6c5ae80b837bda38957cef07816b511515ffdcb /src/likelihood.c | |
parent | 6a476e010468f27e02df6bb90a1ea197bd9d039d (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/likelihood.c')
-rw-r--r-- | src/likelihood.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/likelihood.c b/src/likelihood.c index b6a37994..cb5595f8 100644 --- a/src/likelihood.c +++ b/src/likelihood.c @@ -18,17 +18,17 @@ #include "utils.h" -void scale_intensities(const double *model, double *new_pattern, - const unsigned int *model_counts, - ReflItemList *items, double f0, int f0_valid) +void scale_intensities(const double *model, ReflItemList *model_items, + double *new_pattern, ReflItemList *new_items, + double f0, int f0_valid) { double s; unsigned int i; - unsigned int *new_counts; + ReflItemList *items; - new_counts = items_to_counts(items); - - s = stat_scale_intensity(model, model_counts, new_pattern, new_counts); + items = intersection_items(model_items, new_items); + s = stat_scale_intensity(model, new_pattern, items); + delete_items(items); if ( f0_valid ) printf("%f %f\n", s, f0); /* NaN -> abort */ @@ -38,6 +38,4 @@ void scale_intensities(const double *model, double *new_pattern, for ( i=0; i<LIST_SIZE; i++ ) { new_pattern[i] *= s; } - - free(new_counts); } |