- Fixed NB indexing

- Fixed an issue with setbin generated time binnings
This commit is contained in:
koennecke
2009-06-30 06:43:23 +00:00
parent 78b2832cbb
commit e076a00fde
8 changed files with 269 additions and 14 deletions

View File

@@ -33,7 +33,8 @@
*/
typedef struct {
double h, k, l;
double s2t, om, chi, phi;
double s2t, om, chi, phi; /* bisecting */
double gamma, omnb, nu; /* normal beam */
} reflection;
/**
* calculate a UB matrix from cell constants and two reflections
@@ -45,6 +46,17 @@ typedef struct {
*/
MATRIX calcUBFromCellAndReflections(lattice direct, reflection r1,
reflection r2, int *errCode);
/**
* calculate a UB matrix for normal beam geometry from cell constants and
* two reflections
* @param direct The direct cell constants
* @param r1 The first reflection.
* @param r2 The second reflection.
* @param errCode an error indicator if things go wrong.
* @return The resulting UB matrix or NULL on errors
*/
MATRIX calcNBUBFromCellAndReflections(lattice direct, reflection r1,
reflection r2, int *errCode);
/**
* calculate the UB matrix from three reflections. The three reflections must not be
* coplanar and must reflect a right handed
@@ -58,6 +70,19 @@ MATRIX calcUBFromCellAndReflections(lattice direct, reflection r1,
MATRIX calcUBFromThreeReflections(reflection r1, reflection r2,
reflection r3, double lambda,
int *errCode);
/**
* calculate the UB matrix from three reflections for normal beam geomtry.
* The three reflections must not be coplanar and must reflect a right handed set.
* @param r1 The first reflection
* @param r2 The second reflection
* @param r3 The third reflection.
* @param errCode a code indictang errors which happened.
* @return A UB matrix on success or NULL on errors. Then errcode will indicate
* the type of teh error.
*/
MATRIX calcNBUBFromThreeReflections(reflection r1, reflection r2,
reflection r3, double lambda,
int *errCode);
/**
* a data structure holding an indexing suggestion
*/
@@ -92,7 +117,7 @@ double angleBetweenReflections(MATRIX B, reflection r1, reflection r2);
/**
* calculate the length of the scattering vector belonging to r
* @param B The B metric matrix to use
* @param r The reflction for wihic to calculate
* @param r The reflction for which to calculate
* @return The length of the scattering vector
*/
double scatteringVectorLength(MATRIX B, reflection r);