- Adding first working version of the McStas SICS connection to cvs
SKIPPED: psi/polterwrite.c
This commit is contained in:
@ -397,6 +397,7 @@ int calcTasQAngles(MATRIX UB, MATRIX planeNormal, int ss, tasQEPosition qe,
|
||||
|
||||
angles->sgl = Asind(-R[2][0]);
|
||||
if(ABS(angles->sgl -90.) < .5){
|
||||
mat_free(R);
|
||||
return BADUBORQ;
|
||||
}
|
||||
/*
|
||||
@ -419,6 +420,7 @@ int calcTasQAngles(MATRIX UB, MATRIX planeNormal, int ss, tasQEPosition qe,
|
||||
|
||||
QC = tasReflectionToQC(qe,UB);
|
||||
if(QC == NULL){
|
||||
mat_free(R);
|
||||
return UBNOMEMORY;
|
||||
}
|
||||
|
||||
@ -426,6 +428,8 @@ int calcTasQAngles(MATRIX UB, MATRIX planeNormal, int ss, tasQEPosition qe,
|
||||
q = 2.*PI*vectorLength(QC);
|
||||
cos2t = (qe.ki*qe.ki + qe.kf*qe.kf - q*q)/(2. * ABS(qe.ki) * ABS(qe.kf));
|
||||
if(ABS(cos2t) > 1.){
|
||||
mat_free(R);
|
||||
killVector(QC);
|
||||
return TRIANGLENOTCLOSED;
|
||||
}
|
||||
angles->sample_two_theta = ss*Acosd(cos2t);
|
||||
|
Reference in New Issue
Block a user