PSI sics-cvs-psi-2006
This commit is contained in:
31
fourlib.h
31
fourlib.h
@@ -70,7 +70,7 @@ void pol2det(psdDescription *psd, double gamma, double nu, int *x, int *y);
|
||||
Z1 = UB *h
|
||||
------------------------------------------------------------------------*/
|
||||
/**
|
||||
* calculate stt, om, chi and phi in order to put z1 into the bissecting
|
||||
* calculate stt, om, chi and phi in order to put z1 into the bissecting
|
||||
* diffraction condition. Returns 1 on success and 0 if z1 and lambda
|
||||
* were invalid. The m version acts upon a matrix.
|
||||
*/
|
||||
@@ -122,6 +122,10 @@ void z1FromAngles(double lambda, double stt, double om,
|
||||
*/
|
||||
int bisToNormalBeam(double twotheta, double omega, double chi, double phi,
|
||||
double *omeganb, double *gamma, double *nu);
|
||||
/**
|
||||
* calculate normal beam angles from z1
|
||||
*/
|
||||
int z1mToNormalBeam(double lambda, MATRIX z1, double *gamma, double *om, double *nu);
|
||||
|
||||
/**
|
||||
* calculate the vector z1 from the normal beam angles omega, gamma and nu.
|
||||
@@ -162,6 +166,31 @@ void chimat(MATRIX chim, double chi);
|
||||
* phi rotation matrix for phi into phim
|
||||
*/
|
||||
void phimat(MATRIX phim, double phi);
|
||||
/**
|
||||
* calcTheta calculates theta for a z1
|
||||
* returns 1 on success, 0 else
|
||||
*/
|
||||
int calcTheta(double lambda, MATRIX z1, double *d, double *theta);
|
||||
|
||||
/**
|
||||
* try very hard to calculate settings for the bisecting position
|
||||
* within the instruments limits. Tries to tweak omega and to rotate
|
||||
* psi until a usable position can be found.
|
||||
* @param lambda The wavelength
|
||||
* @param z1 The scattering for which to find a position
|
||||
* @param fSet The output setting angles. In case of a failure this
|
||||
* contains the normal setting angles for psi = 0. The order is:
|
||||
* 2 theta, om, chi, phi
|
||||
* @testFunc A user supplied function which test if the setting angles
|
||||
* are in range.
|
||||
* @param userData A user specified pointer to some data which may be needed
|
||||
* in testing the range.
|
||||
* @return 0 on failure, 1 on success.
|
||||
*/
|
||||
typedef int (*inRange)(void *userData, float dSet[4], int mask[4]);
|
||||
int findAllowedBisecting(double lambda, MATRIX z1, float fSet[4],
|
||||
inRange testFunc, void *userData);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user