aboutsummaryrefslogtreecommitdiff
path: root/src/reflist.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-07-11 16:55:35 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:32 +0100
commit623939fb6bd9475935546b9539f404eaaff41a3f (patch)
tree8d8e77b07903bbb36df60646b4127dec18397d3f /src/reflist.c
parent1bd043203f25a26d5d806ed847f87a4fd7df5f22 (diff)
Use new Kabsch algorithm for faster scaling
Diffstat (limited to 'src/reflist.c')
-rw-r--r--src/reflist.c102
1 files changed, 64 insertions, 38 deletions
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;
}
@@ -585,24 +599,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
* @esd: New standard error for this reflection's intensity measurement
@@ -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)