Commit 57f325c7 authored by Thomas White's avatar Thomas White Committed by Thomas White
Browse files

Use correct accessor type for ESD lists

parent 19fafd84
...@@ -229,7 +229,7 @@ static void plot_shells(const double *ref, ReflItemList *items, UnitCell *cell, ...@@ -229,7 +229,7 @@ static void plot_shells(const double *ref, ReflItemList *items, UnitCell *cell,
d = resolution(cell, h, k, l) * 2.0; d = resolution(cell, h, k, l) * 2.0;
val = lookup_intensity(ref, h, k, l); val = lookup_intensity(ref, h, k, l);
esd = lookup_intensity(sigma, h, k, l); esd = lookup_sigma(sigma, h, k, l);
bin = -1; bin = -1;
for ( j=0; j<NBINS; j++ ) { for ( j=0; j<NBINS; j++ ) {
......
...@@ -169,14 +169,14 @@ static ReflItemList *twin_reflections(double *ref, ReflItemList *items, ...@@ -169,14 +169,14 @@ static ReflItemList *twin_reflections(double *ref, ReflItemList *items,
} }
total += lookup_intensity(ref, hu, ku, lu); total += lookup_intensity(ref, hu, ku, lu);
sigma += pow(lookup_intensity(esds, hu, ku, lu), 2.0); sigma += pow(lookup_sigma(esds, hu, ku, lu), 2.0);
} }
if ( !skip ) { if ( !skip ) {
set_intensity(ref, h, k, l, total); set_intensity(ref, h, k, l, total);
set_intensity(esds, h, k, l, sqrt(sigma)); set_sigma(esds, h, k, l, sqrt(sigma));
add_item(new, h, k, l); add_item(new, h, k, l);
} }
...@@ -348,7 +348,7 @@ int main(int argc, char *argv[]) ...@@ -348,7 +348,7 @@ int main(int argc, char *argv[])
} else { } else {
phases = NULL; phases = NULL;
} }
esds = new_list_intensity(); esds = new_list_sigma();
if ( input == NULL ) { if ( input == NULL ) {
input_items = new_items(); input_items = new_items();
ideal_ref = get_reflections(mol, eV_to_J(1790.0), 1/(0.05e-9), ideal_ref = get_reflections(mol, eV_to_J(1790.0), 1/(0.05e-9),
......
...@@ -791,7 +791,7 @@ int main(int argc, char *argv[]) ...@@ -791,7 +791,7 @@ int main(int argc, char *argv[])
STATUS("Extra pass to calculate ESDs...\n"); STATUS("Extra pass to calculate ESDs...\n");
devs = new_list_intensity(); devs = new_list_intensity();
esds = new_list_intensity(); esds = new_list_sigma();
rewind(fh); rewind(fh);
merge_all(fh, &model, &observed, &counts, merge_all(fh, &model, &observed, &counts,
config_maxonly, config_scale, 0, config_maxonly, config_scale, 0,
...@@ -815,11 +815,11 @@ int main(int argc, char *argv[]) ...@@ -815,11 +815,11 @@ int main(int argc, char *argv[])
if ( count < 2 ) { if ( count < 2 ) {
/* If we have only one measurement, the error is 100% */ /* If we have only one measurement, the error is 100% */
esd = lookup_intensity(model, h, k, l); esd = lookup_sigma(model, h, k, l);
} else { } else {
esd = sqrt(dev) / (double)count; esd = sqrt(dev) / (double)count;
} }
set_intensity(esds, h, k, l, esd); set_sigma(esds, h, k, l, esd);
} }
......
...@@ -26,7 +26,7 @@ double *poisson_esds(double *intensities, ReflItemList *items, ...@@ -26,7 +26,7 @@ double *poisson_esds(double *intensities, ReflItemList *items,
double adu_per_photon) double adu_per_photon)
{ {
int i; int i;
double *esds = new_list_intensity(); double *esds = new_list_sigma();
for ( i=0; i<num_items(items); i++ ) { for ( i=0; i<num_items(items); i++ ) {
...@@ -45,7 +45,7 @@ double *poisson_esds(double *intensities, ReflItemList *items, ...@@ -45,7 +45,7 @@ double *poisson_esds(double *intensities, ReflItemList *items,
sigma = 0.0; sigma = 0.0;
} }
set_intensity(esds, h, k, l, sigma); set_sigma(esds, h, k, l, sigma);
} }
...@@ -110,7 +110,7 @@ void write_reflections(const char *filename, ReflItemList *items, ...@@ -110,7 +110,7 @@ void write_reflections(const char *filename, ReflItemList *items,
} }
if ( esds != NULL ) { if ( esds != NULL ) {
sigma = lookup_intensity(esds, h, k, l); sigma = lookup_sigma(esds, h, k, l);
} else { } else {
sigma = 0.0; sigma = 0.0;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment