From 623939fb6bd9475935546b9539f404eaaff41a3f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 11 Jul 2011 16:55:35 +0200 Subject: Use new Kabsch algorithm for faster scaling --- src/reflist.c | 102 ++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 64 insertions(+), 38 deletions(-) (limited to 'src/reflist.c') diff --git a/src/reflist.c b/src/reflist.c index b51af27c..5b594d76 100644 --- a/src/reflist.c +++ b/src/reflist.c @@ -81,9 +81,9 @@ struct _refldata { /* Redundancy */ int redundancy; - /* Total squared difference between all estimates of this reflection - * and the estimated mean value */ - double sum_squared_dev; + /* User-specified temporary values */ + double temp1; + double temp2; }; @@ -423,47 +423,61 @@ int get_redundancy(const Reflection *refl) /** - * get_sum_squared_dev: + * get_esd_intensity: * @refl: A %Reflection * - * The sum squared deviation is used to estimate the standard errors on the - * intensities during 'Monte Carlo' merging. + * Returns: the standard error in the intensity measurement (as returned by + * get_intensity()) for this reflection. + * + **/ +double get_esd_intensity(const Reflection *refl) +{ + return refl->data.esd_i; +} + + +/** + * get_phase: + * @refl: A %Reflection * - * Returns: the sum of the squared deviations between the intensities and the - * mean intensity from all measurements of the reflection (and probably its - * symmetry equivalents according to some point group). + * Returns: the phase for this reflection. * **/ -double get_sum_squared_dev(const Reflection *refl) +double get_phase(const Reflection *refl) { - return refl->data.sum_squared_dev; + return refl->data.phase; } /** - * get_esd_intensity: + * get_temp1: * @refl: A %Reflection * - * Returns: the standard error in the intensity measurement (as returned by - * get_intensity()) for this reflection. + * The temporary values can be used according to the needs of the calling + * program. + * + * Returns: the first temporary value for this reflection. * **/ -double get_esd_intensity(const Reflection *refl) +double get_temp1(const Reflection *refl) { - return refl->data.esd_i; + return refl->data.temp1; } /** - * get_phase: + * get_temp2: * @refl: A %Reflection * - * Returns: the phase for this reflection. + * The temporary values can be used according to the needs of the calling + * program. + * + * Returns: the second temporary value for this reflection. * **/ -double get_phase(const Reflection *refl) +double get_temp2(const Reflection *refl) { - return refl->data.phase; + return refl->data.temp2; } @@ -584,24 +598,6 @@ void set_redundancy(Reflection *refl, int red) } -/** - * set_sum_squared_dev: - * @refl: A %Reflection - * @dev: New sum squared deviation for the reflection - * - * The sum squared deviation is used to estimate the standard errors on the - * intensities during 'Monte Carlo' merging. It is defined as the sum of the - * squared deviations between the intensities and the mean intensity from all - * measurements of the reflection (and probably its symmetry equivalents - * according to some point group). - * - **/ -void set_sum_squared_dev(Reflection *refl, double dev) -{ - refl->data.sum_squared_dev = dev; -} - - /** * set_esd_intensity: * @refl: A %Reflection @@ -648,6 +644,36 @@ void set_symmetric_indices(Reflection *refl, } +/** + * set_temp1 + * @refl: A %Reflection + * @temp: New temporary value for the reflection + * + * The temporary values can be used according to the needs of the calling + * program. + * + **/ +void set_temp1(Reflection *refl, double temp) +{ + refl->data.temp1 = temp; +} + + +/** + * set_temp2 + * @refl: A %Reflection + * @temp: New temporary value for the reflection + * + * The temporary values can be used according to the needs of the calling + * program. + * + **/ +void set_temp2(Reflection *refl, double temp) +{ + refl->data.temp2 = temp; +} + + /********************************* Insertion **********************************/ static Reflection *rotate_once(Reflection *refl, int dir) -- cgit v1.2.3