diff options
author | Thomas White <taw@physics.org> | 2013-03-13 10:43:42 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-04-17 17:33:48 +0200 |
commit | 2b115b938d8bfba13f4193e329728b09a750b79f (patch) | |
tree | 76a0fd434021d3c5b19eab23b544d88e1495e40a /libcrystfel/src/reflist.c | |
parent | 1acd2a02602a98a6286553868ed770427087c021 (diff) |
Add Lorentz factor
Diffstat (limited to 'libcrystfel/src/reflist.c')
-rw-r--r-- | libcrystfel/src/reflist.c | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/libcrystfel/src/reflist.c b/libcrystfel/src/reflist.c index 64154774..b3b9f85b 100644 --- a/libcrystfel/src/reflist.c +++ b/libcrystfel/src/reflist.c @@ -3,11 +3,11 @@ * * Fast reflection/peak list * - * Copyright © 2012 Deutsches Elektronen-Synchrotron DESY, - * a research centre of the Helmholtz Association. + * Copyright © 2012-2013 Deutsches Elektronen-Synchrotron DESY, + * a research centre of the Helmholtz Association. * * Authors: - * 2011-2012 Thomas White <taw@physics.org> + * 2011-2013 Thomas White <taw@physics.org> * * This file is part of CrystFEL. * @@ -70,6 +70,7 @@ struct _refldata { double r1; /* First excitation error */ double r2; /* Second excitation error */ double p; /* Partiality */ + double L; /* Lorentz factor */ int clamp1; /* Clamp status for r1 */ int clamp2; /* Clamp status for r2 */ @@ -388,7 +389,7 @@ void get_symmetric_indices(const Reflection *refl, * get_partiality: * @refl: A %Reflection * - * Returns: The partiality of the reflection. + * Returns: The partiality of the reflection. See get_lorentz(). **/ double get_partiality(const Reflection *refl) { @@ -397,6 +398,19 @@ double get_partiality(const Reflection *refl) /** + * get_lorentz: + * @refl: A %Reflection + * + * Returns: The Lorentz factor for the reflection. To "scale up" a partial + * reflection, divide by this multiplied by the partiality. + **/ +double get_lorentz(const Reflection *refl) +{ + return refl->data.L; +} + + +/** * get_intensity: * @refl: A %Reflection * @@ -602,10 +616,35 @@ void set_partial(Reflection *refl, double r1, double r2, double p, /** * set_intensity: * @refl: A %Reflection + * @p: The partiality for the reflection. + * + * Set the partiality for the reflection. See set_lorentz(). + **/ +void set_partiality(Reflection *refl, double p) +{ + refl->data.p = p; +} + +/** + * set_lorentz: + * @refl: A %Reflection + * @L: The Lorentz factor for the reflection. + * + * Set the Lorentz factor for the reflection. To "scale up" a partial + * reflection, divide by this multiplied by the partiality. + **/ +void set_lorentz(Reflection *refl, double L) +{ + refl->data.L = L; +} + + +/** + * set_intensity: + * @refl: A %Reflection * @intensity: The intensity for the reflection. * - * Set the intensity for the reflection. Note that retrieval is done with - * get_intensity(). + * Set the intensity for the reflection. **/ void set_intensity(Reflection *refl, double intensity) { |