- Adapted indenation to new agreed upon system
- Added support for second generation scriptcontext based counter
This commit is contained in:
35
ubfour.h
35
ubfour.h
@@ -31,10 +31,10 @@
|
||||
* 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;
|
||||
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
|
||||
@@ -43,7 +43,8 @@ typedef struct{
|
||||
* @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);
|
||||
MATRIX calcUBFromCellAndReflections(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
|
||||
@@ -54,15 +55,16 @@ MATRIX calcUBFromCellAndReflections(lattice direct, reflection r1, reflection r2
|
||||
* @return A UB matrix on success or NULL on errors. Then errcode will indicate
|
||||
* the type of teh error.
|
||||
*/
|
||||
MATRIX calcUBFromThreeReflections(reflection r1, reflection r2, reflection r3,
|
||||
double lambda, int *errCode);
|
||||
MATRIX calcUBFromThreeReflections(reflection r1, reflection r2,
|
||||
reflection r3, double lambda,
|
||||
int *errCode);
|
||||
/**
|
||||
* a data structure holding an indexing suggestion
|
||||
*/
|
||||
typedef struct {
|
||||
double h, k, l; /* suggested index */
|
||||
double t2obs, t2calc, t2diff; /* 2 theta observed and calculated and the difference */
|
||||
}refIndex, *prefIndex;
|
||||
double h, k, l; /* suggested index */
|
||||
double t2obs, t2calc, t2diff; /* 2 theta observed and calculated and the difference */
|
||||
} refIndex, *prefIndex;
|
||||
/**
|
||||
* search for possible indexes matching the two theta value given. This is a brute force search
|
||||
* @param direct The lattice constants of the crystal
|
||||
@@ -76,15 +78,16 @@ typedef struct {
|
||||
* @return The number of indexes in index or a negative error code when an error
|
||||
* occurs.
|
||||
*/
|
||||
int searchIndex(lattice direct, double lambda, double two_theta, double max_deviation,
|
||||
int limit, refIndex index[], int maxIndex);
|
||||
int searchIndex(lattice direct, double lambda, double two_theta,
|
||||
double max_deviation, int limit, refIndex index[],
|
||||
int maxIndex);
|
||||
/**
|
||||
* calculate the angle between two reflections, given their miller indices
|
||||
* @param B The B metric matrix
|
||||
* @param r1 first reflection
|
||||
* @param r2 second reflection
|
||||
* @return angle between reflections
|
||||
*/
|
||||
*/
|
||||
double angleBetweenReflections(MATRIX B, reflection r1, reflection r2);
|
||||
/**
|
||||
* calculate the length of the scattering vector belonging to r
|
||||
@@ -111,6 +114,6 @@ MATRIX makeInstToConeVectorMatrix(reflection r, double lambda);
|
||||
* system to the psi instrument coordinate system.
|
||||
* @return a scattering vector on the cone
|
||||
*/
|
||||
MATRIX calcConeVector(double openingAngle, double coneAngle,
|
||||
double length, MATRIX coneToPsi);
|
||||
#endif
|
||||
MATRIX calcConeVector(double openingAngle, double coneAngle,
|
||||
double length, MATRIX coneToPsi);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user