- Added support for accessing the exe file management functions from scripts
- Fixed a bug in hmdata.c - Fixed an issue with tempoerature writing through RemObjects in mesure - Added auxiliary reflections to tasub - Make maximize use soft motor positions
This commit is contained in:
23
tasublib.c
23
tasublib.c
@ -246,6 +246,29 @@ int makeAuxReflection(MATRIX B, tasReflection r1, tasReflection *r2,
|
||||
|
||||
return 1;
|
||||
}
|
||||
/*------------------------------------------------------------------*/
|
||||
int calcTwoTheta(MATRIX B, tasQEPosition ref, int ss, double *value){
|
||||
MATRIX QC;
|
||||
double cos2t, q;
|
||||
|
||||
QC = tasReflectionToHC(ref,B);
|
||||
if(QC == NULL){
|
||||
return UBNOMEMORY;
|
||||
}
|
||||
|
||||
q = vectorLength(QC);
|
||||
q = 2.*PI*vectorLength(QC);
|
||||
killVector(QC);
|
||||
|
||||
cos2t = (ref.ki*ref.ki + ref.kf*ref.kf - q*q)/
|
||||
(2. * ABS(ref.ki) * ABS(ref.kf));
|
||||
if(ABS(cos2t) > 1.){
|
||||
return TRIANGLENOTCLOSED;
|
||||
}
|
||||
*value = ss*Acosd(cos2t);
|
||||
|
||||
return 1;
|
||||
}
|
||||
/*-------------------------------------------------------------------*/
|
||||
MATRIX calcPlaneNormal(tasReflection r1, tasReflection r2){
|
||||
MATRIX u1 = NULL, u2 = NULL, planeNormal = NULL;
|
||||
|
Reference in New Issue
Block a user