- Adding first working version of the McStas SICS connection to cvs

SKIPPED:
	psi/polterwrite.c
This commit is contained in:
koennecke
2005-06-22 07:09:59 +00:00
parent 734577e394
commit ef6c04e6b8
42 changed files with 3268 additions and 18 deletions

View File

@ -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);