- Initial commit of a UB calculation setup for four circle
diffractometers
This commit is contained in:
40
ubfour.h
Normal file
40
ubfour.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* This is a library for calculating UB matrices for four circle diffraction.
|
||||
* The algorithm and setting definitions is from:
|
||||
* Busing & Levy, Acta Cryst. (1967), 22, 457ff
|
||||
*
|
||||
* This initial version only supports the calculation of the UB matrix from
|
||||
* cell constants and two reflections.
|
||||
*
|
||||
* Mark Koennecke, march 2005
|
||||
*/
|
||||
#ifndef SICSUBFOUR
|
||||
#define SICSUBFOUR
|
||||
|
||||
#include <stdio.h>
|
||||
#include "matrix/matrix.h"
|
||||
#include "cell.h"
|
||||
|
||||
/**
|
||||
* error codes: also see cell.h
|
||||
*/
|
||||
#define UBNOMEMORY -200
|
||||
|
||||
/**
|
||||
* a reflection data structure holding the indices h,k,l and
|
||||
* the magic four circle angles two_theta, om, chi and phi.
|
||||
*/
|
||||
typedef struct{
|
||||
double h,k,l;
|
||||
double s2t,om,chi,phi;
|
||||
}reflection;
|
||||
/**
|
||||
* calculate a UB matrix 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 calcUBFromCellAndReflections(lattice direct, reflection r1, reflection r2, int *errCode);
|
||||
#endif
|
||||
Reference in New Issue
Block a user